:root {
  --wb-sidebar: #17191e;
  --wb-sidebar-soft: #292d34;
  --wb-bg: #f5f6f8;
  --wb-surface: #ffffff;
  --wb-line: #e1e5ea;
  --wb-text: #1d222a;
  --wb-muted: #707782;
  --wb-primary: #0e9f89;
  --wb-primary-dark: #087565;
  --wb-sidebar-width: 272px;
  --wb-mobile-nav-height: 66px;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  color-scheme: light;
}

html,
body.public-workbench-home {
  min-height: 100%;
  margin: 0;
  background: var(--wb-bg);
  color: var(--wb-text);
  color-scheme: light;
}

body.public-workbench-home,
body.public-workbench-home * { box-sizing: border-box; letter-spacing: 0; }
body.public-workbench-home { overflow: hidden; font-family: inherit; -webkit-font-smoothing: antialiased; }
.public-workbench-home a { color: inherit; text-decoration: none; }
.public-workbench-home button { font: inherit; }
.public-workbench-home svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.workbench-home { min-height: 100vh; min-height: 100svh; background: var(--wb-bg); }

.workbench-sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 20;
  display: flex;
  width: var(--wb-sidebar-width);
  min-height: 100vh;
  min-height: 100svh;
  flex-direction: column;
  padding: 20px 16px 16px;
  overflow-y: auto;
  background: var(--wb-sidebar);
  color: #f4f6f8;
}

.workbench-brand,
.workbench-mobile-brand { display: flex; align-items: center; gap: 11px; min-width: 0; }
.workbench-brand { min-height: 48px; padding: 0 9px; }
.workbench-brand img,
.workbench-mobile-brand img { flex: 0 0 auto; border-radius: 8px; object-fit: contain; }
.workbench-brand span { min-width: 0; }
.workbench-brand strong,
.workbench-brand small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.workbench-brand strong { font-size: 17px; line-height: 1.35; }
.workbench-brand small { margin-top: 2px; color: #959ca7; font-size: 11px; }

.workbench-nav { display: grid; gap: 4px; margin-top: 25px; }
.workbench-nav p { margin: 17px 10px 6px; color: #757c87; font-size: 11px; font-weight: 700; }
.workbench-nav p:first-child { margin-top: 0; }
.workbench-nav a {
  display: flex;
  min-height: 42px;
  align-items: center;
  gap: 11px;
  padding: 8px 11px;
  border-radius: 7px;
  color: #abb1bb;
  font-size: 14px;
  transition: background-color .16s ease, color .16s ease;
}
.workbench-nav a:hover,
.workbench-nav a:focus-visible { background: var(--wb-sidebar-soft); color: #fff; outline: none; }
.workbench-nav a.is-active { position: relative; background: #2b3037; color: #fff; font-weight: 700; }
.workbench-nav a.is-active::before { position: absolute; left: 0; width: 3px; height: 20px; border-radius: 0 2px 2px 0; background: #36c7a9; content: ""; }
.workbench-nav svg { width: 19px; height: 19px; flex: 0 0 auto; }

.workbench-sidebar-account { margin-top: auto; padding: 14px 10px 4px; border-top: 1px solid #30343b; }
.workbench-user { display: flex; align-items: center; gap: 10px; }
.workbench-avatar { display: grid; width: 36px; height: 36px; flex: 0 0 auto; place-items: center; overflow: hidden; border-radius: 50%; background: #303640; color: #fff; font-size: 14px; font-weight: 800; }
.workbench-avatar img { width: 100%; height: 100%; object-fit: cover; }
.workbench-user > span:last-child { min-width: 0; }
.workbench-user strong,
.workbench-user small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.workbench-user strong { color: #f3f5f7; font-size: 13px; }
.workbench-user small { margin-top: 3px; color: #8f97a2; font-size: 11px; }
.workbench-recharge { display: grid; width: 100%; min-height: 34px; margin-top: 11px; place-items: center; border: 1px solid #3b554f; border-radius: 6px; background: #213d38; color: #8ee4cf; font-size: 12px; font-weight: 700; }
.workbench-guest-copy strong,
.workbench-guest-copy small { display: block; }
.workbench-guest-copy strong { font-size: 13px; }
.workbench-guest-copy small { margin-top: 5px; color: #8f97a2; font-size: 11px; line-height: 1.5; }
.workbench-auth-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }
.workbench-auth-actions a { display: grid; min-height: 34px; place-items: center; border: 1px solid #3a3f47; border-radius: 6px; background: #24272e; color: #f3f5f7; font-size: 12px; font-weight: 700; }
.workbench-auth-actions a:last-child { border-color: var(--wb-primary); background: var(--wb-primary); color: #fff; }

.workbench-main { height: 100vh; height: 100svh; margin-left: var(--wb-sidebar-width); overflow-y: auto; background: var(--wb-bg); }
.workbench-mobile-head,
.workbench-mobile-nav { display: none; }
.workbench-topbar { position: sticky; top: 0; z-index: 12; display: flex; min-height: 72px; align-items: center; justify-content: space-between; gap: 20px; padding: 12px 30px; border-bottom: 1px solid var(--wb-line); background: rgba(255,255,255,.94); backdrop-filter: blur(12px); }
.workbench-topbar > div:first-child span,
.workbench-topbar > div:first-child strong { display: block; }
.workbench-topbar > div:first-child span { color: var(--wb-muted); font-size: 11px; }
.workbench-topbar > div:first-child strong { margin-top: 4px; font-size: 15px; }
.workbench-top-actions { display: flex; align-items: center; gap: 9px; }
.workbench-top-actions button,
.workbench-primary-action { display: inline-flex; min-height: 38px; align-items: center; justify-content: center; gap: 7px; padding: 0 14px; border: 1px solid var(--wb-line); border-radius: 7px; background: #fff; color: #4d545e; cursor: pointer; font-size: 13px; font-weight: 700; }
.workbench-top-actions button:hover,
.workbench-top-actions button:focus-visible { border-color: #bac1ca; outline: none; }
.workbench-top-actions button svg { width: 17px; height: 17px; }
.workbench-top-actions .workbench-primary-action { border-color: var(--wb-primary); background: var(--wb-primary); color: #fff; }
.workbench-top-actions .workbench-primary-action:hover,
.workbench-top-actions .workbench-primary-action:focus-visible { border-color: var(--wb-primary-dark); background: var(--wb-primary-dark); }

.workbench-content { width: min(1340px, 100%); margin: 0 auto; padding: 26px 30px 38px; }
.workbench-intro { display: flex; min-height: 154px; align-items: center; justify-content: space-between; gap: 30px; padding: 26px 30px; overflow: hidden; border: 1px solid #d9e0e1; border-radius: 8px; background: #eef6f3; }
.workbench-kicker { display: inline-flex; align-items: center; gap: 7px; color: #53615e; font-size: 12px; font-weight: 700; }
.workbench-kicker i { width: 7px; height: 7px; border-radius: 50%; background: var(--wb-primary); box-shadow: 0 0 0 4px rgba(14,159,137,.12); }
.workbench-intro h1 { margin: 11px 0 8px; color: #18201f; font-size: 32px; line-height: 1.2; }
.workbench-intro p { max-width: 650px; margin: 0; color: #66716f; font-size: 14px; line-height: 1.7; }
.workbench-intro-models { display: flex; min-width: 278px; align-items: center; justify-content: flex-end; }
.workbench-intro-models img { width: 42px; height: 42px; margin-left: -7px; padding: 7px; border: 3px solid #eef6f3; border-radius: 50%; background: #242932; object-fit: contain; }
.workbench-intro-models img:first-child { margin-left: 0; }
.workbench-intro-models span { margin-left: 12px; color: #56615f; font-size: 12px; font-weight: 700; }

.workbench-section { margin-top: 26px; }
.workbench-section-head { display: flex; min-height: 40px; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.workbench-section-head h2 { margin: 0; font-size: 18px; line-height: 1.3; }
.workbench-section-head p { margin: 5px 0 0; color: var(--wb-muted); font-size: 12px; }
.workbench-section-head > a { flex: 0 0 auto; color: var(--wb-primary-dark); font-size: 12px; font-weight: 700; }
.workbench-capability-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 12px; }
.workbench-capability { display: grid; grid-template-columns: 46px minmax(0,1fr) 18px; min-height: 94px; align-items: center; gap: 12px; padding: 16px; border: 1px solid var(--wb-line); border-radius: 8px; background: var(--wb-surface); box-shadow: 0 3px 12px rgba(31,36,43,.035); transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease; }
.workbench-capability:hover,
.workbench-capability:focus-visible { border-color: #c5cbd3; box-shadow: 0 9px 24px rgba(31,36,43,.08); transform: translateY(-2px); outline: none; }
.workbench-capability-icon { display: grid; width: 46px; height: 46px; place-items: center; border-radius: 8px; background: #edf6fb; color: #1689c7; }
.workbench-capability.is-green .workbench-capability-icon { background: #eaf7f1; color: #168b66; }
.workbench-capability.is-orange .workbench-capability-icon { background: #fff3e6; color: #d87819; }
.workbench-capability.is-rose .workbench-capability-icon { background: #fceef1; color: #c85669; }
.workbench-capability-icon svg { width: 23px; height: 23px; }
.workbench-capability-copy { min-width: 0; }
.workbench-capability-copy strong,
.workbench-capability-copy small { display: block; }
.workbench-capability-copy strong { font-size: 15px; }
.workbench-capability-copy small { margin-top: 6px; color: var(--wb-muted); font-size: 11px; line-height: 1.45; }
.workbench-arrow { width: 17px; height: 17px; color: #a3a9b1; }

.workbench-columns { display: grid; grid-template-columns: minmax(0,1.45fr) minmax(300px,.75fr); gap: 26px; }
.workbench-columns > .workbench-section { min-width: 0; }
.workbench-assistant-list { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
.workbench-assistant-list > a { display: grid; grid-template-columns: 40px minmax(0,1fr) 17px; min-height: 76px; align-items: center; gap: 11px; padding: 12px 14px; border: 1px solid var(--wb-line); border-radius: 8px; background: var(--wb-surface); }
.workbench-assistant-list > a:hover,
.workbench-assistant-list > a:focus-visible { border-color: #bfc6ce; outline: none; }
.workbench-assistant-mark { display: grid; width: 40px; height: 40px; place-items: center; border-radius: 50%; background: #242932; color: #fff; font-size: 14px; font-weight: 800; }
.workbench-assistant-list strong,
.workbench-assistant-list small { display: block; }
.workbench-assistant-list strong { font-size: 13px; }
.workbench-assistant-list small { display: -webkit-box; margin-top: 5px; overflow: hidden; color: var(--wb-muted); font-size: 11px; line-height: 1.45; -webkit-box-orient: vertical; -webkit-line-clamp: 1; }
.workbench-assistant-list svg { width: 17px; height: 17px; color: #a3a9b1; }
.workbench-model-grid { display: grid; width: 100%; min-width: 0; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 10px; }
.workbench-model-grid a { display: grid; min-width: 0; min-height: 76px; place-items: center; gap: 5px; padding: 10px 6px; border: 1px solid var(--wb-line); border-radius: 8px; background: var(--wb-surface); color: #525862; font-size: 10px; text-align: center; }
.workbench-model-grid a:hover,
.workbench-model-grid a:focus-visible { border-color: #bfc6ce; color: var(--wb-text); outline: none; }
.workbench-model-grid img { width: 30px; height: 30px; padding: 4px; border-radius: 50%; background: #242932; object-fit: contain; }

.workbench-gallery-grid { display: grid; grid-template-columns: repeat(6,minmax(0,1fr)); gap: 12px; }
.workbench-gallery-grid > a { min-width: 0; }
.workbench-gallery-media { position: relative; display: block; width: 100%; aspect-ratio: 4/3; overflow: hidden; border: 1px solid var(--wb-line); border-radius: 8px; background: #e9ebef; }
.workbench-gallery-media img,
.workbench-gallery-media video { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .2s ease; }
.workbench-gallery-grid > a:hover .workbench-gallery-media img,
.workbench-gallery-grid > a:hover .workbench-gallery-media video { transform: scale(1.035); }
.workbench-gallery-media em { position: absolute; top: 8px; left: 8px; padding: 3px 7px; border-radius: 4px; background: rgba(18,21,26,.76); color: #fff; font-size: 9px; font-style: normal; }
.workbench-play { position: absolute; top: 50%; left: 50%; width: 34px; height: 34px; border-radius: 50%; background: rgba(20,23,28,.76); transform: translate(-50%,-50%); }
.workbench-play::after { position: absolute; top: 10px; left: 13px; width: 0; height: 0; border-top: 7px solid transparent; border-bottom: 7px solid transparent; border-left: 10px solid #fff; content: ""; }
.workbench-gallery-grid > a > strong { display: block; margin-top: 8px; overflow: hidden; color: #414750; font-size: 11px; line-height: 1.45; text-overflow: ellipsis; white-space: nowrap; }
.workbench-gallery-empty { display: grid; grid-template-columns: 72px minmax(0,1fr) auto; min-height: 106px; align-items: center; gap: 16px; padding: 16px; border: 1px dashed #ccd2d9; border-radius: 8px; background: var(--wb-surface); }
.workbench-gallery-empty img { border-radius: 8px; object-fit: cover; }
.workbench-gallery-empty strong { font-size: 14px; }
.workbench-gallery-empty p { margin: 5px 0 0; color: var(--wb-muted); font-size: 12px; }
.workbench-gallery-empty > a { display: grid; min-height: 36px; place-items: center; padding: 0 13px; border: 1px solid var(--wb-primary); border-radius: 6px; color: var(--wb-primary-dark); font-size: 12px; font-weight: 700; }
.workbench-footer { display: flex; min-height: 62px; align-items: center; justify-content: space-between; gap: 20px; margin-top: 30px; border-top: 1px solid var(--wb-line); color: #8a9099; font-size: 11px; }
.workbench-footer > span:last-child { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 12px; }
.workbench-footer a:hover { color: var(--wb-primary-dark); }

@media (max-width: 1180px) {
  .workbench-capability-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .workbench-gallery-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
}

@media (max-width: 940px) {
  body.public-workbench-home { overflow: auto; }
  .workbench-sidebar { display: none; }
  .workbench-main { height: auto; min-height: 100vh; min-height: 100svh; margin-left: 0; overflow: visible; }
  .workbench-mobile-head { position: sticky; top: 0; z-index: 14; display: flex; min-height: 58px; align-items: center; justify-content: space-between; gap: 16px; padding: 10px 16px; border-bottom: 1px solid var(--wb-line); background: rgba(255,255,255,.96); backdrop-filter: blur(12px); }
  .workbench-mobile-brand { min-width: 0; }
  .workbench-mobile-brand strong { overflow: hidden; font-size: 15px; text-overflow: ellipsis; white-space: nowrap; }
  .workbench-mobile-actions { display: flex; min-width: 0; align-items: center; gap: 8px; }
  .workbench-mobile-support { display: grid; width: 34px; height: 34px; flex: 0 0 auto; place-items: center; padding: 0; border: 1px solid var(--wb-line); border-radius: 6px; background: #fff; color: #59616b; }
  .workbench-mobile-support svg { width: 17px; height: 17px; }
  .workbench-mobile-account { max-width: 42%; min-height: 34px; overflow: hidden; padding: 0 12px; border: 1px solid var(--wb-line); border-radius: 6px; background: #fff; color: #414750; font-size: 12px; font-weight: 700; line-height: 32px; text-overflow: ellipsis; white-space: nowrap; }
  .workbench-topbar { display: none; }
  .workbench-content { padding: 18px 16px calc(var(--wb-mobile-nav-height) + 24px); }
  .workbench-intro { min-height: 0; padding: 22px; }
  .workbench-intro h1 { font-size: 28px; }
  .workbench-intro-models { min-width: 230px; }
  .workbench-columns { grid-template-columns: 1fr; gap: 0; }
  .workbench-model-grid { grid-template-columns: repeat(8,minmax(74px,1fr)); overflow-x: auto; padding-bottom: 4px; }
  .workbench-mobile-nav { position: fixed; inset: auto 0 0; z-index: 30; display: grid; height: var(--wb-mobile-nav-height); grid-template-columns: repeat(5,minmax(0,1fr)); padding: 6px max(8px,env(safe-area-inset-right)) max(6px,env(safe-area-inset-bottom)) max(8px,env(safe-area-inset-left)); border-top: 1px solid var(--wb-line); background: rgba(255,255,255,.97); box-shadow: 0 -5px 20px rgba(31,36,43,.06); backdrop-filter: blur(14px); }
  .workbench-mobile-nav a { display: flex; min-width: 0; align-items: center; justify-content: center; flex-direction: column; gap: 3px; border-radius: 6px; color: #7a818b; font-size: 10px; }
  .workbench-mobile-nav a.is-active { color: var(--wb-primary-dark); font-weight: 800; }
  .workbench-mobile-nav svg { width: 20px; height: 20px; }
}

@media (max-width: 680px) {
  .workbench-intro { display: block; }
  .workbench-intro-models { min-width: 0; justify-content: flex-start; margin-top: 18px; }
  .workbench-intro-models img { width: 38px; height: 38px; }
  .workbench-intro h1 { font-size: 26px; }
  .workbench-capability-grid,
  .workbench-assistant-list { grid-template-columns: 1fr; }
  .workbench-capability { min-height: 82px; }
  .workbench-gallery-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .workbench-gallery-empty { grid-template-columns: 56px minmax(0,1fr); }
  .workbench-gallery-empty img { width: 56px; height: 56px; }
  .workbench-gallery-empty > a { grid-column: 1/-1; }
  .workbench-footer { align-items: flex-start; flex-direction: column; justify-content: center; padding: 16px 0; }
  .workbench-footer > span:last-child { justify-content: flex-start; }
}

@media (max-width: 390px) {
  .workbench-top-actions .workbench-primary-action { padding: 0 11px; font-size: 12px; }
  .workbench-content { padding-right: 12px; padding-left: 12px; }
  .workbench-intro { padding: 19px; }
  .workbench-intro-models span { margin-left: 8px; font-size: 10px; }
  .workbench-section-head { align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  .public-workbench-home *,
  .public-workbench-home *::before,
  .public-workbench-home *::after { scroll-behavior: auto !important; transition: none !important; }
}
