/* 营销页 shell + 工作台布局 */
.landing-body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  background: #07071a;
  color: var(--text);
}

.landing-body #particles {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  height: 100dvh;
  z-index: 1;
  pointer-events: none;
}

.landing-body .landing-sidebar,
.landing-body .landing-main {
  position: relative;
  z-index: 2;
}

.landing-body .landing-main {
  background: transparent;
}

/* 首页：深色底 + 三色光斑 + canvas 粒子连线（非静态图片） */
.landing-body--particles-hero {
  position: relative;
  min-height: 0;
  height: 100dvh;
  max-height: 100dvh;
  overflow: hidden;
  background-color: #07071a;
}

html:has(.landing-body--particles-hero),
html:has(.landing-body--fit) {
  height: 100%;
  overflow: hidden;
}

.landing-body--fit {
  height: 100dvh;
  max-height: 100dvh;
  min-height: 0;
  overflow: hidden;
}

.landing-body--particles-hero .landing-sidebar,
.landing-body--fit .landing-sidebar {
  height: 100%;
  max-height: 100%;
  min-height: 0;
  align-self: stretch;
}

.dwai-glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.24;
  z-index: 0;
  pointer-events: none;
}

.dwai-glow-1 {
  width: 560px;
  height: 560px;
  background: #7b2ff7;
  top: -180px;
  left: -120px;
  animation: dwai-bg-float 12s ease-in-out infinite;
}

.dwai-glow-2 {
  width: 480px;
  height: 480px;
  background: #f0308c;
  top: 30%;
  right: -160px;
  animation: dwai-bg-float 15s ease-in-out infinite reverse;
}

.dwai-glow-3 {
  width: 520px;
  height: 520px;
  background: #2f6bff;
  bottom: -160px;
  left: 28%;
  animation: dwai-bg-float 18s ease-in-out infinite;
}

@keyframes dwai-bg-float {
  0%,
  100% {
    transform: translate(0, 0);
  }
  50% {
    transform: translate(40px, -50px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .dwai-glow-1,
  .dwai-glow-2,
  .dwai-glow-3 {
    animation: none;
  }
}

.landing-body--particles-hero .landing-sidebar {
  background: rgba(7, 7, 18, 0.78);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.landing-body .dwai-app-topbar {
  background: transparent;
  border-bottom-color: rgba(255, 255, 255, 0.08);
}

.landing-body--particles-hero .dwai-site-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.28);
  padding-top: 16px;
  margin-top: auto;
  text-shadow: 0 1px 14px rgba(0, 0, 0, 0.75);
}

.landing-main--home-xmax {
  display: flex;
  flex-direction: column;
  min-height: 0;
  flex: 1;
  height: 100%;
  max-height: 100%;
  overflow: hidden;
  padding-top: 12px;
  padding-bottom: 8px;
  /* 主区尽量用满，避免两侧留白过大导致演示块偏小 */
  padding-left: clamp(16px, 2.2vw, 28px);
  padding-right: clamp(16px, 2.2vw, 28px);
}

.landing-body--particles-hero .landing-main--home-xmax .dwai-app-topbar {
  margin-left: calc(-1 * clamp(16px, 2.2vw, 28px));
  margin-right: calc(-1 * clamp(16px, 2.2vw, 28px));
  padding-left: clamp(16px, 2.2vw, 28px);
  padding-right: clamp(16px, 2.2vw, 28px);
}

.dwai-home-hero-row {
  flex: 1;
  align-items: center;
  margin-bottom: 28px;
  min-height: 0;
}

/* 首页：左文右演示，演示区占主区域大部（约 64%） */
.landing-body--particles-hero .dwai-home-hero-row.hero-row {
  width: 100%;
  max-width: min(1720px, 100%);
  margin-left: auto;
  margin-right: auto;
  flex: 1 1 auto;
  min-height: 0;
  margin-bottom: 8px;
  overflow-x: hidden;
  overflow-y: visible;
  /* 左文案加宽以容纳清单单行大字；右演示区仍占主宽 */
  grid-template-columns: minmax(280px, min(42vw, 560px)) minmax(360px, 1fr);
  gap: clamp(20px, 3vw, 48px);
  align-items: stretch;
}

.landing-body--particles-hero .dwai-home-hero-copy,
.landing-body--particles-hero .hero-visual {
  min-height: 0;
}

.landing-body--particles-hero .dwai-home-hero-copy {
  overflow: visible;
}

.landing-body--particles-hero .hero-visual {
  overflow: hidden;
}

.landing-body--particles-hero .hero-visual {
  height: 100%;
}

.landing-body--particles-hero .hero-stage {
  flex: 1 1 auto;
  min-height: 0;
  height: auto;
  aspect-ratio: auto;
}

.landing-body--particles-hero .dwai-home-hero-lead {
  margin-top: 14px;
  font-size: 15px;
  line-height: 1.55;
}

.landing-body--particles-hero .dwai-home-hero-cta-wrap {
  margin-top: 14px;
}

.landing-body--particles-hero .dwai-home-hero-checklist {
  margin-top: 14px;
  gap: 10px;
  padding: 14px 16px;
  font-size: clamp(16px, 1.15vw, 18px);
  line-height: 1.5;
}

.landing-body--particles-hero .dwai-home-hero-checklist li {
  white-space: nowrap;
}

.landing-body--particles-hero .dwai-site-footer {
  flex: 0 0 auto;
  margin-top: 0;
  padding-top: 8px;
}

.dwai-home-hero-copy {
  align-self: start;
  min-width: 0;
}

.dwai-home-hero-copy-inner {
  max-width: 100%;
  font-family:
    'PingFang SC',
    'Microsoft YaHei UI',
    'Noto Sans SC',
    system-ui,
    -apple-system,
    'Segoe UI',
    sans-serif;
}

.dwai-home-hero-title {
  margin: 0;
  font-size: clamp(32px, 4vw, 52px);
  font-weight: 900;
  line-height: 1.12;
  letter-spacing: 0.06em;
  display: flex;
  flex-direction: column;
  gap: 0.28em;
}

/* 与左栏 max 380px 搭配：主标题尽量大（右栏 grid 不变）；略收字距防止 nowrap 溢出 */
.landing-body--particles-hero .dwai-home-hero-title {
  font-size: clamp(32px, 2.85vw + 1.05rem, 42px);
  letter-spacing: 0.02em;
  gap: 0.34em;
  line-height: 1.07;
}

.dwai-home-hero-line {
  display: block;
  color: #eef0ff;
}

/* 渐变必须加在真正有文字的节点上，外层 background-clip 在软件窗口里会把内层字画没 */
.dwai-home-hero-line-main,
.dwai-home-hero-line-sub {
  color: #eef0ff;
  background: linear-gradient(
    118deg,
    #e0e7ff 0%,
    #a5b4fc 14%,
    #818cf8 28%,
    #a855f7 44%,
    #d946ef 60%,
    #ec4899 78%,
    #fef08a 100%
  );
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

/* 首行完整显示「抖微AI美颜摄像头」，避免在「摄像头」等处自动断行 */
.dwai-home-hero-line-main {
  display: block;
  white-space: nowrap;
  letter-spacing: 0.035em;
  font-size: 1em;
  line-height: 1.18;
}

.dwai-home-hero-line-sub {
  display: block;
  margin-top: 0.12em;
  font-size: 0.86em;
  font-weight: 800;
  letter-spacing: 0.045em;
  line-height: 1.28;
  opacity: 0.98;
  white-space: nowrap;
}

@media (max-width: 420px) {
  .dwai-home-hero-title {
    font-size: clamp(22px, 5.6vw, 30px);
  }

  .dwai-home-hero-line-main {
    letter-spacing: 0.05em;
  }

  .dwai-home-hero-line-sub {
    letter-spacing: 0.07em;
  }
}

/* 副标题：加深渐变，与主标题靛紫高光区分，更沉一点更醒目 */
.dwai-home-hero-line--accent {
  font-size: 0.56em;
  font-weight: 600;
  letter-spacing: 0.08em;
  line-height: 1.55;
  margin-top: 0.2em;
  padding-top: 0.75em;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  background: linear-gradient(
    92deg,
    #c4b5fd 0%,
    #a78bfa 16%,
    #c026d3 38%,
    #db2777 62%,
    #e11d48 84%,
    #f472b6 100%
  );
  background-size: 120% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: none;
  box-shadow: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

.dwai-home-hero-lead {
  margin: 28px 0 0;
  max-width: 38em;
  font-size: clamp(16px, 1.6vw, 19px);
  font-weight: 500;
  letter-spacing: 0.055em;
  color: rgba(228, 232, 255, 0.96);
  line-height: 1.82;
  text-shadow: 0 1px 22px rgba(0, 0, 0, 0.42);
}

.dwai-home-hero-cta-wrap {
  position: relative;
  margin-top: 24px;
}

/* 气泡提示（下载 / 接入 API 等）：锚在触发控件上方 */
.dwai-bubble-toast {
  padding: 8px 14px;
  width: max-content;
  max-width: min(100%, calc(100vw - 32px));
  white-space: nowrap;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.35;
  letter-spacing: 0.02em;
  color: rgba(248, 250, 255, 0.95);
  background: linear-gradient(165deg, rgba(28, 22, 48, 0.98), rgba(14, 12, 28, 0.96));
  border: 1px solid rgba(168, 85, 247, 0.45);
  border-radius: 12px;
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(255, 255, 255, 0.07) inset,
    0 -1px 20px rgba(123, 47, 247, 0.15);
  opacity: 0;
  transform: translateX(-50%) translateY(8px) scale(0.96);
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 200;
}

.dwai-download-toast {
  position: absolute;
  bottom: 100%;
  left: 0;
  margin: 0 0 6px 0;
  z-index: 5;
}

#dwaiBubbleToast.dwai-bubble-toast {
  position: fixed;
  left: 0;
  top: 0;
  margin: 0;
}

.dwai-bubble-toast::after,
.dwai-download-toast::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: -6px;
  margin-left: -6px;
  width: 0;
  height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 6px solid rgba(28, 22, 48, 0.98);
  filter: drop-shadow(0 1px 0 rgba(168, 85, 247, 0.35));
}

.dwai-bubble-toast.is-visible,
.dwai-download-toast.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0) scale(1);
}

.dwai-home-hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 0;
  align-items: center;
}

.dwai-home-hero-cta .btn {
  padding: 12px 22px;
  font-size: 15px;
}

.dwai-home-hero-checklist {
  margin: 28px 0 0;
  padding: 18px 18px 18px 16px;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
  font-size: clamp(16px, 1.15vw, 18px);
  line-height: 1.5;
  color: var(--muted);
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(4, 6, 18, 0.35);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.dwai-home-hero-checklist li {
  position: relative;
  padding-left: 1.35em;
  white-space: nowrap;
}

.dwai-home-hero-checklist li::before {
  content: '✅';
  position: absolute;
  left: 0;
  top: 0.05em;
  font-size: 0.95em;
  line-height: 1;
}

#home-features {
  scroll-margin-top: 88px;
}

.dwai-home-hero-title--left {
  text-align: left;
}

.landing-body--particles-hero .hero-visual {
  padding: 0;
  border-radius: 0;
  border: none;
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  box-shadow: none;
  width: 100%;
  min-width: 0;
}

.landing-body--particles-hero .hero-stage {
  background: rgba(0, 0, 0, 0.35);
  border-radius: 32px;
  aspect-ratio: 16 / 9;
  width: 100%;
}

@media (max-width: 960px) {
  .landing-body--particles-hero .dwai-home-hero-row.hero-row {
    grid-template-columns: 1fr;
    max-width: 100%;
  }

  .landing-body--particles-hero .dwai-home-hero-title {
    font-size: clamp(26px, 6.5vw, 38px);
  }

  .landing-body--particles-hero .dwai-home-hero-checklist li,
  .dwai-home-hero-checklist li {
    white-space: normal;
  }
}

@media (prefers-reduced-motion: reduce) {
  .dwai-home-hero-line {
    -webkit-text-fill-color: #eef0ff;
    background: none;
    filter: none;
  }

  .dwai-home-hero-line--accent {
    -webkit-text-fill-color: #c084fc;
    color: #c084fc;
    background: none;
    filter: none;
    box-shadow: none;
    text-shadow: none;
  }

  .dwai-home-hero-line-main,
  .dwai-home-hero-line-sub {
    -webkit-text-fill-color: #eef0ff;
    background: none;
    filter: none;
  }

  .dwai-home-hero-lead {
    text-shadow: none;
  }
}

.landing-sidebar {
  width: 220px;
  flex-shrink: 0;
  background: #111;
  border-right: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  flex-direction: column;
  padding: 20px 0;
  position: sticky;
  top: 0;
  align-self: flex-start;
  min-height: 100vh;
}

.landing-sidebar .brand {
  padding: 0 20px 24px;
  font-weight: 800;
  font-size: 17px;
  letter-spacing: 0.02em;
}

.landing-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 0 12px;
}

.landing-nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  transition: background 0.15s, color 0.15s;
}

.landing-nav a:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
}

.landing-nav a.active {
  color: var(--text);
  background: rgba(255, 255, 255, 0.1);
}

.landing-nav-spacer {
  flex: 1;
  min-height: 24px;
}

.landing-main {
  flex: 1;
  min-width: 0;
  padding: 32px 40px 64px;
}

.landing-topnav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: -32px -40px 32px;
  padding: 14px 0 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background: transparent;
}

.landing-topnav-brand {
  font-weight: 800;
  font-size: 15px;
  letter-spacing: 0.04em;
  opacity: 0.9;
}

@media (max-width: 900px) {
  .landing-body {
    flex-direction: column;
  }
  .landing-sidebar {
    width: 100%;
    min-height: 0;
    position: relative;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    padding: 12px 16px;
  }
  .landing-sidebar .brand {
    padding: 0 8px 0 0;
  }
  .landing-nav {
    flex-direction: row;
    flex-wrap: wrap;
    padding: 0;
    width: 100%;
  }
  .landing-main {
    padding: 20px 16px 48px;
  }

  .landing-topnav {
    margin: -20px 0 20px;
  }
}

.hero-row {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 36px;
  align-items: start;
  margin-bottom: 40px;
}

.hero-visual {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.hero-stage {
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: #0a0a0a;
  aspect-ratio: 16 / 10;
  position: relative;
}

.xmax-demo-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hero-media-hint {
  margin: 0;
  font-size: 13px;
}

.variant-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.variant-chip {
  padding: 8px 13px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  font-size: 12px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.variant-chip:hover {
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.14);
}

.variant-chip.is-on {
  background: rgba(255, 255, 255, 0.12);
  color: var(--text);
  border-color: rgba(123, 47, 247, 0.35);
}

@media (max-width: 960px) {
  .hero-row {
    grid-template-columns: 1fr;
  }
}

.hero-kicker {
  font-size: 13px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 12px;
}

.hero-title {
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 800;
  line-height: 1.2;
  margin: 0 0 16px;
}

.hero-sub {
  color: var(--muted);
  font-size: 16px;
  line-height: 1.6;
  margin: 0 0 24px;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.btn-glass {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text);
  backdrop-filter: blur(12px);
}

.hero-media {
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: #0a0a0a;
  aspect-ratio: 16 / 10;
  position: relative;
}

.hero-media video,
.hero-media .hero-media-fallback {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hero-media-fallback {
  background: linear-gradient(135deg, #1a1030 0%, #0d1628 50%, #1a0a20 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 14px;
  text-align: center;
  padding: 24px;
}

.hero-media-fallback strong {
  color: var(--text);
  display: block;
  margin-bottom: 8px;
}

.feature-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.feature-tab {
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  font-size: 13px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.feature-tab:hover {
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.15);
}

.feature-tab.is-on {
  background: rgba(255, 255, 255, 0.12);
  color: var(--text);
  border-color: rgba(123, 47, 247, 0.35);
}

.feature-panel {
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(18, 20, 42, 0.6);
  overflow: hidden;
}

.feature-panel-inner {
  aspect-ratio: 16 / 9;
  position: relative;
  background: #050508;
}

.feature-panel video,
.feature-panel .feature-panel-fallback {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.feature-panel-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 14px;
}

.feature-caption {
  padding: 14px 18px;
  font-size: 14px;
  color: var(--muted);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.feature-caption strong {
  color: var(--text);
}

.dwai-site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px 24px;
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.22);
  font-size: 13px;
  color: var(--muted);
}

.dwai-site-footer-copy {
  flex: 1 1 auto;
  min-width: 200px;
}

.dwai-site-footer-links {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 0;
  margin-left: auto;
}

.dwai-site-footer-link {
  color: inherit;
  text-decoration: none;
  opacity: 0.92;
}

.dwai-site-footer-link:hover {
  color: var(--text);
}

.dwai-site-footer-sep {
  margin: 0 8px;
  opacity: 0.55;
  user-select: none;
}

@media (max-width: 600px) {
  .dwai-site-footer {
    flex-direction: column;
    align-items: flex-start;
  }

  .dwai-site-footer-links {
    margin-left: 0;
  }
}

/* ----- 工作台（模型页）----- */
.console-sidebar .brand.console-brand {
  display: block;
  text-decoration: none;
  color: var(--text);
}

.landing-nav .nav-muted {
  display: flex;
  align-items: center;
  padding: 10px 12px;
  border-radius: 10px;
  color: rgba(154, 160, 195, 0.45);
  font-size: 14px;
  cursor: default;
  user-select: none;
}

.console-main {
  padding-top: 24px;
}

.console-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin: -24px -40px 20px;
  padding: 12px 40px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.dwai-app-main > .console-topbar {
  margin-left: 0;
  margin-right: 0;
  margin-top: 0;
  padding-left: 0;
  padding-right: 0;
}

.console-topbar-left {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.console-model-badge {
  font-weight: 800;
  font-size: 16px;
}

.console-model-desc {
  font-size: 13px;
  color: var(--muted);
}

.console-work-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
}

.console-tab {
  padding: 8px 18px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  font-size: 14px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.console-tab:hover {
  color: var(--text);
}

.console-tab.is-on {
  color: var(--text);
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(123, 47, 247, 0.35);
}

.console-panels.is-hidden {
  display: none;
}

.console-env-hint {
  margin-top: 0;
  margin-bottom: 16px;
}

.console-env-hint--compact {
  font-size: 12px;
  color: rgba(154, 160, 195, 0.85);
  margin-bottom: 14px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.console-workspace {
  display: grid;
  grid-template-columns: minmax(280px, 0.95fr) minmax(320px, 1.05fr);
  gap: 20px;
  align-items: stretch;
}

.console-workspace--hy {
  grid-template-columns: minmax(300px, 400px) minmax(480px, 1fr);
  gap: 22px;
  align-items: start;
}

@media (max-width: 1100px) {
  .console-workspace {
    grid-template-columns: 1fr;
  }

  .console-workspace--hy {
    grid-template-columns: 1fr;
  }
}

.console-card {
  margin-top: 0 !important;
  background: #141414;
  border-color: rgba(255, 255, 255, 0.08);
}

.console-prompt-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.console-prompt-label {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}

.console-prompt-badge {
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(88, 101, 242, 0.45), rgba(123, 47, 247, 0.5));
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #e8eaff;
}

.console-prompt-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 12px 0 14px;
}

.console-btn-generate {
  margin-left: auto;
  min-width: 112px;
  background: linear-gradient(135deg, #3b5bdb, #7b2ff7 55%, #9d4edd);
  border: none;
  box-shadow: 0 4px 18px rgba(59, 91, 219, 0.35);
}

.console-btn-generate:hover {
  filter: brightness(1.06);
}

@media (max-width: 520px) {
  .console-btn-generate {
    margin-left: 0;
    width: 100%;
    justify-content: center;
  }
}

.console-prompt-field textarea {
  width: 100%;
  min-height: 96px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.35);
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
  line-height: 1.5;
  resize: vertical;
}

.asset-categories {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 16px 0 8px;
}

.asset-categories--official {
  gap: 8px;
  margin: 12px 0 8px;
}

.asset-cat {
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  color: var(--muted);
  border: 1px solid transparent;
}

.asset-categories--official .asset-cat {
  font: inherit;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.08);
  color: var(--muted);
}

.asset-categories--official .asset-cat:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
}

.asset-cat.is-on {
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.1);
}

.asset-categories--official .asset-cat.is-on {
  color: var(--text);
  background: rgba(123, 47, 247, 0.22);
  border-color: rgba(123, 47, 247, 0.45);
}

.asset-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(76px, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.asset-cell-upload--first {
  grid-column: 1;
  grid-row: 1;
}

.asset-cell {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 8px 6px 6px;
  border-radius: 12px;
  border: 2px solid rgba(255, 255, 255, 0.06);
  background: rgba(0, 0, 0, 0.25);
  cursor: pointer;
  color: var(--muted);
  font-size: 11px;
  transition: border-color 0.15s, background 0.15s;
}

/* display:flex 会盖掉 [hidden] 默认的 display:none，导致分类筛选看起来“无效” */
.asset-cell-preset[hidden],
.asset-cell.asset-cell-preset[hidden] {
  display: none !important;
}

.asset-cell:hover {
  border-color: rgba(255, 255, 255, 0.14);
  color: var(--text);
}

.asset-cell.is-selected {
  border-color: rgba(123, 47, 247, 0.6);
  background: rgba(123, 47, 247, 0.12);
  color: var(--text);
}

.asset-cell img {
  width: 64px;
  height: 64px;
  border-radius: 10px;
  object-fit: cover;
}

.asset-cell-cap {
  text-align: center;
  line-height: 1.25;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.asset-cell-upload {
  justify-content: center;
  min-height: 110px;
  cursor: pointer;
}

.asset-plus {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px dashed rgba(255, 255, 255, 0.22);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  color: var(--muted);
}

.console-log-details summary {
  cursor: pointer;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 8px;
}

.console-log-details[open] summary {
  color: var(--text);
}

.dwai-desktop-vcam-box{
  margin:14px 0 0;padding:12px 14px;border-radius:12px;
  border:1px solid rgba(255,255,255,.08);background:rgba(0,0,0,.22);
}
.dwai-desktop-vcam-actions{display:flex;flex-wrap:wrap;align-items:center;gap:10px;margin-top:8px}
.dwai-desktop-vcam-lead{margin:0!important}
.dwai-desktop-vcam-companion{margin-top:6px!important;font-size:12px;opacity:.88;line-height:1.45}
.dwai-desktop-vcam-reg-hint{margin:0;font-size:12px;opacity:.85}
.dwai-desktop-vcam-msg.is-ok{color:#86efac}
.dwai-desktop-vcam-msg.is-err{color:#fca5a5}
.dwai-camera-status{
  display:block;
  clear:both;
  margin:12px 0 0;
  font-size:13px;
  line-height:1.45;
}
.dwai-camera-status.is-ok{color:#c4b5fd}
.dwai-camera-status.is-err{color:#fca5a5}
.console-panel-media {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: none;
  aspect-ratio: auto;
  height: calc(100vh - 292px);
  max-height: calc(100vh - 292px);
  min-height: 0;
  align-self: start;
  overflow: hidden;
  background: #1c1c1c;
}

.landing-body--fit .dwai-app-main--footer {
  height: 100%;
  min-height: 0;
  max-height: 100%;
  overflow: hidden;
  padding-top: 12px;
  padding-bottom: 8px;
}

.landing-body--fit .dwai-app-topbar,
.landing-body--fit .dwai-console-subhead {
  flex: 0 0 auto;
}

.landing-body--fit .dwai-app-topbar {
  margin-bottom: 8px;
}

.landing-body--fit .dwai-console-subhead {
  margin-bottom: 8px !important;
  padding-bottom: 8px !important;
}

.landing-body--fit #panelRealtime {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.landing-body--fit .console-workspace--hy {
  flex: 1 1 auto;
  min-height: 0;
  height: auto;
  align-items: start;
}

.landing-body--fit .console-panel-left {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 292px);
  max-height: calc(100vh - 292px);
  min-height: 0;
  overflow: hidden;
}

.landing-body--fit .console-panel-left > :not(.asset-grid) {
  flex-shrink: 0;
}

.landing-body--fit .console-panel-left .asset-grid {
  flex: 1 1 auto;
  min-height: 0;
  margin-bottom: 10px;
  overflow-y: auto;
  align-content: start;
}

.landing-body--fit .dwai-site-footer {
  flex: 0 0 auto;
  margin-top: 8px;
  padding-top: 8px;
}

.console-panel-media [hidden] {
  display: none !important;
}

.dwai-media-idle {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 28px 20px 36px;
}

.dwai-media-idle .console-media-title {
  margin: 0 0 18px;
  font-size: 14px;
  font-weight: 500;
}

.dwai-media-idle .console-media-hero-btns--compact {
  display: flex;
  justify-content: center;
  gap: 12px;
  width: auto;
  margin: 0 0 22px;
}

.dwai-media-idle .console-media-bigbtn {
  flex-direction: row;
  min-height: 36px;
  width: auto;
  padding: 8px 14px;
  gap: 8px;
  border-radius: 8px;
  background: #2a2a2a;
  box-shadow: none;
}

.dwai-media-idle .console-media-bigbtn-ico {
  width: 16px;
  height: 16px;
  border-radius: 0;
  background: transparent;
}

.dwai-media-idle .console-media-bigbtn.is-on {
  background: #2a2a2a;
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: none;
}

.dwai-media-idle .demo-thumb-note {
  display: flex;
  align-items: center;
  gap: 14px;
  width: min(100%, 520px);
  margin: 0 0 16px;
  color: rgba(255, 255, 255, 0.45);
}

.dwai-media-idle .demo-thumb-note::before,
.dwai-media-idle .demo-thumb-note::after {
  content: "";
  flex: 1;
  height: 1px;
  background: rgba(255, 255, 255, 0.12);
}

.dwai-media-idle .demo-thumb-row {
  width: min(100%, 520px);
  margin: 0;
}

.dwai-media-idle .demo-thumb:nth-child(n + 4) {
  display: none;
}

.dwai-media-idle .demo-thumb span {
  display: none;
}

/* 开播前本地预览轨：插在两个大按钮与示例宫格之间，替代宫格占位 */
.dwai-local-preview-rail {
  width: 100%;
  margin: 0 0 12px;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: #000;
  box-sizing: border-box;
}

.dwai-local-preview-rail .studio-input-preview {
  position: relative;
  left: auto;
  right: auto;
  top: auto;
  width: 100%;
  min-height: 0;
  aspect-ratio: 16 / 9;
  max-height: min(40vh, 380px);
  border: none;
  background: #000;
}

.dwai-local-preview-rail[hidden] {
  display: none !important;
}

/* 打开摄像头后，画面只铺在右侧这一块区域里 */
.console-panel-media.dwai-local-preview-stage,
.console-panel-media.is-media-chrome-hidden {
  display: flex;
  flex-direction: column;
  padding: 10px 10px 10px;
  gap: 8px;
}

.dwai-stage-bar {
  position: relative;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  min-height: 36px;
  z-index: 30;
  pointer-events: auto;
  isolation: isolate;
}

.dwai-stage-bar .dwai-stage-actions,
.dwai-stage-bar .dwai-res-pick {
  position: relative;
  z-index: 31;
  pointer-events: auto;
}

.dwai-stage-btn--vcam:disabled {
  opacity: 0.65;
  cursor: wait;
}

.dwai-stage-btn--vcam:not(:disabled) {
  cursor: pointer;
}

.dwai-res-pick {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-right: auto;
  color: rgba(255, 255, 255, 0.72);
  font-size: 12px;
  white-space: nowrap;
}

.dwai-res-pick select {
  height: 30px;
  padding: 0 8px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: #2a2a2a;
  color: #fff;
  font-size: 12px;
}

.dwai-res-pick select:disabled {
  opacity: 0.55;
}

.dwai-stage-check {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 12px;
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
}

.dwai-stage-check input {
  width: 14px;
  height: 14px;
  margin: 0;
  accent-color: #ff5a6a;
  cursor: pointer;
}

.studio-video-wrap.dwai-hide-local-pip .xmax-dual-host > div > div:first-of-type,
.studio-video-wrap .xmax-dual-host .dwai-local-pip-hidden,
.studio-video-wrap .xmax-dual-host .dwai-extra-preview {
  display: none !important;
}

.dwai-stage-btn--ghost {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
}

.dwai-stage-btn--pip-off {
  border-color: rgba(255, 90, 106, 0.35);
  color: #ffc4cb;
}

.dwai-stage-status {
  flex: 1 1 auto;
  min-width: 0;
  max-width: 48%;
  color: #ffb4b4;
  font-size: 12px;
  line-height: 1.35;
  text-align: right;
  word-break: break-all;
}

.dwai-stage-status.is-ok {
  color: #c9f7d4;
  user-select: text;
  cursor: text;
}

.console-panel-media.dwai-aspect-land .dwai-local-preview-rail,
.console-panel-media.dwai-aspect-land.is-media-chrome-hidden .studio-video-wrap {
  width: 100%;
  height: auto;
  max-height: 100%;
  aspect-ratio: 16 / 9;
  flex: 0 1 auto;
  align-self: center;
}

.console-panel-media.dwai-aspect-port .dwai-local-preview-rail,
.console-panel-media.dwai-aspect-port.is-media-chrome-hidden .studio-video-wrap {
  width: auto;
  height: 100%;
  max-width: 100%;
  aspect-ratio: 9 / 16;
  flex: 0 1 auto;
  align-self: center;
}

.console-panel-media.dwai-local-preview-stage .dwai-local-preview-rail,
.console-panel-media.is-media-chrome-hidden .studio-video-wrap {
  position: relative;
  flex: 1 1 auto;
  inset: auto;
  width: 100%;
  height: auto;
  margin: 0;
  min-height: 0;
  max-height: none;
  border: 0;
  border-radius: 10px;
  overflow: hidden;
}

.console-panel-media.dwai-local-preview-stage .dwai-local-preview-rail .studio-input-preview {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-height: none;
  aspect-ratio: auto;
  min-height: 0;
}

.console-panel-media.dwai-aspect-land.dwai-local-preview-stage .dwai-local-preview-rail,
.console-panel-media.dwai-aspect-land.is-media-chrome-hidden .studio-video-wrap {
  width: 100%;
  height: auto;
  max-height: 100%;
  min-height: 0;
  aspect-ratio: 16 / 9;
  align-self: center;
}

.console-panel-media.dwai-aspect-port.dwai-local-preview-stage .dwai-local-preview-rail,
.console-panel-media.dwai-aspect-port.is-media-chrome-hidden .studio-video-wrap {
  width: auto;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  min-height: 0;
  aspect-ratio: 9 / 16;
  align-self: center;
}

.console-panel-media.dwai-aspect-land .dwai-local-preview-rail .studio-input-preview {
  aspect-ratio: 16 / 9;
  max-height: none;
}

.console-panel-media.dwai-aspect-port .dwai-local-preview-rail .studio-input-preview {
  aspect-ratio: 9 / 16;
  max-height: none;
}

/* 摄像头预览或实时生成中时隐藏：标题+说明、素材说明+宫格；两个大按钮保留 */
.dwai-media-collapse-piece.is-collapsed {
  display: none !important;
}

.console-media-title {
  margin: 0 0 8px;
  font-size: 15px;
  font-weight: 700;
}

.console-media-input-hint {
  margin: 0 0 18px;
  font-size: 13px;
  color: rgba(154, 160, 195, 0.88);
  line-height: 1.5;
}

.console-media-hero-btns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 12px;
}

.console-media-bigbtn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 120px;
  padding: 16px 12px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.35);
  color: var(--muted);
  font: inherit;
  cursor: pointer;
  transition:
    border-color 0.15s,
    background 0.15s,
    color 0.15s;
}

.console-media-bigbtn:hover {
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.04);
}

.console-media-bigbtn.is-on {
  color: var(--text);
  border-color: rgba(88, 101, 242, 0.55);
  background: linear-gradient(165deg, rgba(59, 91, 219, 0.22), rgba(16, 18, 42, 0.85));
  box-shadow: 0 0 0 1px rgba(123, 47, 247, 0.2);
}

.console-media-bigbtn-ico {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
}

.console-media-bigbtn.is-on .console-media-bigbtn-ico {
  background: rgba(88, 101, 242, 0.35);
}

.console-media-bigbtn-label {
  font-size: 14px;
  font-weight: 700;
}

.console-video-file-line {
  display: none;
  align-items: center;
  justify-content: flex-start;
  margin-bottom: 8px;
}

.console-media-library-hint {
  margin-bottom: 8px !important;
}

.btn.btn-block {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  cursor: pointer;
}

.demo-thumb-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 12px 0 8px;
}

.demo-thumb {
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: #0a0a0a;
  font-size: 11px;
  color: var(--muted);
  text-align: center;
}

.demo-thumb-selectable {
  display: block;
  width: 100%;
  padding: 0;
  margin: 0;
  cursor: pointer;
  font: inherit;
  color: inherit;
  text-align: center;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.demo-thumb-selectable:focus-visible {
  outline: 2px solid rgba(123, 47, 247, 0.55);
  outline-offset: 2px;
}

.demo-thumb-selectable.is-selected {
  border-color: rgba(123, 47, 247, 0.55);
  box-shadow: 0 0 0 1px rgba(123, 47, 247, 0.35);
}

.demo-thumb img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  display: block;
}

.demo-thumb span {
  display: block;
  padding: 6px 4px;
}

.demo-thumb-note {
  margin: 8px 0 10px;
  font-size: 12px;
}

.console-preview {
  min-height: 360px;
}

.console-preview--hy {
  flex: 1;
  min-height: min(52vh, 520px);
  margin-top: 6px;
}

.console-soon {
  padding: 28px 22px;
}

@media (max-width: 900px) {
  .console-topbar {
    margin: -12px 0 16px;
    padding: 12px 0;
  }
}

/* Studio */
.studio-grid {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 24px;
  align-items: start;
}

@media (max-width: 960px) {
  .studio-grid {
    grid-template-columns: 1fr;
  }
}

.studio-video-wrap {
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: #050508;
  min-height: 420px;
  overflow: hidden;
  position: relative;
}

.studio-video-wrap .xmax-dual-host {
  position: absolute;
  inset: 0;
  z-index: 3;
  width: 100%;
  min-height: 100%;
}

.studio-video-wrap .xmax-dual-host:empty {
  pointer-events: none;
}

/* 开播后：远端全屏为主，本地摄像头只留右下角一个竖向小窗 */
.studio-video-wrap .xmax-dual-host > div {
  position: relative;
  width: 100%;
  height: 100%;
}

.studio-video-wrap .xmax-dual-host > div > div:first-of-type {
  position: absolute !important;
  z-index: 6;
  overflow: hidden !important;
  inset: auto !important;
  top: auto !important;
  left: auto !important;
  bottom: 16px !important;
  right: 16px !important;
  width: 92px;
  max-width: 28%;
  aspect-ratio: 9 / 16;
  border-radius: 6px;
  box-shadow: 0 6px 28px rgba(0, 0, 0, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: #000;
}

.studio-video-wrap .xmax-dual-host > div > div:first-of-type > div,
.studio-video-wrap .xmax-dual-host > div > div:first-of-type video,
.studio-video-wrap .xmax-dual-host > div > div:first-of-type canvas {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  object-fit: cover !important;
  border-radius: 6px;
}

.studio-video-wrap .xmax-dual-host > div > div:first-of-type video ~ video,
.studio-video-wrap .xmax-dual-host > div > div:first-of-type canvas ~ canvas {
  display: none !important;
}

.studio-video-wrap .xmax-dual-host > div > div:first-of-type::after {
  content: "摄像头";
  position: absolute;
  left: 0;
  bottom: calc(100% + 6px);
  z-index: 2;
  color: #fff;
  font-size: 12px;
  line-height: 1;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.85);
  white-space: nowrap;
}

.studio-video-wrap .xmax-dual-host > div > div:last-of-type {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  z-index: 1;
}

.dwai-stage-badge {
  position: absolute;
  top: 10px;
  left: 12px;
  z-index: 8;
  padding: 2px 7px;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.42);
  color: #fff;
  font-size: 12px;
  line-height: 18px;
}

.dwai-stage-actions {
  display: flex;
  gap: 8px;
  pointer-events: auto;
}

.dwai-stage-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding: 0 12px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(32, 32, 32, 0.92);
  color: #fff;
  font-size: 13px;
  line-height: 1;
  cursor: pointer;
}

.dwai-stage-btn svg {
  display: block;
  flex: 0 0 auto;
}

.dwai-stage-btn--vcam.is-on {
  color: #6ee7b7;
  border-color: rgba(110, 231, 183, 0.45);
}

.dwai-stage-btn--stop {
  background: #ef3b3b;
  border-color: #ef3b3b;
}

.dwai-stage-btn--rec .dwai-rec-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ff4d4f;
  box-shadow: 0 0 0 2px rgba(255, 77, 79, 0.28);
}

.dwai-stage-btn--rec.is-on {
  background: #ef3b3b;
  border-color: #ef3b3b;
}

.dwai-stage-btn--rec.is-on .dwai-rec-dot {
  background: #fff;
  box-shadow: none;
  animation: dwai-rec-blink 1s steps(1) infinite;
}

@keyframes dwai-rec-blink {
  50% { opacity: 0.2; }
}

.console-panel-media.is-media-chrome-hidden {
  padding: 0;
  border: none;
}

@media (max-width: 600px) {
  .studio-video-wrap .xmax-dual-host > div > div:first-of-type {
    bottom: 8px !important;
    right: 8px !important;
    width: 72px;
  }
}

.studio-video-placeholder {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 14px;
  pointer-events: none;
}

.studio-input-preview {
  display: none;
  align-items: stretch;
  justify-content: center;
  box-sizing: border-box;
}

.studio-input-preview.is-visible {
  display: flex;
}

.studio-input-preview video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  background: #000;
}

.studio-log {
  font-family: ui-monospace, Consolas, monospace;
  font-size: 12px;
  color: #a8b0d8;
  background: rgba(0, 0, 0, 0.35);
  border-radius: 10px;
  padding: 12px;
  max-height: 160px;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
}

/* ----- Logged-in global shell (sidebar + top balance) ----- */
.landing-body .dwai-app-sidebar {
  background: rgba(7, 7, 18, 0.78);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.dwai-sidebar-brand {
  display: flex;
  justify-content: flex-start;
  padding: 0 12px 20px 18px;
  font-weight: 800;
  font-size: 16px;
}

.dwai-sidebar-brand-inner {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  width: fit-content;
  max-width: 100%;
  gap: 6px;
}

.dwai-sidebar-brand-top {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

/* 覆盖 .landing-sidebar .brand 的 padding，避免顶栏与导航左缘不齐 */
.landing-sidebar .brand.dwai-sidebar-brand {
  padding: 0 12px 20px 18px;
  text-decoration: none;
  color: inherit;
  box-sizing: border-box;
}

.dwai-sidebar-logo-img {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 9px;
  object-fit: cover;
  display: block;
  box-shadow: 0 0 18px rgba(199, 36, 177, 0.35);
  transition: transform 0.35s ease;
}

.dwai-sidebar-brand:hover .dwai-sidebar-logo-img {
  transform: rotate(6deg) scale(1.06);
}

.dwai-sidebar-brand-line {
  display: block;
  min-width: 0;
}

.dwai-sidebar-brand-tagline {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: rgba(228, 232, 255, 0.98);
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* 首页导航：渐变字 + 扫光 */
.dwai-sidebar-brand-line--strong {
  display: flex;
  align-items: center;
  min-width: 0;
  font-size: clamp(22px, 1.28rem + 0.42vw, 26px);
  font-weight: 900;
  letter-spacing: 0.03em;
  line-height: 1;
  margin: 0;
  padding: 0;
}

.dwai-sidebar-brand-line--strong b {
  display: inline-block;
  font-weight: 900;
  line-height: 1;
  vertical-align: middle;
  background: linear-gradient(
    105deg,
    #6d28ff 0%,
    #a855f7 22%,
    #e879f9 38%,
    #fff 48%,
    #ffd7f5 52%,
    #f0308c 68%,
    #c724b1 85%,
    #6d28ff 100%
  );
  background-size: 280% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: dwai-sidebar-brand-scan 4.5s ease-in-out infinite;
  filter: drop-shadow(0 0 14px rgba(199, 36, 177, 0.4));
}

.dwai-sidebar-brand:hover .dwai-sidebar-brand-line--strong b {
  animation-duration: 3.2s;
}

@keyframes dwai-sidebar-brand-scan {
  0%,
  100% {
    background-position: 120% center;
  }
  50% {
    background-position: -20% center;
  }
}

@media (prefers-reduced-motion: reduce) {
  .dwai-sidebar-brand-line--strong b {
    animation: none;
    background: linear-gradient(135deg, #7b2ff7, #c724b1);
    background-size: 100% 100%;
    filter: drop-shadow(0 0 8px rgba(123, 47, 247, 0.35));
  }
}

.dwai-app-nav .dwai-nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  margin: 0 8px;
  border-radius: 10px;
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  transition: background 0.15s, color 0.15s;
}

.dwai-app-nav .dwai-nav-link:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
}

.dwai-app-nav .dwai-nav-link.active {
  color: var(--text);
  background: rgba(255, 255, 255, 0.1);
}

.nav-ico {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  opacity: 0.88;
}

.nav-ico-sm {
  width: 14px;
  height: 14px;
  opacity: 0.65;
}

.dwai-nav-external {
  justify-content: space-between;
  font-size: 13px;
}

.dwai-nav-link-text {
  flex: 1;
}

.dwai-app-main {
  padding-top: 20px;
}

.dwai-app-main--footer {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.dwai-app-main--footer > .dwai-site-footer {
  margin-top: auto;
}

.dwai-app-topbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
  margin: -20px -40px 20px;
  padding: 8px 40px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.dwai-app-topbar-guest {
  flex-wrap: wrap;
}

.dwai-topbar-pill-muted {
  opacity: 0.65;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}

.dwai-guest-banner {
  margin: 0 0 16px;
}

.dwai-topbar-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px 6px 10px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(123, 47, 247, 0.35), rgba(199, 36, 177, 0.22));
  border: 1px solid rgba(255, 255, 255, 0.12);
  font-weight: 800;
  font-size: 14px;
}

.dwai-topbar-star {
  font-size: 12px;
  opacity: 0.95;
}

.dwai-topbar-user {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  margin: 0;
  padding: 0;
  border-radius: 50%;
  background: #140c22;
  border: 2px solid rgba(196, 140, 255, 0.55);
  overflow: hidden;
  cursor: pointer;
  box-shadow: 0 0 0 4px rgba(123, 47, 247, 0.18);
}

.dwai-topbar-avatar,
.dwai-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.dwai-profile {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 18px;
}

.dwai-profile-avatar {
  position: relative;
  display: block;
  width: 96px;
  height: 96px;
  flex: 0 0 auto;
  border-radius: 50%;
  overflow: hidden;
  cursor: pointer;
  border: 2px solid rgba(196, 140, 255, 0.55);
  box-shadow: 0 0 0 4px rgba(123, 47, 247, 0.18);
  background: #140c22;
}

.dwai-profile-avatar-tip {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 4px 0 6px;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 12px;
  line-height: 1;
  text-align: center;
}

.dwai-topbar-logout {
  font-size: 13px;
  color: var(--muted);
  text-decoration: none;
}

.dwai-topbar-logout:hover {
  color: var(--text);
}

.dwai-page-head {
  margin-bottom: 20px;
}

.dwai-page-title {
  font-size: 22px;
  font-weight: 800;
  margin: 0 0 8px;
}

.dwai-user-id {
  margin: 6px 0 6px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0.01em;
  color: rgba(255, 255, 255, 0.88);
}

.dwai-page-lead {
  margin: 0;
  max-width: 720px;
}

.dwai-card-title {
  margin-top: 0;
  font-size: 16px;
}

.mono-box {
  padding: 12px 14px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 13px;
  white-space: pre-wrap;
  word-break: break-all;
}

.dwai-stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
  margin-bottom: 8px;
}

.dwai-stat-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 16px 18px !important;
}

.dwai-stat-label {
  font-size: 12px;
  color: var(--muted);
}

.dwai-stat-val {
  font-size: 26px;
  font-weight: 800;
}

.dwai-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.dwai-table th {
  color: var(--muted);
  font-weight: 600;
}

.dwai-console-subhead {
  margin: 0 0 16px !important;
  padding: 0 0 14px !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

@media (max-width: 900px) {
  .dwai-app-topbar {
    margin: -12px 0 14px;
    padding: 8px 0 10px;
  }
}

.console-card .buy-plan-name {
  font-size: 28px;
  font-weight: 800;
  line-height: 1.1;
  color: #fff;
}

.console-card .buy-plan-badge {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translate(-50%, -50%);
  padding: 3px 10px;
  font-size: 11px;
  font-weight: 600;
  box-shadow: 0 10px 18px rgba(0, 0, 0, 0.32), 0 2px 8px rgba(255, 122, 60, 0.4);
}

.dwai-usage-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.dwai-usage-total {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
}

.dwai-usage-total span {
  font-size: 12px;
  color: var(--muted);
}

.dwai-usage-total strong {
  font-size: 32px;
  line-height: 1;
  font-weight: 800;
}

.dwai-usage-card {
  padding: 22px 18px 16px !important;
}

.dwai-usage-chart {
  display: grid;
  grid-template-columns: repeat(24, minmax(0, 1fr));
  gap: 6px;
  min-height: 280px;
  padding: 36px 4px 0;
}

.dwai-usage-col {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  min-height: 250px;
  outline: none;
}

.dwai-usage-track {
  width: 100%;
  max-width: 28px;
  height: 190px;
  display: flex;
  align-items: flex-end;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.dwai-usage-bar {
  position: relative;
  width: 100%;
  min-height: 0;
  border-radius: 6px 6px 2px 2px;
  background: linear-gradient(180deg, #b388ff 0%, #7c4dff 100%);
}

.dwai-usage-col:hover .dwai-usage-bar,
.dwai-usage-col:focus .dwai-usage-bar {
  filter: brightness(1.12);
}

.dwai-usage-num {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 4px);
  transform: translateX(-50%);
  font-size: 12px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.82);
  white-space: nowrap;
}

.dwai-usage-tick {
  margin-top: 8px;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.42);
  white-space: nowrap;
}

.dwai-usage-tip {
  display: none;
  position: absolute;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%);
  z-index: 3;
  min-width: 128px;
  padding: 8px 10px;
  border-radius: 10px;
  background: #2a2a2e;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35);
  text-align: left;
}

.dwai-usage-col:hover .dwai-usage-tip,
.dwai-usage-col:focus .dwai-usage-tip,
.dwai-usage-col:focus-within .dwai-usage-tip {
  display: block;
}

.dwai-usage-tip b {
  display: block;
  margin-bottom: 4px;
  font-size: 12px;
  font-weight: 700;
}

.dwai-usage-tip span {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.82);
}

.dwai-usage-tip i,
.dwai-usage-legend i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #7c4dff;
  display: inline-block;
}

.dwai-usage-legend {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 14px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.62);
}
