﻿:root {
  --bg: #edf2f4;
  --panel: #ffffff;
  --panel-soft: #f8f9f8;
  --ink: #111714;
  --muted: #7a817d;
  --line: #e7e9e7;
  --line-dark: #d8ddd9;
  --green: #08c766;
  --green-deep: #00ae57;
  --cyan: #35e8ff;
  --blue: #5f7cff;
  --sidebar: #050b0d;
  --sidebar-soft: #0d1518;
  --shadow: 0 24px 60px rgba(47, 61, 69, 0.16);
  --soft-shadow: 0 18px 50px rgba(15, 25, 30, 0.1);
  --hero-cn-display: "HarmonyOS Sans SC", "MiSans", "Alibaba PuHuiTi 3.0", "PingFang SC", "SF Pro SC", "Source Han Sans SC", "Hiragino Sans GB", "Noto Sans SC", "DengXian", "Microsoft YaHei UI", "Microsoft YaHei", system-ui, sans-serif;
  --hero-cn-display-alt: "HarmonyOS Sans SC", "Alibaba PuHuiTi 3.0", "MiSans", "PingFang SC", "SF Pro SC", "Source Han Sans SC", "Hiragino Sans GB", "Noto Sans SC", "DengXian", "Microsoft YaHei UI", "Microsoft YaHei", system-ui, sans-serif;
  --hero-cn-display-serif: "Source Han Serif SC", "Noto Serif SC", "Songti SC", "STZhongsong", "STSong", "Hiragino Serif GB", "Noto Serif CJK SC", "Source Han Serif CN", var(--hero-cn-display);
  --hero-cn-display-premium: "HarmonyOS Sans SC", "MiSans", "Alibaba PuHuiTi 3.0", "Source Han Sans SC", "Noto Sans SC", "PingFang SC", "SF Pro SC", "Hiragino Sans GB", "DengXian", "Microsoft YaHei UI", "Microsoft YaHei", system-ui, sans-serif;
  --hero-cn-display-luxe: "MiSans", "HarmonyOS Sans SC", "Alibaba PuHuiTi 3.0", "Source Han Sans SC", "Noto Sans SC", "PingFang SC", "SF Pro SC", "Hiragino Sans GB", "DengXian", "Microsoft YaHei UI", "Microsoft YaHei", system-ui, sans-serif;
  --hero-cn-display-modern: "MiSans", "HarmonyOS Sans SC", "Source Han Sans SC", "Alibaba PuHuiTi 3.0", "PingFang SC", "SF Pro SC", "Hiragino Sans GB", "Noto Sans SC", "DengXian", "Microsoft YaHei UI", "Microsoft YaHei", system-ui, sans-serif;
  --hero-cn-display-refined: "MiSans", "HarmonyOS Sans SC", "Source Han Sans SC", "Noto Sans SC", "Alibaba PuHuiTi 3.0", "PingFang SC", "Hiragino Sans GB", "DengXian", "Microsoft YaHei UI", "Microsoft YaHei", system-ui, sans-serif;
  --hero-cn-display-airy: "MiSans", "HarmonyOS Sans SC", "PingFang SC", "SF Pro SC", "Source Han Sans SC", "Alibaba PuHuiTi 3.0", "Noto Sans SC", "Hiragino Sans GB", "DengXian", "Microsoft YaHei UI", "Microsoft YaHei", system-ui, sans-serif;
  --hero-cn-display-scene: "HarmonyOS Sans SC", "MiSans", "Alibaba PuHuiTi 3.0", "PingFang SC", "SF Pro SC", "Source Han Sans SC", "Noto Sans SC", "Microsoft YaHei UI", "DengXian", "Microsoft YaHei", system-ui, sans-serif;
  --hero-cn-text-scene: "MiSans", "HarmonyOS Sans SC", "PingFang SC", "Source Han Sans SC", "Noto Sans SC", "SF Pro Text", "DengXian", "Microsoft YaHei UI", "Microsoft YaHei", system-ui, sans-serif;
  --hero-cn-text: "Source Han Sans SC", "Noto Sans SC", "HarmonyOS Sans SC", "MiSans", "PingFang SC", "SF Pro Text", "SF Pro SC", "Hiragino Sans GB", "DengXian", "Microsoft YaHei UI", "Microsoft YaHei", system-ui, sans-serif;
  --hero-cn-title-mist: "Alibaba PuHuiTi 3.0", "HarmonyOS Sans SC", "MiSans", "PingFang SC", "Source Han Sans SC", "Noto Sans SC", "Microsoft YaHei UI", "DengXian", "Microsoft YaHei", system-ui, sans-serif;
  --hero-cn-title-atmosphere: "HarmonyOS Sans SC", "MiSans", "Alibaba PuHuiTi 3.0", "OPPOSans", "PingFang SC", "SF Pro SC", "Source Han Sans SC", "Noto Sans SC", "DengXian", "Microsoft YaHei UI", "Microsoft YaHei", system-ui, sans-serif;
  --hero-cn-title-soft: "HarmonyOS Sans SC", "MiSans", "Alibaba PuHuiTi 3.0", "PingFang SC", "SF Pro SC", "Source Han Sans SC", "Noto Sans SC", "DengXian", "Microsoft YaHei UI", "Microsoft YaHei", system-ui, sans-serif;
  --hero-cn-copy-atmosphere: "HarmonyOS Sans SC", "MiSans", "PingFang SC", "Alibaba PuHuiTi 3.0", "SF Pro SC", "Source Han Sans SC", "Noto Sans SC", "DengXian", "Microsoft YaHei UI", "Microsoft YaHei", system-ui, sans-serif;
  --hero-cn-display-mist: "MiSans", "HarmonyOS Sans SC", "PingFang SC", "Alibaba PuHuiTi 3.0", "Source Han Sans SC", "Noto Sans SC", "Microsoft YaHei UI", "DengXian", "Microsoft YaHei", system-ui, sans-serif;
  --hero-cn-copy-mist: "PingFang SC", "SF Pro Text", "HarmonyOS Sans SC", "Source Han Sans SC", "MiSans", "Noto Sans SC", "Hiragino Sans GB", "Microsoft YaHei UI", "DengXian", "Microsoft YaHei", system-ui, sans-serif;
  --hero-cn-title-smoke: "MiSans", "HarmonyOS Sans SC", "Alibaba PuHuiTi 3.0", "PingFang SC", "Source Han Sans SC", "Microsoft YaHei UI", "Microsoft YaHei", "Noto Sans SC", "OPPOSans", "SF Pro Display", "SF Pro SC", system-ui, sans-serif;
  --hero-cn-copy-smoke: "MiSans", "HarmonyOS Sans SC", "PingFang SC", "Source Han Sans SC", "Microsoft YaHei UI", "Microsoft YaHei", "Noto Sans SC", "Alibaba PuHuiTi 3.0", "SF Pro Text", "SF Pro SC", system-ui, sans-serif;
  --hero-cn-action-smoke: "MiSans", "HarmonyOS Sans SC", "Alibaba PuHuiTi 3.0", "PingFang SC", "Source Han Sans SC", "Microsoft YaHei UI", "Microsoft YaHei", "Noto Sans SC", "SF Pro Text", "SF Pro SC", system-ui, sans-serif;
}

.workbench.module-mode[data-module="PS 在线工具"] > .app-header {
  display: none;
}

.workbench.app-mode.module-mode[data-module="PS 在线工具"] {
  grid-template-rows: minmax(0, 1fr);
  min-height: 0;
}

.ps-tools-view {
  min-height: 100%;
  padding: clamp(28px, 4vw, 52px);
  background:
    radial-gradient(circle at 8% 0%, rgba(24, 132, 91, 0.2), transparent 34%),
    #030b0d;
  color: #edf9f2;
}

.ps-tools-view[hidden] {
  display: none;
}

.ps-tools-header,
.vectorizer-grid {
  width: min(1120px, 100%);
  margin-inline: auto;
}

.ps-tools-header span {
  color: #79dba9;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.14em;
}

.ps-tools-header h2 {
  margin: 10px 0 8px;
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.1;
}

.ps-tools-header p {
  max-width: 680px;
  margin: 0;
  color: rgba(225, 242, 233, 0.68);
  line-height: 1.7;
}

.vectorizer-grid {
  display: grid;
  grid-template-columns: minmax(280px, 0.75fr) minmax(0, 1.25fr);
  gap: 18px;
  margin-top: 28px;
}

.vectorize-form,
.vector-preview-grid {
  border: 1px solid rgba(189, 238, 212, 0.14);
  border-radius: 16px;
  background: rgba(9, 23, 21, 0.88);
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.25);
}

.vectorize-form {
  display: grid;
  align-content: start;
  gap: 16px;
  padding: 20px;
}

.vector-upload-zone {
  display: grid;
  min-height: 210px;
  place-items: center;
  align-content: center;
  gap: 8px;
  padding: 24px;
  border: 1px dashed rgba(121, 219, 169, 0.48);
  border-radius: 12px;
  background: rgba(92, 191, 139, 0.055);
  cursor: pointer;
  text-align: center;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.vector-upload-zone:hover,
.vector-upload-zone.is-dragging,
.vector-upload-zone.has-file {
  border-color: #79dba9;
  background: rgba(92, 191, 139, 0.12);
}

.vector-upload-zone.is-dragging {
  transform: translateY(-2px);
}

.vector-upload-zone:focus-visible {
  outline: 3px solid rgba(121, 219, 169, 0.5);
  outline-offset: 3px;
}

.vector-upload-zone .ti {
  font-size: 34px;
  color: #79dba9;
}

.vector-upload-zone strong {
  font-size: 15px;
}

.vector-upload-zone span,
.vector-file-summary,
.vectorize-status {
  color: rgba(225, 242, 233, 0.62);
  font-size: 12px;
}

.vector-file-summary,
.vectorize-status {
  min-height: 18px;
  margin: 0;
  overflow-wrap: anywhere;
}

.vector-preset-field {
  display: grid;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
}

.vector-preset-field select {
  width: 100%;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid rgba(189, 238, 212, 0.18);
  border-radius: 10px;
  background: #0c1d1a;
  color: #edf9f2;
}

.vector-preset-tip {
  margin: -2px 0 0;
  color: rgba(225, 242, 233, 0.58);
  font-size: 11px;
  line-height: 1.55;
}

#vectorizeButton,
.vector-download {
  display: inline-grid;
  min-height: 44px;
  place-items: center;
  padding: 0 18px;
  border: 0;
  border-radius: 10px;
  background: #5cbf8b;
  color: #02100a;
  font-weight: 800;
  text-decoration: none;
}

#vectorizeButton:disabled {
  cursor: not-allowed;
  opacity: 0.42;
}

.vectorize-status[data-state="error"] {
  color: #ff9f9f;
}

.vectorize-status[data-state="success"] {
  color: #79dba9;
}

.vector-preview-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  padding: 18px;
}

.vector-preview-grid figure {
  display: grid;
  min-width: 0;
  align-content: start;
  gap: 10px;
  margin: 0;
}

.vector-preview-grid figcaption {
  font-size: 13px;
  font-weight: 800;
}

.vector-preview-frame {
  display: grid;
  min-height: 340px;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(189, 238, 212, 0.12);
  border-radius: 12px;
  background-color: #eff4f1;
  background-image:
    linear-gradient(45deg, #dfe8e3 25%, transparent 25%),
    linear-gradient(-45deg, #dfe8e3 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #dfe8e3 75%),
    linear-gradient(-45deg, transparent 75%, #dfe8e3 75%);
  background-position: 0 0, 0 10px, 10px -10px, -10px 0;
  background-size: 20px 20px;
  color: #66756e;
  text-align: center;
}

.vector-preview-frame img {
  display: block;
  width: 100%;
  height: 100%;
  max-height: 440px;
  object-fit: contain;
}

.vector-preview-frame img[hidden],
.vector-download[hidden] {
  display: none;
}

@media (max-width: 900px) {
  .vectorizer-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .vector-upload-zone {
    min-height: 170px;
  }
}

@media (max-width: 640px) {
  .ps-tools-view {
    padding: 24px 14px max(24px, env(safe-area-inset-bottom));
  }

  .vector-preview-grid {
    grid-template-columns: minmax(0, 1fr);
    padding: 14px;
  }

  .vector-preview-frame {
    min-height: 260px;
  }
}

* {
  box-sizing: border-box;
}

html {
  height: 100%;
}

body {
  margin: 0;
  overflow-x: hidden;
  background:
    linear-gradient(120deg, rgba(255, 255, 255, 0.9), rgba(238, 246, 248, 0.9) 42%, rgba(244, 247, 251, 0.96)),
    repeating-linear-gradient(135deg, rgba(17, 23, 20, 0.025) 0 1px, transparent 1px 18px);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei UI", "Microsoft YaHei", "Noto Sans SC", system-ui, sans-serif;
}

body.billing-visible {
  overflow: hidden;
}

button,
textarea,
select {
  font: inherit;
}

button {
  cursor: pointer;
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease, background 0.22s ease, color 0.22s ease;
}

button:hover {
  transform: translateY(-1px);
}

button:active {
  transform: translateY(0);
}

.prototype-frame {
  display: grid;
  min-height: 100dvh;
  padding: 0;
}

.desktop-app {
  display: grid;
  grid-template-columns: clamp(150px, 12vw, 220px) minmax(0, 1fr);
  overflow: hidden;
  width: 100%;
  height: 100dvh;
  min-height: 0;
  border: 0;
  border-radius: 0;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 34px;
  padding: 42px 14px 18px;
  background:
    linear-gradient(155deg, rgba(53, 232, 255, 0.08), transparent 30%),
    linear-gradient(180deg, #03080a, #081012 58%, #03080a);
  color: #f4fff8;
  box-shadow: inset -1px 0 0 rgba(255, 255, 255, 0.08);
}

.brand,
.nav-item,
.user-card {
  display: flex;
  align-items: center;
}

.brand {
  gap: 10px;
  min-width: 0;
  padding: 0 12px;
  color: inherit;
  text-decoration: none;
}

.brand > span:last-child {
  min-width: 0;
}

.spark-mark {
  display: inline-grid;
  width: 28px;
  height: 28px;
  place-items: center;
  color: var(--green);
  font-size: 28px;
  line-height: 1;
  filter: drop-shadow(0 0 16px rgba(8, 199, 102, 0.5));
  animation: sparkPulse 3.4s ease-in-out infinite;
}

.brand strong {
  display: block;
  font-size: 17px;
  line-height: 1;
  white-space: nowrap;
}

.brand small {
  display: block;
  margin-top: 6px;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0;
}

.nav-list {
  display: grid;
  gap: 16px;
}

.nav-item {
  position: relative;
  gap: 12px;
  width: 100%;
  height: 44px;
  padding: 0 12px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: rgba(255, 255, 255, 0.78);
  text-align: left;
  font-size: 13px;
}

.nav-item::before {
  position: absolute;
  top: 9px;
  bottom: 9px;
  left: 0;
  width: 2px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--cyan), var(--green));
  opacity: 0;
  content: "";
  transition: opacity 0.22s ease, transform 0.22s ease;
  transform: scaleY(0.4);
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.07);
  color: #fff;
}

.nav-item.active {
  background: linear-gradient(90deg, rgba(53, 232, 255, 0.16), rgba(8, 199, 102, 0.14));
  color: #d9ffe6;
  font-weight: 800;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.07), 0 10px 24px rgba(0, 0, 0, 0.16);
}

.nav-item.active::before {
  opacity: 1;
  transform: scaleY(1);
}

.sidebar-actions {
  display: grid;
  gap: 9px;
  padding: 9px;
  border: 1px solid rgba(120, 255, 197, 0.1);
  border-radius: 18px;
  background:
    radial-gradient(circle at 18% 0%, rgba(8, 199, 102, 0.14), transparent 48%),
    rgba(255, 255, 255, 0.035);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 16px 34px rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(16px);
}

.plan-card {
  margin-top: auto;
  padding: 14px 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(18px);
}

.plan-card + .sidebar-actions {
  margin-top: -22px;
}

.sidebar-actions + .user-card {
  margin-top: -18px;
}

.plan-card strong {
  color: #94ffb8;
  font-size: 12px;
}

.plan-card span,
.plan-card em,
.user-card small {
  color: rgba(255, 255, 255, 0.54);
  font-size: 10px;
  font-style: normal;
}

.plan-card b {
  display: block;
  margin: 10px 0 8px;
  font-size: 18px;
}

.quota-track {
  overflow: hidden;
  height: 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
}

.quota-track i {
  display: block;
  width: 58%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #d8ff80, #33d06d);
}

.plan-card button {
  width: 100%;
  height: 32px;
  margin-top: 14px;
  border: 0;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-size: 12px;
}

.user-card {
  gap: 9px;
}

.user-avatar {
  position: relative;
  display: inline-block;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  overflow: hidden;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background:
    radial-gradient(circle at 30% 24%, rgba(255, 255, 255, 0.95) 0 8%, transparent 9%),
    linear-gradient(135deg, var(--avatar-a), var(--avatar-b) 58%, var(--avatar-c));
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.06), 0 10px 24px rgba(0, 0, 0, 0.32);
}

.user-avatar::before,
.user-avatar::after {
  position: absolute;
  content: "";
}

.user-avatar::before {
  inset: 9px;
  border: 2px solid rgba(255, 255, 255, 0.72);
  border-radius: 50%;
}

.user-avatar::after {
  right: 8px;
  bottom: 8px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.86);
}

.user-avatar-admin {
  --avatar-a: #96ffd6;
  --avatar-b: #10c873;
  --avatar-c: #043828;
}

.user-avatar-admin::before {
  inset: 10px;
  border-radius: 5px;
  transform: rotate(45deg);
}

.user-avatar-subadmin {
  --avatar-a: #9eeaff;
  --avatar-b: #6f83ff;
  --avatar-c: #20245c;
}

.user-avatar-subadmin::before {
  inset: 8px;
  border-radius: 8px 50% 50% 8px;
  transform: rotate(-28deg);
}

.user-avatar-user {
  --avatar-a: #fff1b8;
  --avatar-b: #f0ad34;
  --avatar-c: #4a2509;
}

.user-avatar-guest {
  --avatar-a: #e4efe9;
  --avatar-b: #889990;
  --avatar-c: #202b26;
}

.user-avatar-guest::before {
  inset: 10px;
  border-style: dashed;
}

.user-card strong {
  display: block;
  font-size: 13px;
}

.login-open-button {
  flex: 0 0 auto;
  width: 100%;
  height: 40px;
  padding: 0 14px;
  border: 1px solid rgba(102, 255, 190, 0.22);
  border-radius: 13px;
  background: linear-gradient(135deg, rgba(8, 199, 102, 0.28), rgba(53, 232, 255, 0.1));
  color: #ecfff8;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 10px 24px rgba(8, 199, 102, 0.12);
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.profile-center-button {
  width: 100%;
  height: 38px;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.05);
  color: rgba(240, 255, 250, 0.92);
  font-size: 12px;
  font-weight: 800;
}

.login-open-button:hover,
.login-open-button:focus-visible,
.profile-center-button:hover,
.profile-center-button:focus-visible {
  border-color: rgba(120, 255, 197, 0.44);
  background: linear-gradient(135deg, rgba(8, 199, 102, 0.38), rgba(53, 232, 255, 0.16));
  transform: translateY(-1px);
}

.language-select {
  width: 100%;
  height: 38px;
  padding: 0 34px 0 13px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 13px;
  appearance: none;
  background:
    linear-gradient(45deg, transparent 50%, rgba(236, 255, 248, 0.92) 50%) right 15px top 15px / 7px 7px no-repeat,
    linear-gradient(135deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.035));
  color: rgba(240, 255, 250, 0.9);
  font-size: 12px;
  font-weight: 800;
  outline: 0;
  cursor: pointer;
  transition: border-color 0.18s ease, background-color 0.18s ease;
}

.language-select:hover,
.language-select:focus-visible {
  border-color: rgba(120, 255, 197, 0.34);
  background-color: rgba(255, 255, 255, 0.04);
}

.login-open-button:focus-visible,
.profile-center-button:focus-visible,
.language-select:focus-visible {
  outline: 0;
  box-shadow: 0 0 0 3px rgba(8, 199, 102, 0.2);
}

.login-open-button:focus-visible,
.language-select:focus-visible {
  outline: 0;
  box-shadow: 0 0 0 3px rgba(8, 199, 102, 0.2);
}

.language-select option {
  color: #121a16;
}

.admin-open-button {
  border-color: rgba(53, 232, 255, 0.24);
  background: linear-gradient(135deg, rgba(53, 232, 255, 0.18), rgba(8, 199, 102, 0.12));
  color: #f0fffb;
}

.admin-nav-entry[hidden] {
  display: none;
}

.admin-nav-entry.is-available {
  border: 1px solid rgba(53, 232, 255, 0.2);
  background: linear-gradient(90deg, rgba(53, 232, 255, 0.12), rgba(8, 199, 102, 0.08));
}

.workbench {
  position: relative;
  display: grid;
  grid-template-rows: 174px minmax(0, 1fr) clamp(112px, 14vh, 148px);
  overflow: hidden;
  min-width: 0;
  background:
    radial-gradient(circle at 78% 12%, rgba(53, 232, 255, 0.18), transparent 28%),
    radial-gradient(circle at 18% 18%, rgba(8, 199, 102, 0.14), transparent 30%),
    linear-gradient(120deg, rgba(250, 253, 253, 0.98), rgba(242, 248, 249, 0.98)),
    repeating-linear-gradient(90deg, rgba(10, 18, 20, 0.025) 0 1px, transparent 1px 44px);
}

.workbench.module-mode {
  grid-template-rows: 82px minmax(0, 1fr);
}

.workbench.home-mode {
  grid-template-rows: minmax(0, 1fr);
  background: #050505;
}

.category-tabs {
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
  gap: 12px 18px;
  padding: 18px;
  border-radius: 0;
  background: #070707;
}

.app-header {
  display: grid;
  grid-template-rows: auto 1fr;
  min-height: 0;
}

.category-tab {
  min-width: 88px;
  height: 44px;
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  background: #3c3c3c;
  color: rgba(255, 255, 255, 0.9);
  font-size: 15px;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.category-tab:hover,
.category-tab.active {
  background: linear-gradient(135deg, #14c76e, #08a86c);
  color: #ffffff;
}

.workbench.home-mode .app-header,
.workbench.home-mode .console-grid,
.workbench.home-mode .module-view,
.workbench.home-mode .results-row {
  display: none;
}

.workbench.home-mode .first-screen-hero {
  display: grid;
  min-height: 100dvh;
  margin: 0;
}

.workbench.app-mode .first-screen-hero {
  display: none;
}

.app-header,
.first-screen-hero,
.console-grid,
.module-view,
.results-row {
  position: relative;
  z-index: 1;
}

.workbench.module-mode .app-header {
  grid-template-rows: 82px;
}

.workbench.module-mode .category-tabs {
  display: none;
}

.category-tabs[hidden],
.runtime-status-bar[hidden],
.console-grid[hidden],
.results-row[hidden] {
  display: none !important;
}

.workbench.module-mode .console-grid,
.workbench.module-mode .results-row {
  display: none !important;
}

.workbench.module-mode .first-screen-hero {
  display: none;
}

.dithering-card-hero {
  align-items: center;
  justify-items: center;
  padding: 0;
  background: #050505;
}

.hero-dithering-card {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  max-width: none;
  min-height: 100%;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background: #080808;
  box-shadow: none;
  isolation: isolate;
}

.hero-gradient-base,
.hero-gradient-breath,
.hero-smoke-layer {
  position: absolute;
  z-index: 0;
  pointer-events: none;
  will-change: transform, opacity;
}

.hero-gradient-base,
.hero-gradient-breath {
  inset: -20%;
  transform: translate3d(-2%, -1%, 0) scale(1.04);
}

.hero-gradient-base {
  background:
    radial-gradient(circle at 50% 45%, rgba(255, 255, 255, 0.05), transparent 36%),
    linear-gradient(135deg, #120504 0%, #06110f 48%, #100717 100%);
  opacity: 1;
}

.hero-gradient-breath {
  background:
    radial-gradient(circle at 26% 34%, rgba(255, 55, 136, 0.22), transparent 42%),
    radial-gradient(circle at 70% 34%, rgba(76, 132, 255, 0.2), transparent 40%),
    radial-gradient(circle at 50% 72%, rgba(38, 214, 166, 0.18), transparent 46%);
  opacity: 0.28;
  animation: heroGradientBreath 24s ease-in-out infinite;
}

.hero-smoke-layer {
  width: 62vmax;
  aspect-ratio: 1;
  border-radius: 999px;
  filter: blur(42px);
  mix-blend-mode: screen;
  opacity: 0.52;
  transform: translate3d(0, 0, 0) scale(1);
}

.smoke-ember {
  left: -24%;
  top: -18%;
  background: radial-gradient(circle at 44% 46%, rgba(255, 88, 28, 0.82), rgba(255, 110, 42, 0.22) 34%, transparent 68%);
  animation: heroSmokeFloatA 31s ease-in-out infinite alternate;
}

.smoke-mint {
  right: -24%;
  top: -16%;
  width: 60vmax;
  background: radial-gradient(circle at 52% 48%, rgba(26, 224, 181, 0.72), rgba(38, 202, 177, 0.18) 35%, transparent 70%);
  animation: heroSmokeFloatB 37s ease-in-out -8s infinite alternate;
}

.smoke-violet {
  left: 16%;
  bottom: -28%;
  width: 68vmax;
  background: radial-gradient(circle at 50% 50%, rgba(134, 86, 255, 0.78), rgba(110, 74, 224, 0.18) 38%, transparent 72%);
  animation: heroSmokeFloatC 43s ease-in-out -16s infinite alternate;
}

.smoke-rose {
  right: -10%;
  bottom: -22%;
  width: 54vmax;
  background: radial-gradient(circle at 50% 50%, rgba(255, 54, 139, 0.62), rgba(244, 70, 132, 0.16) 34%, transparent 68%);
  animation: heroSmokeFloatB 35s ease-in-out -20s infinite alternate-reverse;
}

.smoke-gold {
  left: 30%;
  top: 18%;
  width: 48vmax;
  background: radial-gradient(circle at 52% 48%, rgba(255, 191, 86, 0.42), rgba(255, 123, 42, 0.12) 32%, transparent 66%);
  opacity: 0.34;
  animation: heroSmokeFloatA 39s ease-in-out -12s infinite alternate-reverse;
}

.hero-dither-field {
  position: absolute;
  inset: -10%;
  z-index: 1;
  width: 120%;
  height: 120%;
  opacity: 0.34;
  mix-blend-mode: soft-light;
  transform: translate3d(-4%, -3%, 0) scale(1.06);
  animation: heroDitherFlow 28s ease-in-out infinite alternate;
  will-change: transform;
}

.hero-dither-canvas {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  opacity: 0.32;
  mix-blend-mode: soft-light;
  pointer-events: none;
  will-change: opacity;
}

.hero-dithering-card.has-canvas .hero-dither-field {
  display: none;
}

.hero-dither-field .dither-solid {
  fill: rgba(255, 248, 236, 0.08);
}

.hero-dither-field .dither-dots {
  fill: url("#heroDotPattern");
  opacity: 0.62;
  animation: heroDitherBreath 10s ease-in-out infinite;
  will-change: opacity;
}

.hero-dithering-card::after {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    radial-gradient(ellipse at 50% 52%, transparent 0 42%, rgba(5, 5, 5, 0.06) 68%, rgba(5, 5, 5, 0.24) 100%),
    linear-gradient(90deg, rgba(5, 5, 5, 0.08), transparent 24%, transparent 78%, rgba(5, 5, 5, 0.1));
  content: "";
  pointer-events: none;
}

.hero-dither-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 920px;
  padding: clamp(16px, 2.9vh, 34px) 32px 0;
  font-family: var(--hero-cn-copy-smoke);
  font-weight: 400;
  text-align: center;
}

.hero-dither-content::before {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: -1;
  width: min(76vw, 900px);
  height: min(30vw, 356px);
  border-radius: 999px;
  background:
    radial-gradient(circle at 50% 45%, rgba(3, 5, 8, 0.9) 0%, rgba(6, 10, 14, 0.76) 30%, rgba(11, 16, 22, 0.36) 56%, rgba(10, 14, 20, 0.1) 78%, rgba(5, 8, 12, 0) 94%);
  filter: blur(86px);
  opacity: 0.9;
  transform: translate(-50%, -40%) scale(1.02);
  content: "";
  pointer-events: none;
}

.hero-live-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 22px;
  padding: 8px 17px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(8, 12, 16, 0.34), rgba(255, 255, 255, 0.04) 42%, rgba(121, 206, 213, 0.07) 100%);
  color: rgba(232, 244, 241, 0.78);
  font-family: var(--hero-cn-action-smoke);
  font-size: 12.5px;
  font-weight: 420;
  line-height: 1.42;
  letter-spacing: 0;
  font-feature-settings: "kern" 1, "palt" 1, "halt" 1;
  font-variation-settings: "wght" 420;
  font-variant-east-asian: proportional-width;
  text-rendering: optimizeLegibility;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 10px 24px rgba(0, 0, 0, 0.16), 0 0 14px rgba(151, 204, 255, 0.025);
  backdrop-filter: blur(30px) saturate(126%);
  -webkit-font-smoothing: antialiased;
  font-synthesis: none;
  font-synthesis-weight: none;
  text-shadow: 0 7px 18px rgba(0, 0, 0, 0.34), 0 0 16px rgba(184, 236, 228, 0.08);
}

.hero-badge-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 0 0 5px rgba(255, 255, 255, 0.06);
}

.hero-dither-content h2 {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: min(92vw, 760px);
  margin: 0 0 26px;
  color: rgba(248, 253, 251, 0.9);
  font-family: var(--hero-cn-title-smoke);
  font-size: clamp(48px, 4.05vw, 62px);
  font-weight: 430;
  line-height: 1.035;
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
  font-synthesis: none;
  font-synthesis-weight: none;
  font-optical-sizing: auto;
  font-variant-east-asian: proportional-width;
  font-feature-settings: "kern" 1, "palt" 1, "halt" 1;
  font-kerning: normal;
  font-variation-settings: "opsz" 34, "wght" 430;
  text-rendering: optimizeLegibility;
  text-wrap: balance;
  text-shadow: 0 16px 44px rgba(0, 0, 0, 0.38), 0 0 28px rgba(160, 232, 218, 0.08);
}

.hero-title-lead,
.hero-title-main {
  display: block;
  background: none;
  -webkit-background-clip: border-box;
  background-clip: border-box;
  -webkit-text-fill-color: currentColor;
  -webkit-text-stroke: 0;
}

.hero-title-lead {
  align-self: center;
  color: rgba(232, 242, 238, 0.72);
  font-family: var(--hero-cn-copy-smoke);
  font-size: 13.5px;
  font-weight: 360;
  line-height: 1.62;
  font-feature-settings: "kern" 1, "palt" 1, "halt" 1;
  font-variation-settings: "opsz" 18, "wght" 360;
  font-variant-east-asian: proportional-width;
  font-synthesis: none;
  font-synthesis-weight: none;
  text-rendering: geometricPrecision;
  text-shadow: 0 10px 24px rgba(0, 0, 0, 0.32), 0 0 18px rgba(184, 236, 228, 0.05);
}

.hero-title-main {
  position: relative;
  align-self: center;
  display: grid;
  justify-items: center;
  gap: 0.025em;
  max-width: none;
  padding: 0;
  font-family: var(--hero-cn-title-smoke);
  font-size: clamp(62px, 4.65rem, 78px);
  font-weight: 430;
  line-height: 1.025;
  font-feature-settings: "kern" 1, "palt" 1, "halt" 1;
  font-variation-settings: "opsz" 34, "wght" 430;
  font-optical-sizing: auto;
  font-variant-east-asian: proportional-width;
  white-space: normal;
  word-break: keep-all;
  text-wrap: pretty;
  background:
    linear-gradient(112deg, rgba(255, 255, 255, 0.98) 0%, rgba(239, 251, 247, 0.94) 34%, rgba(198, 223, 226, 0.82) 68%, rgba(255, 226, 204, 0.78) 100%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.94) 0%, rgba(230, 242, 239, 0.86) 52%, rgba(153, 178, 184, 0.62) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  -webkit-text-stroke: 0;
  text-rendering: optimizeLegibility;
  text-shadow: 0 16px 44px rgba(0, 0, 0, 0.4), 0 0 28px rgba(173, 238, 226, 0.085), 0 0 54px rgba(138, 167, 255, 0.045);
  filter: drop-shadow(0 14px 30px rgba(0, 0, 0, 0.2)) saturate(0.96);
}

.hero-title-main > span {
  display: block;
  white-space: nowrap;
  padding-inline: 0.03em;
}

.hero-title-main::after {
  position: absolute;
  inset: 6% -10% 0;
  z-index: -1;
  background:
    radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.09), transparent 34%),
    radial-gradient(circle at 24% 42%, rgba(184, 236, 228, 0.06), transparent 40%),
    radial-gradient(circle at 78% 58%, rgba(255, 176, 130, 0.05), transparent 48%);
  filter: blur(96px);
  mix-blend-mode: screen;
  opacity: 0.34;
  content: "";
  pointer-events: none;
}

.hero-dither-content p {
  max-width: 38rem;
  margin: 0 0 36px;
  color: rgba(226, 238, 235, 0.74);
  font-family: var(--hero-cn-copy-smoke);
  font-size: 15px;
  font-weight: 380;
  line-height: 1.88;
  font-feature-settings: "kern" 1, "palt" 1, "halt" 1;
  font-variation-settings: "opsz" 18, "wght" 380;
  font-variant-east-asian: proportional-width;
  font-synthesis: none;
  font-synthesis-weight: none;
  text-rendering: optimizeLegibility;
  text-wrap: balance;
  text-shadow: 0 11px 26px rgba(0, 0, 0, 0.32), 0 0 18px rgba(184, 236, 228, 0.04);
}

.dithering-card-hero .hero-title-main {
  font-family: var(--hero-cn-title-smoke);
  font-weight: 460;
  line-height: 1.035;
  font-variation-settings: "opsz" 36, "wght" 460;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(229, 244, 241, 0.92) 48%, rgba(173, 201, 205, 0.78) 100%),
    linear-gradient(112deg, rgba(212, 255, 242, 0.22), rgba(255, 218, 190, 0.12));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  -webkit-text-stroke: 0;
  text-shadow: 0 16px 40px rgba(0, 0, 0, 0.5), 0 0 30px rgba(174, 238, 226, 0.14);
  filter: drop-shadow(0 10px 22px rgba(0, 0, 0, 0.26));
}

.dithering-card-hero .hero-title-lead {
  font-family: var(--hero-cn-copy-smoke);
  color: rgba(224, 238, 234, 0.68);
  font-weight: 380;
  font-variation-settings: "opsz" 18, "wght" 380;
}

.dithering-card-hero .hero-dither-content p {
  font-family: var(--hero-cn-copy-smoke);
  color: rgba(224, 237, 234, 0.72);
  font-size: 14.8px;
  font-weight: 380;
  line-height: 1.9;
  font-variation-settings: "opsz" 18, "wght" 380;
}

.dithering-card-hero .hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
}

.dithering-card-hero .hero-actions button {
  min-width: 170px;
  height: 54px;
  padding: 0 28px;
  border-radius: 999px;
  font-family: var(--hero-cn-action-smoke);
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
  font-feature-settings: "kern" 1, "palt" 1, "halt" 1;
  font-variation-settings: "wght" 500;
  font-variant-east-asian: proportional-width;
  font-synthesis: none;
  font-synthesis-weight: none;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.07), 0 5px 14px rgba(0, 0, 0, 0.07);
  transition: transform 0.24s ease, box-shadow 0.24s ease, background 0.24s ease;
}

.dithering-card-hero #heroGenerateButton {
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: linear-gradient(135deg, rgba(249, 249, 246, 0.98), rgba(238, 242, 247, 0.92));
  color: #111111;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.dithering-card-hero #heroGenerateButton::after {
  margin-left: 12px;
  content: "→";
}

.dithering-card-hero #heroInspireButton {
  display: none;
}

.dithering-card-hero .hero-actions button:hover {
  transform: translateY(-2px) scale(1.03);
}

@keyframes heroDitherBreath {
  0%,
  100% {
    opacity: 0.42;
  }

  50% {
    opacity: 0.7;
  }
}

@keyframes heroDitherFlow {
  0% {
    transform: translate3d(-8%, -6%, 0) scale(1.08) rotate(-1deg);
  }

  45% {
    transform: translate3d(4%, 5%, 0) scale(1.12) rotate(1.4deg);
  }

  100% {
    transform: translate3d(9%, -3%, 0) scale(1.06) rotate(-0.6deg);
  }
}

@keyframes heroGradientBreath {
  0% {
    opacity: 0.22;
    transform: translate3d(-3%, -2%, 0) scale(1.04) rotate(-2deg);
  }

  50% {
    opacity: 0.72;
    transform: translate3d(2%, 1%, 0) scale(1.1) rotate(2deg);
  }

  100% {
    opacity: 0.28;
    transform: translate3d(4%, -1%, 0) scale(1.06) rotate(-1deg);
  }
}

@keyframes heroSmokeFloatA {
  0% {
    transform: translate3d(-8vw, -6vh, 0) scale(0.94) rotate(-10deg);
    opacity: 0.34;
  }

  38% {
    transform: translate3d(36vw, 18vh, 0) scale(1.16) rotate(7deg);
    opacity: 0.62;
  }

  72% {
    transform: translate3d(18vw, 48vh, 0) scale(0.98) rotate(18deg);
    opacity: 0.42;
  }

  100% {
    transform: translate3d(58vw, 2vh, 0) scale(1.08) rotate(-6deg);
    opacity: 0.56;
  }
}

@keyframes heroSmokeFloatB {
  0% {
    transform: translate3d(8vw, -8vh, 0) scale(1.02) rotate(8deg);
    opacity: 0.4;
  }

  34% {
    transform: translate3d(-34vw, 20vh, 0) scale(0.92) rotate(-14deg);
    opacity: 0.64;
  }

  68% {
    transform: translate3d(-10vw, 52vh, 0) scale(1.18) rotate(12deg);
    opacity: 0.46;
  }

  100% {
    transform: translate3d(-58vw, 4vh, 0) scale(1.04) rotate(-4deg);
    opacity: 0.58;
  }
}

@keyframes heroSmokeFloatC {
  0% {
    transform: translate3d(-6vw, 16vh, 0) scale(1.08) rotate(-4deg);
    opacity: 0.38;
  }

  30% {
    transform: translate3d(24vw, -18vh, 0) scale(0.96) rotate(14deg);
    opacity: 0.58;
  }

  64% {
    transform: translate3d(-26vw, -8vh, 0) scale(1.18) rotate(-16deg);
    opacity: 0.5;
  }

  100% {
    transform: translate3d(34vw, -42vh, 0) scale(1.02) rotate(6deg);
    opacity: 0.62;
  }
}

.console-grid {
  display: grid;
  grid-template-columns: clamp(260px, 24vw, 380px) minmax(320px, 1fr) clamp(230px, 20vw, 320px);
  grid-row: 2;
  min-height: 0;
  overflow: hidden;
}

.prompt-panel,
.settings-panel {
  min-height: 0;
  padding: 25px 22px;
  overflow: auto;
  background: #fff;
}

.prompt-panel {
  border-right: 1px solid var(--line);
}

.settings-panel {
  overflow: auto;
  border-left: 1px solid var(--line);
}

.module-view {
  overflow: auto;
  padding: 28px;
  background:
    linear-gradient(120deg, rgba(251, 252, 251, 0.96), rgba(241, 248, 249, 0.98)),
    repeating-linear-gradient(135deg, rgba(5, 11, 13, 0.025) 0 1px, transparent 1px 22px);
}

.module-view[hidden] {
  display: none;
}

.module-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding: 24px;
  border: 1px solid rgba(216, 221, 217, 0.82);
  border-radius: 8px;
  background:
    linear-gradient(120deg, rgba(255, 255, 255, 0.92), rgba(245, 251, 250, 0.82)),
    linear-gradient(90deg, rgba(53, 232, 255, 0.08), rgba(8, 199, 102, 0.08));
  box-shadow: var(--soft-shadow);
  backdrop-filter: blur(16px);
}

.module-hero span {
  color: var(--green-deep);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.module-hero h2 {
  margin: 8px 0 8px;
  font-size: 26px;
  letter-spacing: 0;
}

.module-hero p {
  max-width: 620px;
  margin: 0;
  color: #6f7772;
  font-size: 13px;
  line-height: 1.8;
}

.module-hero button {
  flex: 0 0 auto;
  min-width: 118px;
  height: 40px;
  border: 0;
  border-radius: 7px;
  background: linear-gradient(135deg, #101713, #203c34);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  box-shadow: 0 14px 28px rgba(10, 21, 18, 0.18);
}

.module-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 22px 0;
}

.module-stat,
.module-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(33, 48, 53, 0.05);
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.module-stat {
  padding: 16px;
}

.module-stat span,
.module-card span {
  color: var(--muted);
  font-size: 11px;
}

.module-stat strong {
  display: block;
  margin-top: 8px;
  font-size: 24px;
}

.module-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.module-workspace {
  margin: 0 0 20px;
}

.module-workspace:empty {
  display: none;
}

.module-section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin: 0 0 14px;
}

.module-section-head span {
  color: var(--green-deep);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0;
}

.module-section-head h3 {
  margin: 0;
  color: #15211d;
  font-size: 20px;
}

.brand-command,
.asset-command,
.history-command,
.project-command,
.collab-command {
  padding: 18px;
  border: 1px solid rgba(214, 224, 220, 0.9);
  border-radius: 8px;
  background:
    radial-gradient(circle at 88% 8%, rgba(53, 232, 255, 0.1), transparent 32%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(245, 250, 249, 0.9));
  box-shadow: 0 16px 42px rgba(24, 39, 43, 0.08);
}

.brand-panel-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 14px;
}

.brand-panel,
.brand-rule-list article,
.asset-tile,
.asset-insight,
.history-row,
.history-summary article,
.kanban-column,
.people-panel article,
.comment-panel article,
.approval-panel article {
  border: 1px solid rgba(216, 224, 220, 0.88);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.88);
}

.brand-panel {
  min-height: 170px;
  padding: 18px;
}

.brand-panel span,
.asset-tile span,
.history-summary span,
.kanban-column h4,
.people-panel em,
.comment-panel span,
.approval-panel span {
  color: var(--muted);
  font-size: 11px;
}

.brand-panel h4,
.asset-tile h4 {
  margin: 9px 0 8px;
  font-size: 16px;
}

.brand-panel p,
.asset-insight p,
.kanban-column span,
.people-panel span,
.comment-panel p {
  margin: 0;
  color: #66706a;
  font-size: 12px;
  line-height: 1.75;
}

.brand-token-row {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.brand-token {
  padding: 10px;
  border: 1px solid rgba(216, 224, 220, 0.8);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
}

.brand-token i {
  display: block;
  height: 38px;
  margin-bottom: 9px;
  border: 1px solid rgba(11, 18, 21, 0.08);
  border-radius: 7px;
}

.brand-token strong,
.brand-token span {
  display: block;
  font-size: 11px;
}

.brand-token span {
  margin-top: 4px;
  color: var(--muted);
}

.brand-rule-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.brand-rule-list article {
  padding: 12px;
}

.brand-rule-list b,
.asset-insight strong,
.history-row strong,
.history-summary strong,
.kanban-column strong,
.people-panel b,
.comment-panel strong,
.approval-panel strong {
  display: block;
  color: #15211d;
  font-size: 13px;
}

.brand-rule-list span {
  display: block;
  margin-top: 7px;
  color: #66706a;
  font-size: 12px;
  line-height: 1.7;
}

.asset-filter-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  margin-bottom: 14px;
}

.asset-library-toolbar {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(140px, 220px);
  gap: 12px;
  margin-bottom: 12px;
}

.asset-library-toolbar label {
  display: grid;
  gap: 6px;
  color: #65716b;
  font-size: 11px;
  font-weight: 800;
}

.asset-library-toolbar input,
.asset-library-toolbar select {
  width: 100%;
  height: 38px;
  padding: 0 12px;
  border: 1px solid rgba(13, 31, 24, 0.09);
  border-radius: 12px;
  background: rgba(248, 251, 249, 0.92);
  color: #16221c;
  font: inherit;
  outline: 0;
}

.asset-library-toolbar input:focus,
.asset-library-toolbar select:focus {
  border-color: rgba(8, 199, 102, 0.34);
  box-shadow: 0 0 0 3px rgba(8, 199, 102, 0.08);
}

.asset-empty-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 0 0 14px;
}

.asset-empty-actions button {
  height: 42px;
  border: 1px solid rgba(8, 199, 102, 0.18);
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(8, 199, 102, 0.12), rgba(53, 232, 255, 0.08));
  color: #0f4c35;
  font-size: 12px;
  font-weight: 900;
}

.asset-filter-row button {
  flex: 0 0 auto;
  padding: 8px 12px;
  border: 1px solid rgba(216, 224, 220, 0.9);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.86);
  color: #4c5a54;
  font-size: 12px;
  font-weight: 700;
}

.asset-filter-row button.active {
  border-color: rgba(8, 199, 102, 0.38);
  background: rgba(8, 199, 102, 0.1);
  color: #176842;
}

.asset-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
}

.asset-tile {
  overflow: hidden;
  min-height: 190px;
  padding: 10px;
}

.asset-tile[role="button"] {
  cursor: pointer;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.asset-tile[role="button"]:hover,
.asset-tile[role="button"]:focus-visible {
  border-color: rgba(8, 199, 102, 0.28);
  box-shadow: 0 14px 32px rgba(8, 199, 102, 0.09);
  transform: translateY(-1px);
  outline: 0;
}

.workspace-inline-actions {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 10px;
}

.workspace-delete-button {
  flex: 0 0 auto;
  min-width: 48px;
  height: 28px;
  padding: 0 10px;
  border: 1px solid rgba(214, 224, 220, 0.98);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
  color: #66706a;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
}

.workspace-delete-button:hover,
.workspace-delete-button:focus-visible {
  border-color: rgba(229, 90, 90, 0.26);
  background: rgba(255, 242, 242, 0.98);
  color: #b54d4d;
  box-shadow: 0 8px 18px rgba(181, 77, 77, 0.08);
  outline: 0;
}

.asset-thumb {
  overflow: hidden;
  height: 86px;
  margin-bottom: 10px;
  border-radius: 7px;
  background:
    radial-gradient(circle at 68% 28%, rgba(255, 255, 255, 0.72), transparent 18%),
    linear-gradient(135deg, #152027, #6a7b83);
}

.asset-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.asset-thumb-2,
.asset-thumb-5 {
  background:
    radial-gradient(circle at 34% 28%, rgba(53, 232, 255, 0.38), transparent 22%),
    linear-gradient(135deg, #0d1418, #263a40);
}

.asset-thumb-3,
.asset-thumb-6 {
  background:
    radial-gradient(circle at 72% 38%, rgba(8, 199, 102, 0.26), transparent 24%),
    linear-gradient(135deg, #f2f6f5, #9fafb4);
}

.asset-tile p,
.asset-tile em {
  display: block;
  margin: 0;
  color: #66706a;
  font-size: 11px;
  font-style: normal;
}

.asset-insight {
  margin-top: 12px;
  padding: 14px;
  background: linear-gradient(120deg, rgba(7, 16, 20, 0.92), rgba(22, 48, 45, 0.9));
}

.asset-insight strong,
.asset-insight p {
  color: #effffc;
}

.history-table {
  display: grid;
  gap: 8px;
}

.history-row {
  display: grid;
  grid-template-columns: 70px minmax(220px, 1fr) 80px 100px 70px 90px auto;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
}

.history-row[role="button"] {
  cursor: pointer;
  border-radius: 12px;
  transition: background 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.history-row[role="button"]:hover,
.history-row[role="button"]:focus-visible {
  background: rgba(8, 199, 102, 0.06);
  box-shadow: inset 0 0 0 1px rgba(8, 199, 102, 0.13);
  transform: translateY(-1px);
  outline: 0;
}

.history-row span,
.history-row b,
.history-row small,
.history-row i,
.history-row em {
  color: #66706a;
  font-size: 11px;
  font-style: normal;
}

.history-row em {
  justify-self: start;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(8, 199, 102, 0.1);
  color: #176842;
  font-weight: 800;
}

.history-row .workspace-delete-button {
  justify-self: end;
}

.history-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.history-summary article {
  padding: 14px;
}

.kanban-board {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  align-items: start;
}

.kanban-column {
  min-height: 260px;
  padding: 12px;
  background: rgba(247, 251, 250, 0.92);
}

.kanban-column h4 {
  margin: 0 0 12px;
  font-weight: 800;
}

.kanban-column article {
  display: grid;
  gap: 10px;
  padding: 12px;
  border-radius: 7px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(24, 39, 43, 0.07);
}

.kanban-column article + article {
  margin-top: 10px;
}

.milestone-strip {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  margin-top: 12px;
}

.milestone-strip span {
  flex: 0 0 auto;
  padding: 9px 12px;
  border: 1px solid rgba(53, 232, 255, 0.22);
  border-radius: 999px;
  background: rgba(53, 232, 255, 0.08);
  color: #1f5f67;
  font-size: 12px;
  font-weight: 800;
}

.collab-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.35fr 0.75fr;
  gap: 12px;
}

.people-panel,
.comment-panel,
.approval-panel {
  display: grid;
  gap: 10px;
}

.people-panel article,
.comment-panel article,
.approval-panel article {
  padding: 14px;
}

.comment-panel p {
  margin-top: 8px;
}

.approval-panel article {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.module-card {
  min-height: 146px;
  padding: 18px;
}

.module-stat:hover,
.module-card:hover,
.module-detail-card:hover {
  transform: translateY(-3px);
  border-color: rgba(8, 199, 102, 0.28);
  box-shadow: 0 18px 42px rgba(24, 39, 43, 0.1);
}

.module-card h3 {
  margin: 10px 0 8px;
  font-size: 15px;
}

.module-card p {
  margin: 0;
  color: #6f7772;
  font-size: 12px;
  line-height: 1.7;
}

.module-detail {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.module-detail-card {
  position: relative;
  overflow: hidden;
  min-height: 190px;
  padding: 20px;
  border: 1px solid rgba(216, 221, 217, 0.86);
  border-radius: 8px;
  background:
    linear-gradient(120deg, rgba(255, 255, 255, 0.96), rgba(247, 251, 250, 0.92)),
    linear-gradient(135deg, rgba(53, 232, 255, 0.08), rgba(8, 199, 102, 0.07));
  box-shadow: 0 14px 34px rgba(24, 39, 43, 0.07);
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.module-detail-card::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent, rgba(255, 255, 255, 0.64), transparent);
  content: "";
  opacity: 0;
  pointer-events: none;
  transform: translateX(-72%);
  transition: opacity 0.3s ease, transform 0.7s ease;
}

.module-detail-card:hover::after {
  opacity: 1;
  transform: translateX(72%);
}

.module-detail-card span {
  color: var(--green-deep);
  font-size: 11px;
  font-weight: 800;
}

.module-detail-card h3 {
  margin: 10px 0 8px;
  font-size: 17px;
}

.module-detail-card p {
  margin: 0;
  color: #66706a;
  font-size: 12px;
  line-height: 1.8;
}

.module-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.module-chip-row em {
  padding: 5px 9px;
  border: 1px solid rgba(8, 199, 102, 0.18);
  border-radius: 999px;
  background: rgba(8, 199, 102, 0.08);
  color: #176842;
  font-size: 11px;
  font-style: normal;
  font-weight: 700;
}

.module-progress {
  position: relative;
  overflow: hidden;
  height: 34px;
  margin-top: 18px;
  border-radius: 7px;
  background: rgba(232, 238, 235, 0.88);
}

.module-progress b {
  position: relative;
  z-index: 1;
  display: block;
  padding: 9px 11px;
  color: #1d2a25;
  font-size: 11px;
}

.module-progress i {
  position: absolute;
  inset: 0 auto 0 0;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(53, 232, 255, 0.35), rgba(8, 199, 102, 0.48));
}

.field-group,
.setting-section,
.workflow-card {
  margin-bottom: 26px;
}

.field-head,
.results-head,
.canvas-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.field-head strong,
.results-head strong {
  font-size: 13px;
}

.field-head span,
.results-head span {
  color: var(--muted);
  font-size: 10px;
}

.textarea-shell,
.negative-box {
  overflow: hidden;
  margin-top: 10px;
  border: 1px solid var(--line-dark);
  border-radius: 7px;
  background: #fff;
  transition: border-color 0.22s ease, box-shadow 0.22s ease;
}

.textarea-shell:focus-within,
.negative-box:focus-within {
  border-color: rgba(8, 199, 102, 0.55);
  box-shadow: 0 0 0 4px rgba(8, 199, 102, 0.08);
}

textarea {
  width: 100%;
  resize: none;
  border: 0;
  background: transparent;
  color: #2a312d;
  outline: none;
  line-height: 1.8;
}

.textarea-shell textarea {
  height: 112px;
  padding: 14px 13px 4px;
  font-size: 12px;
}

.negative-box textarea {
  height: 62px;
  padding: 14px 13px 0;
  font-size: 12px;
}

.textarea-shell small,
.negative-box small {
  display: block;
  padding: 0 12px 10px;
  color: #777;
  text-align: right;
  font-size: 11px;
}

.prompt-tools {
  display: grid;
  grid-template-columns: 1fr 1fr 38px;
  border-top: 1px solid var(--line);
}

.prompt-tools button {
  height: 36px;
  border: 0;
  border-right: 1px solid var(--line);
  background: #fafafa;
  color: #656d68;
  font-size: 12px;
}

.prompt-tools button:last-child {
  border-right: 0;
}

.prompt-template-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 12px;
}

.prompt-template-head strong {
  color: #19211c;
  font-size: 12px;
}

.prompt-template-head span {
  color: #86918b;
  font-size: 10px;
}

.prompt-template-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 8px;
  margin-top: 8px;
}

.prompt-template-card {
  min-height: 64px;
  padding: 10px;
  border: 1px solid rgba(9, 18, 13, 0.08);
  border-radius: 8px;
  background: linear-gradient(180deg, #fff, #f8faf8);
  color: #263029;
  text-align: left;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.prompt-template-card:hover {
  border-color: rgba(8, 199, 102, 0.36);
  box-shadow: 0 12px 28px rgba(9, 18, 13, 0.08);
  transform: translateY(-1px);
}

.prompt-template-card strong,
.prompt-template-card span {
  display: block;
}

.prompt-template-card strong {
  font-size: 12px;
  line-height: 1.25;
}

.prompt-template-card span {
  margin-top: 5px;
  color: #67736c;
  font-size: 11px;
  line-height: 1.45;
}

.ratio-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
  margin-top: 12px;
}

.ratio {
  display: grid;
  place-items: center;
  min-height: 74px;
  padding: 8px 3px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: #1b211e;
}

.ratio.active {
  border-color: var(--green);
  color: var(--green-deep);
  box-shadow: inset 0 0 0 1px var(--green);
}

.ratio i {
  display: block;
  width: 14px;
  height: 22px;
  margin-bottom: 5px;
  border: 1px solid currentColor;
  border-radius: 2px;
}

.ratio:nth-child(2) i,
.ratio:nth-child(4) i {
  width: 16px;
}

.ratio:nth-child(3) i {
  width: 16px;
  height: 16px;
}

.ratio:nth-child(5) i {
  width: 22px;
  height: 12px;
}

.ratio b {
  font-size: 12px;
}

.ratio span {
  color: #7b827e;
  font-size: 9px;
}

.custom-size {
  width: 88px;
  height: 38px;
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: #3c4540;
  font-size: 12px;
}

.reference-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.reference-row img,
.reference-row button {
  width: 59px;
  height: 56px;
  border: 1px solid var(--line);
  border-radius: 7px;
  object-fit: cover;
}

.reference-row img {
  background: #f6f8f6;
}

.reference-row button {
  background: #fff;
  color: #7b827e;
  font-size: 26px;
}

.reference-row button[disabled] {
  cursor: wait;
  opacity: 0.72;
}

.workflow-card {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfb;
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.workflow-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 34px rgba(22, 36, 40, 0.08);
}

.workflow-steps {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.workflow-step {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 9px;
  align-items: start;
}

.workflow-step b {
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  border-radius: 999px;
  background: #101713;
  color: #fff;
  font-size: 11px;
}

.workflow-step span,
.upload-card span,
.result-type-list span,
.workflow-field span {
  color: #68706c;
  font-size: 11px;
  line-height: 1.6;
}

.workflow-uploads,
.workflow-fields,
.result-type-list {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.upload-card {
  padding: 12px;
  border: 1px dashed #cbd3ce;
  border-radius: 8px;
  background: #fff;
}

.upload-card strong,
.workflow-field strong {
  display: block;
  margin-bottom: 4px;
  font-size: 12px;
}

.upload-card em {
  display: inline-block;
  margin-top: 9px;
  padding: 3px 7px;
  border-radius: 999px;
  background: rgba(8, 199, 102, 0.1);
  color: var(--green-deep);
  font-size: 10px;
  font-style: normal;
  font-weight: 800;
}

.result-type-list {
  grid-template-columns: 1fr 1fr;
}

.result-type-list span {
  padding: 8px 9px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: #303733;
  font-weight: 700;
}

.workflow-field {
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.canvas-column {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 0;
  min-height: 0;
  overflow: auto;
  padding: clamp(14px, 2vh, 22px) 32px clamp(16px, 2vh, 22px);
  background: #fcfdfc;
}

.canvas-head {
  width: clamp(280px, 34vw, 520px);
  margin-bottom: 10px;
  color: #6d7571;
  font-size: 12px;
}

.canvas-head b {
  margin-right: auto;
  font-weight: 500;
}

.canvas-head button {
  width: 24px;
  height: 24px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: #a4aaa7;
}

.poster-shell {
  position: relative;
  overflow: hidden;
  width: clamp(280px, 34vw, 520px);
  border-radius: 4px;
  background: #1d2a31;
  box-shadow: 0 18px 42px rgba(12, 22, 28, 0.18);
  transition: transform 0.28s ease, box-shadow 0.28s ease;
}

.poster-shell::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 20%, rgba(255, 255, 255, 0.32), transparent 48%);
  content: "";
  pointer-events: none;
  transform: translateX(-120%);
  animation: heroScan 4.8s ease-in-out infinite;
}

.poster-shell:hover {
  transform: translateY(-3px) scale(1.006);
  box-shadow: 0 28px 70px rgba(12, 22, 28, 0.24);
}

.poster-shell img {
  display: block;
  width: 100%;
  height: min(60vh, calc(100dvh - 310px));
  min-height: 320px;
  object-fit: cover;
}

.poster-shell.is-empty {
  display: grid;
  min-height: 320px;
  border: 1px dashed rgba(17, 23, 20, 0.18);
  background:
    radial-gradient(circle at 20% 18%, rgba(8, 199, 102, 0.12), transparent 28%),
    linear-gradient(180deg, #f7faf8, #ffffff);
}

.poster-shell.is-empty .poster-copy {
  position: relative;
  inset: auto;
  align-content: center;
  justify-items: center;
  padding: 44px;
  color: #17201b;
  text-align: center;
}

.poster-shell.is-empty .poster-copy span {
  margin-bottom: 22px;
  color: #00ae57;
}

.poster-shell.is-empty .poster-copy strong {
  color: #111714;
  text-shadow: none;
}

.poster-shell.is-empty .poster-copy em,
.poster-shell.is-empty .poster-copy small {
  color: #66716c;
  text-shadow: none;
}

.poster-shell.is-empty .poster-copy small {
  margin-top: 30px;
}

.poster-copy {
  position: absolute;
  inset: 9% 10%;
  z-index: 1;
  display: grid;
  align-content: center;
  justify-items: center;
  color: #f8fffb;
  text-align: center;
  pointer-events: none;
}

.poster-copy span {
  margin-bottom: 34px;
  color: #ccffec;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.34em;
}

.poster-copy strong {
  font-size: clamp(40px, 5vw, 64px);
  font-weight: 900;
  line-height: 1.05;
  text-shadow: 0 14px 34px rgba(0, 0, 0, 0.42);
}

.poster-copy em {
  margin-top: 14px;
  color: #caffe3;
  font-size: clamp(18px, 2.4vw, 30px);
  font-style: normal;
  font-weight: 800;
}

.poster-copy small {
  margin-top: min(34vh, 290px);
  color: rgba(246, 255, 250, 0.86);
  font-size: 18px;
  font-weight: 800;
}

.canvas-tools {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  height: 34px;
  margin-top: 14px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: #737b77;
  font-size: 12px;
}

.canvas-tools button {
  border: 0;
  background: transparent;
  color: inherit;
}

.canvas-tools span {
  width: 1px;
  height: 18px;
  background: var(--line);
}

.settings-panel .field-head {
  margin-bottom: 12px;
}

.model-select,
.more-style {
  display: flex;
  align-items: center;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
}

.model-select {
  gap: 9px;
  min-height: 55px;
  padding: 8px;
  text-align: left;
}

.model-select img {
  width: 33px;
  height: 38px;
  border-radius: 4px;
  object-fit: cover;
}

.model-select span {
  min-width: 0;
  flex: 1;
}

.model-select b,
.model-select small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.model-select b {
  font-size: 11px;
}

.model-select small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 9px;
}

.model-select em {
  padding: 2px 6px;
  border-radius: 999px;
  background: rgba(8, 199, 102, 0.13);
  color: var(--green-deep);
  font-size: 10px;
  font-style: normal;
  font-weight: 800;
}

.style-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.style-chip {
  display: flex;
  align-items: center;
  gap: 7px;
  height: 42px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  font-size: 11px;
}

.style-chip small {
  display: block;
  margin-top: 2px;
  color: #7a837e;
  font-size: 10px;
}

.style-chip.active {
  border-color: var(--green);
  color: var(--green-deep);
  box-shadow: inset 0 0 0 1px var(--green);
}

.style-chip img {
  width: 30px;
  height: 30px;
  border-radius: 4px;
  object-fit: cover;
}

.more-style {
  justify-content: center;
  height: 34px;
  margin-top: 8px;
  color: #565e5a;
  font-size: 11px;
}

.asset-strip {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 11px;
}

.asset-strip span,
.asset-strip img,
.asset-strip button {
  display: grid;
  width: 31px;
  height: 31px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #fff;
  object-fit: cover;
  font-size: 8px;
}

.asset-strip button {
  margin-left: auto;
  color: #68706c;
}

.two-buttons,
.count-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.two-buttons button,
.count-row button {
  height: 33px;
  min-width: 58px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: #37403b;
  font-size: 11px;
}

.advanced label,
.count-row,
.seed-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 12px;
  color: #4d5651;
  font-size: 11px;
}

.advanced select {
  border: 0;
  background: transparent;
  color: #303733;
  font-size: 11px;
  outline: none;
}

.count-row .active {
  border-color: var(--green);
  color: var(--green-deep);
}

.param-row {
  flex-wrap: wrap;
  justify-content: flex-start;
}

.param-row span {
  width: 100%;
}

.param-row button {
  flex: 1 1 auto;
  min-width: 78px;
}

.typography-row {
  flex-wrap: wrap;
  justify-content: flex-start;
}

.typography-row span {
  width: 100%;
}

.typography-row button {
  flex: 1 1 112px;
}

.seed-row button {
  width: 30px;
  height: 18px;
  padding: 2px;
  border: 0;
  border-radius: 999px;
  background: #c7cfca;
}

.seed-row i {
  display: block;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff;
}

.generate-button {
  width: 100%;
  height: 48px;
  border: 0;
  border-radius: 7px;
  background: linear-gradient(180deg, var(--green), var(--green-deep));
  color: #fff;
  font-weight: 800;
  box-shadow: 0 14px 28px rgba(0, 184, 91, 0.24);
  position: relative;
  overflow: hidden;
}

.generate-button::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent, rgba(255, 255, 255, 0.34), transparent);
  content: "";
  transform: translateX(-110%);
  animation: buttonSheen 3s ease-in-out infinite;
}

.credit-note {
  margin: 10px 0 0;
  color: #7c8580;
  text-align: center;
  font-size: 11px;
}

.progress-panel {
  margin-top: 10px;
  color: #6c746f;
  font-size: 11px;
}

.progress-panel b {
  float: right;
  color: #101713;
}

.progress-track {
  clear: both;
  overflow: hidden;
  height: 5px;
  margin-top: 8px;
  border-radius: 999px;
  background: #edf0ee;
}

.progress-track i {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--green);
  transition: width 0.2s ease;
}

.results-row {
  grid-row: 3;
  min-height: 0;
  padding: 10px 22px 12px;
  overflow: hidden;
  border-top: 1px solid var(--line);
  background: #fff;
}

.results-head {
  margin-bottom: 8px;
}

.results-head > div:first-child {
  display: flex;
  align-items: baseline;
  gap: 7px;
}

.results-head button {
  border: 0;
  background: transparent;
  color: #676f6a;
  font-size: 12px;
}

.variant-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  height: calc(100% - 30px);
}

.variant-button {
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  height: 100%;
  min-height: 72px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 7px;
  background:
    radial-gradient(circle at 50% 18%, rgba(53, 232, 255, 0.12), transparent 38%),
    linear-gradient(135deg, #f7faf9, #edf2f1);
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.variant-button:hover {
  transform: translateY(-3px);
}

.variant-button.active {
  border-color: var(--green);
  box-shadow: 0 0 0 2px rgba(8, 199, 102, 0.16);
}

.variant-button img {
  width: auto;
  max-width: 150px;
  height: 100%;
  object-fit: cover;
  object-position: center;
  box-shadow: 0 10px 24px rgba(15, 30, 36, 0.12);
}

.toast {
  position: fixed;
  top: 22px;
  left: 50%;
  z-index: 2600;
  display: flex;
  align-items: center;
  gap: 10px;
  width: max-content;
  max-width: min(560px, calc(100vw - 32px));
  transform: translate(-50%, -18px) scale(0.98);
  padding: 13px 18px;
  border: 1px solid rgba(128, 255, 198, 0.22);
  border-radius: 999px;
  background:
    radial-gradient(circle at 12% 0%, rgba(8, 199, 102, 0.26), transparent 46%),
    rgba(4, 12, 9, 0.92);
  color: #f3fff9;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.4;
  opacity: 0;
  pointer-events: none;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(18px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.toast::before {
  content: "";
  width: 9px;
  height: 9px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: #56f5a8;
  box-shadow: 0 0 0 5px rgba(86, 245, 168, 0.13), 0 0 18px rgba(86, 245, 168, 0.8);
}

.toast.show {
  transform: translate(-50%, 0) scale(1);
  opacity: 1;
}

.runtime-status-bar {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 16px clamp(18px, 2vw, 30px) 0;
  padding: 14px 16px;
  border: 1px solid rgba(8, 199, 102, 0.18);
  border-radius: 18px;
  background:
    radial-gradient(circle at 8% 0%, rgba(8, 199, 102, 0.12), transparent 42%),
    rgba(251, 255, 252, 0.9);
  color: #07100b;
  box-shadow: 0 16px 38px rgba(8, 20, 18, 0.09);
  backdrop-filter: blur(16px);
}

.runtime-status-bar::before {
  content: "";
  width: 10px;
  height: 10px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: #ffd372;
  box-shadow: 0 0 0 6px rgba(255, 211, 114, 0.18), 0 0 22px rgba(255, 211, 114, 0.72);
}

.runtime-status-bar.is-connecting::before {
  background: #56f5a8;
  box-shadow: 0 0 0 6px rgba(86, 245, 168, 0.15), 0 0 22px rgba(86, 245, 168, 0.72);
}

.runtime-status-bar div {
  display: grid;
  gap: 4px;
  min-width: 0;
  margin-right: auto;
}

.runtime-status-bar strong {
  font-size: 14px;
  font-weight: 900;
}

.runtime-status-bar span {
  color: #66716c;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.5;
}

.runtime-status-bar button {
  min-width: 92px;
  height: 36px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  background: #07100b;
  color: #f6fffb;
  font-size: 12px;
  font-weight: 900;
}

.runtime-status-bar button:disabled {
  cursor: wait;
  opacity: 0.64;
}

.billing-overlay {
  position: fixed;
  inset: 0;
  z-index: 2480;
  display: grid;
  place-items: center;
  padding: clamp(20px, 4vw, 48px);
  background: rgba(3, 8, 12, 0.72);
  backdrop-filter: blur(18px);
}

.billing-overlay[hidden] {
  display: none;
}

.profile-center-overlay {
  position: fixed;
  inset: 0;
  z-index: 2450;
  display: grid;
  place-items: center;
  padding: clamp(18px, 4vw, 40px);
}

.profile-center-overlay[hidden] {
  display: none;
}

.profile-center-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(3, 10, 14, 0.72);
  backdrop-filter: blur(16px);
}

.profile-center-panel {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 18px;
  width: min(780px, 100%);
  max-height: min(88dvh, 920px);
  overflow: auto;
  padding: clamp(22px, 3vw, 30px);
  border: 1px solid rgba(178, 242, 255, 0.16);
  border-radius: 12px;
  background:
    radial-gradient(circle at top right, rgba(53, 232, 255, 0.08), transparent 28%),
    linear-gradient(145deg, rgba(5, 13, 22, 0.96), rgba(7, 18, 29, 0.94));
  color: #f3fffb;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.28);
}

.profile-center-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  color: #f3fffb;
  font-size: 22px;
}

.profile-center-head,
.profile-center-balance,
.generate-balance-row {
  display: grid;
  gap: 14px;
}

.profile-center-head {
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
}

.profile-center-head > div,
.profile-center-balance > div,
.generate-balance-row > div {
  min-width: 0;
}

.profile-center-head span,
.profile-center-balance span,
.profile-center-card span,
.generate-summary-item span,
.generate-balance-row span {
  display: block;
  color: rgba(223, 250, 242, 0.62);
  font-size: 12px;
}

.profile-center-head h2 {
  margin: 6px 0 0;
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.1;
}

.profile-center-head p,
.profile-center-card small,
.generate-status-card span {
  margin: 6px 0 0;
  color: rgba(223, 250, 242, 0.72);
  font-size: 12px;
  line-height: 1.6;
}

.profile-center-balance {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: 16px 18px;
  border: 1px solid rgba(178, 242, 255, 0.1);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.045);
}

.profile-center-balance strong,
.profile-center-card strong {
  display: block;
  margin-top: 8px;
  font-size: 22px;
}

.profile-center-grid,
.generate-summary-grid {
  display: grid;
  gap: 12px;
}

.profile-center-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.generate-summary-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.profile-center-card,
.generate-summary-item,
.generate-status-card {
  padding: 14px;
  border: 1px solid rgba(178, 242, 255, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
}

.profile-center-actions,
.generate-summary-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.profile-center-actions button,
.generate-summary-actions button {
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: #f6fffb;
  font-size: 12px;
  font-weight: 800;
}

.generate-summary-card {
  display: grid;
  gap: 12px;
}

.generate-balance-row {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.generate-balance-row > div {
  padding: 12px 14px;
  border: 1px solid rgba(9, 18, 13, 0.08);
  border-radius: 12px;
  background: #fbfcfb;
}

.generate-status-card[data-state="warning"] {
  border-color: rgba(255, 196, 102, 0.34);
  background: rgba(255, 211, 114, 0.14);
}

.generate-status-card[data-state="error"] {
  border-color: rgba(255, 122, 122, 0.24);
  background: rgba(255, 122, 122, 0.1);
}

.generate-summary-actions button {
  color: #04110b;
  background: linear-gradient(135deg, rgba(8, 199, 102, 0.92), rgba(53, 232, 255, 0.88));
}

.generate-summary-actions button:last-child {
  color: #f6fffb;
  background: #07100b;
}

.billing-panel {
  width: min(1180px, 100%);
  max-height: calc(100vh - clamp(40px, 8vw, 96px));
  max-height: calc(100dvh - clamp(40px, 8vw, 96px));
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-color: rgba(143, 248, 255, 0.28) transparent;
  scrollbar-gutter: stable;
  border: 1px solid rgba(178, 242, 255, 0.16);
  border-radius: 18px;
  background:
    radial-gradient(circle at top right, rgba(53, 232, 255, 0.08), transparent 28%),
    linear-gradient(145deg, rgba(5, 13, 22, 0.96), rgba(7, 18, 29, 0.94));
  color: #f3fffb;
  box-shadow: 0 32px 90px rgba(0, 0, 0, 0.42);
}

.billing-panel::-webkit-scrollbar {
  width: 10px;
}

.billing-panel::-webkit-scrollbar-thumb {
  border: 3px solid transparent;
  border-radius: 999px;
  background: rgba(143, 248, 255, 0.28);
  background-clip: padding-box;
}

.billing-panel-head {
  position: sticky;
  top: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 22px 28px 20px;
  border-bottom: 1px solid rgba(178, 242, 255, 0.08);
  background: rgba(5, 13, 22, 0.9);
  backdrop-filter: blur(18px);
}

.billing-panel-intro {
  min-width: 0;
}

.billing-panel-head span,
.billing-section-head span {
  color: rgba(223, 250, 242, 0.62);
  font-size: 12px;
}

.billing-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #8ff8d0 !important;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.billing-panel-head h2 {
  margin: 6px 0 0;
  font-size: clamp(25px, 3vw, 32px);
  line-height: 1.14;
}

.billing-panel-head p {
  margin: 7px 0 0;
  color: rgba(223, 250, 242, 0.64);
  font-size: 13px;
}

.billing-panel-head button {
  display: grid;
  flex: 0 0 44px;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: #f6fffb;
  font-size: 20px;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.billing-panel-head button:hover {
  border-color: rgba(143, 248, 255, 0.34);
  background: rgba(143, 248, 255, 0.1);
  transform: rotate(4deg);
}

.billing-panel-grid {
  display: grid;
  grid-template-columns: 1fr;
  min-height: 0;
}

.billing-column {
  min-width: 0;
  min-height: 0;
  padding: 24px 28px 28px;
}

.billing-column + .billing-column {
  border-top: 1px solid rgba(178, 242, 255, 0.08);
}

.billing-section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
}

.billing-section-head > div {
  min-width: 0;
}

.billing-section-head h3 {
  display: block;
  margin: 0;
  color: #f8fffd;
  font-size: 18px;
}

.billing-section-head span {
  display: block;
  margin-top: 5px;
  line-height: 1.5;
}

.billing-section-head small {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  max-width: 52%;
  color: rgba(223, 250, 242, 0.56);
  font-size: 11px;
  line-height: 1.5;
  text-align: right;
}

.billing-package-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  max-height: none;
  overflow: visible;
  padding: 0;
}

.purchase-order-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 440px), 1fr));
  gap: 12px;
  max-height: none;
  overflow: visible;
  padding: 0;
}

.billing-package-surface,
.purchase-order-card,
.billing-empty {
  border: 1px solid rgba(178, 242, 255, 0.1);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.045);
}

.billing-package-card {
  position: relative;
  display: block;
  min-width: 0;
  cursor: pointer;
}

.billing-package-card > input {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.billing-package-surface {
  position: relative;
  display: grid;
  gap: 10px;
  min-height: 0;
  height: 100%;
  padding: 15px 16px;
  overflow: hidden;
  transition: border-color 0.22s ease, background 0.22s ease, box-shadow 0.22s ease, transform 0.22s ease;
}

.billing-package-card:hover .billing-package-surface {
  border-color: rgba(143, 248, 255, 0.28);
  background: rgba(143, 248, 255, 0.07);
  transform: translateY(-1px);
}

.billing-package-card > input:checked + .billing-package-surface {
  border-color: rgba(111, 242, 192, 0.58);
  background: linear-gradient(145deg, rgba(8, 199, 102, 0.13), rgba(53, 232, 255, 0.07));
  box-shadow: inset 0 0 0 1px rgba(111, 242, 192, 0.12), 0 12px 30px rgba(0, 0, 0, 0.16);
}

.billing-package-card > input:focus-visible + .billing-package-surface {
  outline: 2px solid #8ff8ff;
  outline-offset: 3px;
}

.billing-package-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}

.billing-package-top i {
  display: grid;
  flex: 0 0 22px;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: rgba(111, 242, 192, 0.14);
  color: #96ffcc;
  opacity: 0;
  transform: scale(0.82);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.billing-package-card > input:checked + .billing-package-surface .billing-package-top i {
  opacity: 1;
  transform: scale(1);
}

.billing-package-top strong,
.purchase-order-card strong {
  display: block;
  color: #f8fffd;
  font-size: 16px;
}

.billing-package-description,
.purchase-order-copy > span,
.billing-empty {
  color: rgba(231, 246, 250, 0.72);
  font-size: 12px;
  line-height: 1.6;
}

.billing-package-description {
  display: -webkit-box;
  min-height: 0;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.billing-package-value {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
}

.billing-package-value em {
  color: #f8fffd;
  font-size: 28px;
  font-style: normal;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.billing-package-value b,
.purchase-order-value b {
  color: #96ffcc;
  font-size: 18px;
  white-space: nowrap;
}

.billing-package-value b small,
.purchase-order-value b small {
  font-size: 0.66em;
  font-weight: 800;
}

.purchase-order-state button {
  position: relative;
  z-index: 1;
  min-height: 44px;
  padding: 0 16px;
  border: 0;
  border-radius: 11px;
  background: linear-gradient(135deg, rgba(8, 199, 102, 0.92), rgba(53, 232, 255, 0.88));
  color: #04100c;
  font-size: 13px;
  font-weight: 800;
}

.billing-checkout-bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  margin-top: 16px;
  padding: 14px 16px;
  border: 1px solid rgba(111, 242, 192, 0.18);
  border-radius: 14px;
  background: linear-gradient(145deg, rgba(8, 199, 102, 0.09), rgba(255, 255, 255, 0.035));
}

.billing-checkout-selection {
  min-width: 0;
}

.billing-checkout-selection span,
.billing-checkout-selection strong,
.billing-checkout-selection small {
  display: block;
}

.billing-checkout-selection span {
  color: rgba(223, 250, 242, 0.56);
  font-size: 11px;
}

.billing-checkout-selection strong {
  margin-top: 3px;
  color: #f8fffd;
  font-size: 16px;
}

.billing-checkout-selection strong em {
  margin-left: 8px;
  color: #96ffcc;
  font-size: 15px;
  font-style: normal;
}

.billing-checkout-selection small {
  margin-top: 3px;
  overflow: hidden;
  color: rgba(231, 246, 250, 0.62);
  font-size: 11px;
  line-height: 1.5;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.billing-checkout-bar button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-width: 168px;
  min-height: 44px;
  padding: 0 20px;
  border: 0;
  border-radius: 11px;
  background: linear-gradient(135deg, rgba(8, 199, 102, 0.96), rgba(53, 232, 255, 0.9));
  color: #04100c;
  font-size: 13px;
  font-weight: 900;
  transition: filter 0.2s ease, transform 0.2s ease;
}

.billing-checkout-bar button:hover:not(:disabled) {
  filter: brightness(1.08);
  transform: translateY(-1px);
}

.billing-checkout-bar button:focus-visible,
.wechat-payment-panel button:focus-visible,
.billing-panel-head button:focus-visible {
  outline: 2px solid #8ff8ff;
  outline-offset: 3px;
}

.billing-checkout-bar button:disabled {
  cursor: not-allowed;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(239, 255, 252, 0.48);
}

.billing-empty {
  display: grid;
  grid-column: 1 / -1;
  min-height: 110px;
  place-items: center;
  padding: 24px;
  text-align: center;
}

.purchase-order-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 16px;
  padding: 16px 18px;
}

.purchase-order-copy,
.purchase-order-value {
  min-width: 0;
}

.purchase-order-value {
  display: grid;
  justify-items: end;
  gap: 3px;
}

.purchase-order-value em {
  color: rgba(255, 255, 255, 0.72);
  font-size: 12px;
  font-style: normal;
}

.purchase-order-state,
.admin-row-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.purchase-order-state {
  min-width: 116px;
}

.purchase-order-state button,
.admin-row-action.secondary {
  background: rgba(255, 255, 255, 0.07);
  color: rgba(239, 255, 252, 0.82);
}

.wechat-payment-panel {
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr) auto;
  gap: 20px;
  align-items: center;
  margin: 20px 28px 0;
  padding: 18px;
  border: 1px solid rgba(8, 199, 102, 0.3);
  border-radius: 16px;
  background:
    radial-gradient(circle at 88% 0, rgba(53, 232, 255, 0.1), transparent 32%),
    rgba(8, 199, 102, 0.08);
  box-shadow: inset 0 0 0 1px rgba(8, 199, 102, 0.03);
  scroll-margin-top: 112px;
}

.wechat-payment-panel[hidden] {
  display: none;
}

.wechat-payment-panel img {
  width: 104px;
  height: 104px;
  border-radius: 10px;
  background: #fff;
}

.wechat-payment-panel strong,
.wechat-payment-panel span,
.wechat-payment-panel small {
  display: block;
}

.billing-payment-copy strong {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 17px;
}

.billing-payment-copy strong .ti {
  color: #65f0b4;
  font-size: 20px;
}

.wechat-payment-panel span {
  margin-top: 7px;
  color: rgba(243, 255, 251, 0.78);
}

.wechat-payment-panel small {
  margin-top: 5px;
  color: rgba(243, 255, 251, 0.52);
}

.wechat-payment-panel button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-weight: 700;
}

.admin-row-action.danger {
  border-color: rgba(255, 130, 130, 0.24);
  background: rgba(255, 92, 92, 0.1);
  color: #ffd0d0;
}

.purchase-order-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  justify-self: end;
  min-height: 28px;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
  line-height: 1;
  text-align: center;
  white-space: nowrap;
}

.purchase-order-status.status-pending {
  background: rgba(255, 208, 112, 0.12);
  color: #ffe29a;
}

.purchase-order-status.status-paid {
  background: rgba(111, 242, 192, 0.14);
  color: #9affca;
}

.purchase-order-status.status-cancelled,
.purchase-order-status.status-rejected,
.status-cancelled,
.status-rejected {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(231, 246, 250, 0.66);
}

.legal-links {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
  padding: 0 4px;
}

.legal-links button {
  padding: 0;
  border: 0;
  background: none;
  color: rgba(225, 239, 234, 0.62);
  font: inherit;
  font-size: 11px;
  cursor: pointer;
}

.legal-links button:hover,
.legal-links button:focus-visible {
  color: #fff;
  text-decoration: underline;
}

.compliance-footer {
  display: grid;
  gap: 5px;
  padding: 12px 4px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.compliance-footer strong {
  font-size: 11px;
  color: rgba(240, 255, 250, 0.92);
}

.compliance-footer span {
  color: rgba(225, 239, 234, 0.58);
  font-size: 10px;
  line-height: 1.5;
}

.legal-dialog {
  width: min(680px, calc(100vw - 32px));
  max-height: min(760px, calc(100vh - 32px));
  padding: 0;
  border: 1px solid rgba(17, 86, 66, 0.18);
  border-radius: 18px;
  color: #17231f;
  background: #fff;
  box-shadow: 0 28px 90px rgba(3, 16, 12, 0.34);
}

.legal-dialog::backdrop {
  background: rgba(2, 10, 8, 0.72);
  backdrop-filter: blur(8px);
}

.legal-dialog > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  border-bottom: 1px solid rgba(17, 86, 66, 0.12);
}

.legal-dialog h2 {
  margin: 0;
  font-size: 20px;
}

.legal-dialog header button {
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: #eef5f2;
  color: #2e4b41;
  font-size: 22px;
  cursor: pointer;
}

.legal-dialog pre {
  max-height: min(64vh, 560px);
  margin: 0;
  padding: 20px;
  overflow: auto;
  white-space: pre-wrap;
  font: inherit;
  line-height: 1.75;
}

.complaint-form {
  display: grid;
  gap: 16px;
  padding: 20px;
}

.complaint-form label {
  display: grid;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
}

.complaint-form textarea,
.complaint-form input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #cadbd5;
  border-radius: 12px;
  font: inherit;
}

.complaint-form textarea {
  min-height: 160px;
  resize: vertical;
}

.complaint-form > button {
  min-height: 42px;
  border: 0;
  border-radius: 12px;
  background: #0f7a57;
  color: #fff;
  font-weight: 800;
  cursor: pointer;
}

.login-overlay {
  position: fixed;
  inset: 0;
  z-index: 2500;
  display: grid;
  place-items: center;
  padding: clamp(32px, 6vw, 82px);
  overflow-y: auto;
  background:
    radial-gradient(circle at 78% 22%, rgba(53, 232, 255, 0.22), transparent 28%),
    radial-gradient(circle at 22% 76%, rgba(8, 199, 102, 0.16), transparent 32%),
    linear-gradient(135deg, #02060d, #071019 48%, #031513);
  color: #f6fffb;
}

.login-overlay[hidden] {
  display: none;
}

.login-atmosphere,
.login-atmosphere span {
  position: absolute;
  pointer-events: none;
}

.login-atmosphere {
  inset: 0;
  overflow: hidden;
}

.login-atmosphere span {
  width: 34vw;
  height: 34vw;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(53, 232, 255, 0.18), transparent 64%);
  filter: blur(18px);
  animation: heroPulse 8s ease-in-out infinite;
}

.login-atmosphere span:nth-child(1) {
  top: -14vw;
  right: 6vw;
}

.login-atmosphere span:nth-child(2) {
  bottom: -12vw;
  left: 10vw;
  background: radial-gradient(circle, rgba(8, 199, 102, 0.16), transparent 64%);
  animation-delay: -3s;
}

.login-atmosphere span:nth-child(3) {
  top: 36%;
  left: 44%;
  background: radial-gradient(circle, rgba(111, 95, 255, 0.16), transparent 64%);
  animation-delay: -5s;
}

.login-panel {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(420px, 0.92fr);
  justify-self: center;
  width: min(100%, 1120px);
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(178, 242, 255, 0.18);
  border-radius: 20px;
  background: rgba(5, 13, 22, 0.72);
  box-shadow: 0 34px 100px rgba(0, 0, 0, 0.38), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(24px);
}

.login-visual {
  position: relative;
  display: flex;
  min-width: 0;
  padding: 40px;
  overflow: hidden;
  flex-direction: column;
  gap: 24px;
  border-right: 1px solid rgba(178, 242, 255, 0.12);
  background:
    radial-gradient(circle at 18% 12%, rgba(27, 224, 145, 0.2), transparent 34%),
    linear-gradient(145deg, rgba(6, 29, 26, 0.96), rgba(3, 11, 16, 0.98));
}

.login-visual::before {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(100, 255, 191, 0.16) 1px, transparent 1px);
  background-size: 22px 22px;
  content: "";
  mask-image: linear-gradient(to bottom, #000, transparent 84%);
  pointer-events: none;
}

.login-visual-copy,
.login-visual-gallery,
.login-visual-tags {
  position: relative;
  z-index: 1;
}

.login-visual-copy span {
  color: #58f0ad;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.login-visual-copy strong {
  display: block;
  max-width: 460px;
  margin-top: 14px;
  font-size: clamp(30px, 3vw, 42px);
  line-height: 1.08;
  text-wrap: balance;
}

.login-visual-copy p {
  max-width: 460px;
  margin: 16px 0 0;
  color: rgba(231, 246, 250, 0.68);
  font-size: 14px;
  line-height: 1.75;
}

.login-visual-gallery {
  display: grid;
  min-height: 340px;
  flex: 1;
  grid-template-columns: minmax(0, 1.16fr) minmax(150px, 0.84fr);
  grid-template-rows: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.login-visual-gallery img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: cover;
  border: 1px solid rgba(132, 255, 204, 0.14);
  border-radius: 12px;
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.28);
}

.login-visual-gallery img:first-child {
  grid-row: 1 / 3;
}

.login-visual-tags {
  display: flex;
  gap: 8px;
}

.login-visual-tags span {
  padding: 7px 10px;
  border: 1px solid rgba(132, 255, 204, 0.16);
  border-radius: 999px;
  background: rgba(9, 49, 39, 0.58);
  color: rgba(225, 255, 242, 0.76);
  font-size: 11px;
}

.login-auth {
  min-width: 0;
  padding: 34px;
  background: rgba(5, 13, 22, 0.82);
}

.login-close-button {
  position: absolute;
  z-index: 3;
  top: 16px;
  right: 16px;
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid rgba(178, 242, 255, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(246, 255, 251, 0.82);
  font-size: 22px;
  line-height: 1;
}

.login-close-button:hover,
.login-close-button:focus-visible {
  outline: 0;
  border-color: rgba(120, 255, 197, 0.34);
  background: rgba(8, 199, 102, 0.16);
  box-shadow: 0 0 0 3px rgba(8, 199, 102, 0.16);
}

.login-brand {
  display: flex;
  gap: 12px;
  align-items: center;
}

.login-brand strong {
  display: block;
  font-size: 18px;
}

.login-brand small,
.login-copy p,
.login-options {
  color: rgba(231, 246, 250, 0.66);
}

.login-copy {
  margin: 28px 0 22px;
}

.login-copy > span {
  color: #8ff6ff;
  font-size: 12px;
  font-weight: 800;
}

.login-copy h2 {
  max-width: 480px;
  margin: 12px 0;
  font-size: clamp(30px, 3.2vw, 48px);
  line-height: 1.12;
  text-wrap: balance;
}

.login-copy p {
  margin: 0;
  font-size: 14px;
  line-height: 1.8;
}

.auth-mode-toggle {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  margin: 0 0 18px;
  padding: 5px;
  border: 1px solid rgba(178, 242, 255, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
}

.auth-mode-toggle button {
  height: 38px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: rgba(231, 246, 250, 0.7);
  font-size: 13px;
  font-weight: 900;
}

.auth-mode-toggle button.active {
  background: rgba(255, 255, 255, 0.92);
  color: #06111b;
}

.auth-mode-toggle button:focus-visible,
.verification-row button:focus-visible,
.login-options button:focus-visible,
.login-submit:focus-visible,
.social-login:focus-visible {
  outline: 0;
  box-shadow: 0 0 0 3px rgba(53, 232, 255, 0.18);
}

.login-form {
  display: grid;
  gap: 14px;
}

.login-form label span {
  display: block;
  margin-bottom: 7px;
  color: rgba(238, 249, 255, 0.74);
  font-size: 12px;
  font-weight: 800;
}

.login-form input[type="text"],
.login-form input[type="email"],
.login-form input[type="password"],
.verification-row input {
  width: 100%;
  height: 46px;
  padding: 0 13px;
  border: 1px solid rgba(178, 242, 255, 0.16);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.08);
  color: #f6fffb;
  outline: none;
}

.login-form input:focus {
  border-color: rgba(53, 232, 255, 0.56);
  box-shadow: 0 0 0 4px rgba(53, 232, 255, 0.08);
}

.register-fields {
  display: grid;
  gap: 14px;
}

.register-fields[hidden] {
  display: none;
}

.verification-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 120px;
  gap: 10px;
}

.verification-row button {
  height: 46px;
  border: 1px solid rgba(143, 246, 255, 0.26);
  border-radius: 7px;
  background: rgba(143, 246, 255, 0.1);
  color: #c7fbff;
  font-size: 12px;
  font-weight: 900;
}

.verification-row button:disabled {
  cursor: progress;
  opacity: 0.68;
}

.login-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 12px;
}

.login-options label {
  display: inline-flex;
  gap: 7px;
  align-items: center;
}

.login-options button {
  border: 0;
  background: transparent;
  color: #8ff6ff;
  font-size: 12px;
}

.login-submit,
.social-login {
  height: 46px;
  border-radius: 7px;
  font-size: 13px;
  font-weight: 900;
}

.login-submit {
  border: 0;
  background: linear-gradient(135deg, #f7fdff, #9eefff 46%, #6ff2c0);
  color: #06111b;
}

.login-submit:disabled,
.social-login:disabled {
  cursor: progress;
  opacity: 0.72;
}

.social-login-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.social-login-note {
  margin: 10px 0 0;
  color: rgba(231, 246, 250, 0.58);
  font-size: 12px;
  line-height: 1.6;
}

.social-login {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.wechat-login {
  border: 1px solid rgba(111, 242, 192, 0.32);
  background: rgba(8, 199, 102, 0.1);
  color: #dffaf2;
}

.qq-login {
  border: 1px solid rgba(143, 246, 255, 0.28);
  background: rgba(53, 232, 255, 0.1);
  color: #dffaff;
}

.admin-shell {
  position: fixed;
  inset: 86px 0 0;
  z-index: 30;
  display: grid;
  grid-template-columns: clamp(220px, 17vw, 280px) minmax(0, 1fr);
  overflow: hidden;
  background:
    radial-gradient(circle at 74% 14%, rgba(53, 232, 255, 0.18), transparent 30%),
    radial-gradient(circle at 28% 78%, rgba(8, 199, 102, 0.12), transparent 34%),
    linear-gradient(135deg, #040911, #07111f 48%, #031411);
  color: #efffff;
}

.admin-shell[hidden] {
  display: none;
}

.admin-shell::before {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.028) 1px, transparent 1px);
  background-size: 44px 44px;
  content: "";
  opacity: 0.28;
  pointer-events: none;
  mask-image: linear-gradient(90deg, transparent, #000 24%, #000 76%, transparent);
}

.admin-sidebar,
.admin-main {
  position: relative;
  z-index: 1;
  min-width: 0;
}

.admin-sidebar {
  display: flex;
  flex-direction: column;
  gap: 28px;
  padding: clamp(22px, 2.8vw, 36px) 16px 18px;
  border-right: 1px solid rgba(176, 244, 255, 0.12);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.025)),
    rgba(4, 10, 18, 0.76);
  box-shadow: 20px 0 80px rgba(0, 0, 0, 0.26);
  backdrop-filter: blur(22px);
}

.admin-nav {
  display: grid;
  gap: 10px;
}

.admin-nav button,
.admin-back-button,
.admin-actions button {
  border-radius: 7px;
  font-size: 13px;
  font-weight: 850;
}

.admin-nav button {
  height: 42px;
  border: 1px solid transparent;
  background: transparent;
  color: rgba(234, 251, 255, 0.66);
  text-align: left;
  padding: 0 12px;
}

.admin-nav button[hidden],
.admin-nav-group[hidden] {
  display: none !important;
}

.admin-nav button:hover,
.admin-nav button.active {
  border-color: rgba(129, 240, 255, 0.18);
  background: linear-gradient(90deg, rgba(53, 232, 255, 0.18), rgba(8, 199, 102, 0.1));
  color: #f5fffb;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 14px 34px rgba(0, 0, 0, 0.18);
}

.admin-back-button {
  height: 42px;
  margin-top: auto;
  border: 1px solid rgba(147, 246, 255, 0.2);
  background: rgba(255, 255, 255, 0.06);
  color: rgba(241, 255, 252, 0.86);
}

.admin-main {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 18px;
  padding: clamp(22px, 3vw, 42px);
  overflow: auto;
}

.admin-topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.admin-topbar span,
.admin-section-head span,
.admin-overview-grid span {
  color: #8ff6ff;
  font-size: 12px;
  font-weight: 900;
}

.admin-topbar h1 {
  max-width: 900px;
  margin: 8px 0 0;
  font-size: clamp(30px, 3.6vw, 58px);
  line-height: 1.05;
  text-wrap: balance;
}

.admin-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 10px;
}

.admin-actions button {
  height: 40px;
  padding: 0 14px;
  border: 1px solid rgba(155, 246, 255, 0.18);
  background: rgba(255, 255, 255, 0.07);
  color: #efffff;
}

.admin-actions button:first-child {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(145, 241, 255, 0.86));
  color: #06111b;
}

.admin-overview-grid,
.admin-dashboard-grid {
  display: grid;
  gap: 14px;
}

.admin-content {
  display: grid;
  align-content: start;
  gap: 18px;
  min-width: 0;
}

.admin-overview-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-auto-rows: minmax(112px, 1fr);
}

.admin-overview-grid article,
.admin-section {
  border: 1px solid rgba(178, 242, 255, 0.14);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.032)),
    rgba(5, 14, 24, 0.58);
  box-shadow: 0 26px 80px rgba(0, 0, 0, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.07);
  backdrop-filter: blur(22px);
}

.admin-overview-grid article {
  position: relative;
  overflow: hidden;
  height: 100%;
  min-height: 112px;
  padding: 16px;
}

.admin-overview-grid article::after {
  position: absolute;
  right: -28px;
  bottom: -34px;
  width: 110px;
  height: 110px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(53, 232, 255, 0.16), transparent 68%);
  content: "";
}

.admin-overview-grid strong {
  display: block;
  margin: 8px 0 6px;
  color: #f9fffd;
  font-size: clamp(24px, 2.1vw, 36px);
  line-height: 1;
  overflow-wrap: anywhere;
}

.admin-overview-grid em {
  color: rgba(234, 251, 255, 0.58);
  font-size: 12px;
  font-style: normal;
}

.admin-dashboard-grid {
  grid-template-columns: repeat(3, minmax(220px, 1fr));
  align-items: start;
}

.admin-overview-flow-grid {
  grid-template-columns: repeat(2, minmax(280px, 1fr));
  align-items: stretch;
}

.admin-overview-flow-grid .admin-service-panel {
  order: 1;
}

.admin-overview-flow-grid .admin-config-panel {
  order: 2;
}

.admin-overview-flow-grid .admin-order-panel {
  grid-column: 1 / -1;
  order: 3;
}

.admin-overview-recent-panel .admin-order-list div {
  grid-template-columns: minmax(180px, 1.35fr) minmax(90px, 0.35fr) minmax(130px, 0.45fr) auto;
}

.admin-section {
  min-height: 0;
  padding: 16px;
}

.admin-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.admin-section-head h2 {
  margin: 0;
  color: #f7fffb;
  font-size: 16px;
}

.admin-service-list,
.admin-config-list,
.admin-data-table,
.admin-order-list,
.relay-form {
  display: grid;
  gap: 10px;
}

.admin-service-list div,
.admin-data-table div,
.admin-order-list div {
  display: grid;
  align-items: center;
  gap: 12px;
  min-width: 0;
  padding: 11px 12px;
  border: 1px solid rgba(178, 242, 255, 0.1);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.055);
}

.admin-service-list div {
  grid-template-columns: minmax(92px, 0.7fr) minmax(0, 1.35fr) auto;
}

.admin-data-table div {
  grid-template-columns: minmax(92px, 1fr) minmax(86px, 0.8fr) minmax(92px, 0.8fr) auto;
}

.admin-order-list div {
  grid-template-columns: minmax(0, 1fr) auto auto;
}

.admin-service-list b,
.admin-data-table b,
.admin-order-list b {
  color: #f8fffd;
  font-size: 13px;
}

.admin-service-list span,
.admin-data-table span,
.admin-order-list span,
.admin-config-list label span {
  min-width: 0;
  color: rgba(231, 246, 250, 0.68);
  font-size: 12px;
  line-height: 1.45;
}

.admin-service-list em,
.admin-data-table em,
.admin-order-list em {
  justify-self: end;
  padding: 5px 8px;
  border-radius: 999px;
  background: rgba(111, 242, 192, 0.12);
  color: #9affca;
  font-size: 11px;
  font-style: normal;
  font-weight: 850;
  white-space: nowrap;
}

.admin-billing-grid {
  grid-template-columns: minmax(0, 1.12fr) minmax(0, 0.88fr);
}

.admin-billing-form,
.admin-package-list,
.admin-billing-order-list {
  display: grid;
  gap: 12px;
}

.admin-billing-form {
  margin-bottom: 14px;
}

.admin-billing-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.admin-billing-form-grid label {
  display: grid;
  gap: 10px;
  align-items: center;
  padding: 12px 14px;
  border: 1px solid rgba(178, 242, 255, 0.1);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.055);
}

.admin-billing-form-grid label span {
  color: rgba(231, 246, 250, 0.68);
  font-size: 12px;
  line-height: 1.45;
}

.admin-billing-form-grid input {
  width: 100%;
  height: 40px;
  padding: 0 12px;
  border: 1px solid rgba(178, 242, 255, 0.12);
  border-radius: 7px;
  background: rgba(5, 14, 24, 0.7);
  color: #f8fffd;
}

.admin-billing-form-wide {
  grid-column: 1 / -1;
}

.admin-billing-form-toggle {
  grid-template-columns: minmax(0, 1fr) auto;
}

.admin-billing-form-toggle input {
  width: 18px;
  height: 18px;
  justify-self: end;
}

.admin-inline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.admin-inline-actions button,
.admin-row-action {
  height: 38px;
  padding: 0 14px;
  border: 1px solid rgba(155, 246, 255, 0.18);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.07);
  color: #efffff;
  font-size: 12px;
  font-weight: 800;
}

.admin-inline-actions button[type="submit"] {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(145, 241, 255, 0.86));
  color: #06111b;
}

.admin-package-row,
.admin-billing-order-row {
  display: grid;
  align-items: center;
  gap: 12px;
  padding: 13px 14px;
  border: 1px solid rgba(178, 242, 255, 0.1);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.055);
}

.admin-package-row {
  grid-template-columns: minmax(0, 1.2fr) auto auto auto;
}

.admin-billing-order-row {
  grid-template-columns: minmax(0, 1fr) auto auto;
}

.admin-log-list {
  display: grid;
  gap: 12px;
}

.admin-log-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 14px;
  padding: 15px 16px;
  border: 1px solid rgba(178, 242, 255, 0.1);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.055);
}

.admin-log-copy {
  min-width: 0;
  display: grid;
  gap: 6px;
}

.admin-log-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.admin-log-head b {
  color: #f8fffd;
  font-size: 13px;
}

.admin-log-head em {
  padding: 5px 8px;
  border-radius: 999px;
  background: rgba(255, 208, 112, 0.12);
  color: #ffe29a;
  font-size: 11px;
  font-style: normal;
  font-weight: 850;
  white-space: nowrap;
}

.admin-log-head em.status-paid {
  background: rgba(111, 242, 192, 0.12);
  color: #9affca;
}

.admin-log-copy span,
.admin-log-copy small {
  color: rgba(231, 246, 250, 0.72);
  font-size: 12px;
  line-height: 1.55;
}

.admin-log-copy small {
  color: rgba(231, 246, 250, 0.54);
}

.admin-log-row > strong {
  color: #f8fffd;
  font-size: 12px;
  white-space: nowrap;
}

.admin-users-grid {
  grid-template-columns: minmax(0, 1fr);
  align-items: stretch;
}

.admin-subadmin-grid {
  grid-template-columns: minmax(340px, 0.72fr) minmax(420px, 1fr);
  align-items: stretch;
}

.admin-user-panel,
.admin-subadmin-panel,
.admin-account-panel {
  height: 100%;
}

.admin-user-panel,
.admin-subadmin-panel {
  min-height: 242px;
}

.admin-account-panel {
  grid-column: auto;
  grid-row: auto;
}

.admin-account-list {
  display: grid;
  gap: 12px;
  max-height: min(62vh, 680px);
  overflow: auto;
  padding-right: 2px;
}

.admin-user-table-scroll {
  max-height: min(62vh, 680px);
  overflow-y: auto;
}

.admin-user-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
}

.admin-user-table th:nth-child(1) { width: 17%; }
.admin-user-table th:nth-child(2) { width: 18%; }
.admin-user-table th:nth-child(3) { width: 16%; }
.admin-user-table th:nth-child(4) { width: 9%; }
.admin-user-table th:nth-child(5) { width: 12%; }
.admin-user-table th:nth-child(6) { width: 11%; }
.admin-user-table th:nth-child(7) { width: 8%; }
.admin-user-table th:nth-child(8) { width: 9%; }

.admin-user-table tbody tr {
  background: rgba(19, 36, 50, 0.72);
  transition: background 0.2s ease, box-shadow 0.2s ease;
}

.admin-user-table tbody tr:nth-child(even) {
  background: rgba(15, 31, 44, 0.76);
}

.admin-user-table tbody tr:hover {
  background: rgba(33, 70, 82, 0.72);
  box-shadow: inset 3px 0 #58e4e7;
}

.admin-user-identity {
  display: flex;
  gap: 11px;
  align-items: center;
  min-width: 0;
}

.admin-user-avatar {
  display: grid;
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid rgba(88, 228, 231, 0.24);
  border-radius: 50%;
  background: rgba(43, 183, 191, 0.16);
  color: #70e9ed;
  font-size: 19px;
  box-shadow: inset 0 0 0 4px rgba(8, 19, 28, 0.24);
}

.admin-user-table tr.is-guest .admin-user-avatar {
  border-color: rgba(224, 171, 61, 0.24);
  background: rgba(224, 171, 61, 0.14);
  color: #f2ce76;
}

.admin-user-identity > span:last-child,
.admin-user-contact,
.admin-user-credit {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.admin-user-table :is(b, small) {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-user-table td b {
  color: #eaf2f4;
  font-size: 13px;
  font-weight: 620;
}

.admin-user-table td small {
  color: #8295a2;
  font-size: 11px;
}

.admin-user-table .admin-user-credit b {
  color: #76e6b8;
  font-size: 16px;
  font-variant-numeric: tabular-nums;
}

.admin-user-plan {
  width: max-content;
  max-width: 100%;
  padding: 5px 8px;
  border-radius: 6px;
  background: rgba(82, 126, 148, 0.16);
}

.admin-user-table td > em {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 26px;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-style: normal;
  font-weight: 600;
  white-space: nowrap;
}

.admin-user-detail-button {
  padding-inline: 10px;
  white-space: nowrap;
}

.admin-user-table .admin-empty-state {
  min-height: 220px;
  border: 0;
  background: transparent;
}

/* H5 commercial mobile containment */
@media (max-width: 640px) {
  html,
  body,
  .prototype-frame,
  .desktop-app,
  .workbench,
  .module-view {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  .desktop-app,
  .workbench {
    overflow-x: hidden;
  }

  .brand {
    width: 44px;
    padding: 0;
    justify-content: center;
  }

  .brand > span:last-child {
    display: none;
  }

  .nav-list,
  .workbench.module-mode .module-workspace,
  .workbench.module-mode .history-command {
    min-width: 0;
  }

  .workbench.module-mode .module-view {
    overflow-x: hidden;
    padding: 16px;
  }

  .workbench.module-mode .history-table {
    overflow: visible;
    border: 0;
    background: transparent;
  }

  .workbench.module-mode .history-row {
    width: 100%;
    min-width: 0;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "time state"
      "title title"
      "model format"
      "cost action";
    gap: 7px 12px;
    margin-bottom: 10px;
    padding: 14px;
    border: 1px solid rgba(13, 31, 24, 0.08);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.86);
  }

  .workbench.module-mode .history-row > span {
    grid-area: time;
  }

  .workbench.module-mode .history-row > strong {
    grid-area: title;
    overflow-wrap: anywhere;
  }

  .workbench.module-mode .history-row > em {
    grid-area: state;
  }

  .workbench.module-mode .history-row > b {
    grid-area: model;
  }

  .workbench.module-mode .history-row > small {
    grid-area: cost;
  }

  .workbench.module-mode .history-row > i {
    grid-area: format;
    text-align: right;
  }

  .workbench.module-mode .history-row > .workspace-delete-button {
    grid-area: action;
  }

  .wechat-payment-panel {
    grid-template-columns: 92px minmax(0, 1fr);
    margin: 14px 16px 0;
  }

  .wechat-payment-panel img {
    width: 92px;
    height: 92px;
  }

  .wechat-payment-panel button {
    grid-column: 1 / -1;
  }

  .billing-package-list {
    grid-template-columns: 1fr;
  }
}

.admin-account-row {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) auto auto auto;
  align-items: center;
  gap: 12px;
  padding: 13px 14px;
  border: 1px solid rgba(178, 242, 255, 0.1);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.055);
  transition: border-color 0.22s ease, background 0.22s ease, box-shadow 0.22s ease;
}

.admin-account-row.is-selected {
  border-color: rgba(143, 248, 255, 0.3);
  background: linear-gradient(135deg, rgba(143, 248, 255, 0.12), rgba(255, 255, 255, 0.055));
  box-shadow: inset 0 0 0 1px rgba(143, 248, 255, 0.08), 0 18px 42px rgba(0, 0, 0, 0.16);
}

.admin-account-row strong {
  color: #f8fffd;
  font-size: 13px;
  white-space: nowrap;
}

.admin-account-row em {
  justify-self: end;
  padding: 5px 8px;
  border-radius: 999px;
  background: rgba(255, 208, 112, 0.12);
  color: #ffe29a;
  font-size: 11px;
  font-style: normal;
  font-weight: 850;
  white-space: nowrap;
}

.admin-account-row em.status-paid {
  background: rgba(111, 242, 192, 0.12);
  color: #9affca;
}

.admin-subadmin-account {
  grid-template-columns: minmax(150px, 0.65fr) minmax(320px, 1.5fr) minmax(170px, 0.7fr) auto;
  align-items: start;
}

.admin-permission-fieldset {
  min-width: 0;
  margin: 0;
  padding: 12px 14px;
  border: 1px solid rgba(178, 242, 255, 0.1);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.04);
}

.admin-permission-fieldset legend {
  padding: 0 6px;
  color: rgba(231, 246, 250, 0.68);
  font-size: 12px;
}

.admin-permission-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.admin-permission-option,
.admin-unlimited-option {
  display: flex;
  align-items: center;
  gap: 7px;
  color: #dbe9ed;
  font-size: 12px;
}

.admin-permission-option input,
.admin-unlimited-option input {
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  accent-color: #58e4e7;
}

.admin-unlimited-option {
  align-items: flex-start;
  padding: 10px 12px;
  border: 1px solid rgba(88, 228, 231, 0.14);
  border-radius: 7px;
  background: rgba(88, 228, 231, 0.06);
}

.admin-unlimited-option span,
.admin-unlimited-option small {
  display: block;
}

.admin-unlimited-option small,
.admin-package-copy small,
.admin-account-date {
  margin-top: 4px;
  color: rgba(231, 246, 250, 0.5);
  font-size: 11px;
}

.admin-package-copy {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.admin-package-copy b {
  color: #f8fffd;
  font-size: 13px;
}

.admin-package-copy span {
  color: rgba(231, 246, 250, 0.68);
  font-size: 12px;
  line-height: 1.45;
}

.admin-package-row strong,
.admin-billing-order-row strong {
  color: #f8fffd;
  font-size: 13px;
}

.admin-package-row em,
.admin-billing-order-row em {
  justify-self: end;
  padding: 5px 8px;
  border-radius: 999px;
  background: rgba(255, 208, 112, 0.12);
  color: #ffe29a;
  font-size: 11px;
  font-style: normal;
  font-weight: 850;
  white-space: nowrap;
}

.admin-package-row em.status-paid,
.admin-billing-order-row em.status-paid {
  background: rgba(111, 242, 192, 0.12);
  color: #9affca;
}

.admin-empty-state {
  padding: 16px;
  border: 1px dashed rgba(178, 242, 255, 0.16);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.04);
  color: rgba(231, 246, 250, 0.72);
  font-size: 13px;
  line-height: 1.6;
}

.admin-config-list label,
.relay-form label {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(170px, 0.72fr);
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border: 1px solid rgba(178, 242, 255, 0.1);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.055);
}

.admin-config-list select,
.relay-form select,
.relay-form input:not([type="checkbox"]),
.relay-form textarea {
  width: 100%;
  border: 1px solid rgba(178, 242, 255, 0.14);
  border-radius: 6px;
  background: rgba(3, 10, 18, 0.76);
  color: #efffff;
  outline: none;
}

.relay-form select,
.relay-form input:not([type="checkbox"]) {
  height: 36px;
}

.relay-form input:not([type="checkbox"]),
.relay-form textarea {
  padding: 0 12px;
}

.relay-form textarea {
  min-height: 94px;
  padding-top: 10px;
  resize: vertical;
}

.relay-form .relay-form-wide {
  grid-template-columns: 1fr;
}

.relay-form .relay-clear-secret-option {
  grid-template-columns: minmax(0, 1fr) max-content;
}

.relay-clear-secret-copy {
  display: grid;
  gap: 3px;
}

.relay-clear-secret-copy small {
  color: rgba(231, 246, 250, 0.58);
  font-size: 12px;
}

.relay-clear-secret-control {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  justify-self: end;
  color: rgba(239, 255, 255, 0.82);
  cursor: pointer;
}

.relay-form .relay-clear-secret-control input[type="checkbox"] {
  width: 18px;
  height: 18px;
  padding: 0;
  margin: 0;
  flex: 0 0 18px;
  accent-color: #72fbd3;
}

.relay-clear-secret-control:has(input:disabled) {
  opacity: 0.45;
  cursor: not-allowed;
}

.admin-relay-grid {
  grid-template-columns: minmax(0, 1.08fr) minmax(320px, 0.72fr);
}

.admin-relay-settings,
.admin-video-api-panel {
  grid-column: 1 / -1;
}

.relay-settings-sections {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.relay-settings-section {
  min-width: 0;
  padding: 16px;
  border: 1px solid rgba(172, 205, 218, 0.12);
  border-radius: 8px;
  background: rgba(4, 14, 24, 0.34);
}

.relay-settings-section-wide {
  grid-column: 1 / -1;
}

.relay-settings-section-head {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  gap: 11px;
  align-items: start;
  margin-bottom: 15px;
}

.relay-section-index {
  display: inline-grid;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(88, 228, 231, 0.22);
  border-radius: 7px;
  background: rgba(88, 228, 231, 0.08);
  color: #79ece0;
  font-size: 12px;
  font-weight: 850;
  place-items: center;
}

.relay-settings-section-head h3,
.relay-settings-section-head p {
  margin: 0;
}

.relay-settings-section-head h3 {
  color: #edf7f7;
  font-size: 15px;
  font-weight: 720;
}

.relay-settings-section-head p {
  margin-top: 3px;
  color: rgba(213, 230, 234, 0.62);
  font-size: 12px;
  line-height: 1.55;
}

.relay-config-badge {
  align-self: center;
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(255, 205, 111, 0.1);
  color: #ffd98c;
  font-size: 11px;
  font-weight: 760;
  white-space: nowrap;
}

.relay-config-badge[data-state="ready"] {
  background: rgba(111, 242, 192, 0.1);
  color: #90efc1;
}

.relay-settings-section .relay-subform {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 13px 12px;
}

.relay-settings-section-interface .relay-subform {
  grid-template-columns: minmax(0, 1fr);
}

.relay-settings-section-running .relay-subform {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.relay-settings-section .relay-subform > label {
  grid-template-columns: minmax(0, 1fr);
  gap: 7px;
  align-items: start;
  min-width: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.relay-settings-section .relay-subform > label > span:first-child {
  color: rgba(226, 239, 241, 0.82);
  font-size: 12px;
  font-weight: 650;
}

.relay-settings-section .relay-subform :is(input:not([type="checkbox"]), select) {
  height: 40px;
}

.relay-settings-section .relay-subform :is(input:not([type="checkbox"]), select, textarea) {
  border-color: rgba(172, 205, 218, 0.16);
  background: rgba(3, 11, 19, 0.72);
}

.relay-settings-section .relay-subform :is(input:not([type="checkbox"]), select, textarea):focus {
  border-color: rgba(88, 228, 231, 0.52);
}

.relay-settings-section .relay-subform > .relay-form-wide {
  grid-column: 1 / -1;
}

.relay-settings-section .relay-subform > .relay-clear-secret-option,
.relay-settings-section .relay-subform > .relay-fallback-clear-secret-option {
  grid-template-columns: minmax(0, 1fr) max-content;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid rgba(172, 205, 218, 0.1);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.025);
}

.relay-parameter-groups,
.relay-test-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.relay-parameter-group,
.relay-line-test {
  min-width: 0;
  padding: 14px;
  border: 1px solid rgba(172, 205, 218, 0.1);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.025);
}

.relay-parameter-group-head,
.relay-line-test-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 13px;
}

.relay-parameter-group-head strong,
.relay-line-test-head strong {
  color: #edf6f7;
  font-size: 13px;
}

.relay-parameter-group-head span,
.relay-line-test-head span {
  color: rgba(213, 230, 234, 0.58);
  font-size: 11px;
}

.relay-line-test-head > div {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.relay-line-test-head span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.relay-line-test-head button {
  flex: 0 0 auto;
  height: 36px;
  padding: 0 12px;
  border: 1px solid rgba(88, 228, 231, 0.24);
  border-radius: 7px;
  background: rgba(88, 228, 231, 0.08);
  color: #c9faf4;
  font-size: 12px;
  font-weight: 760;
}

.relay-line-test-head button:hover {
  background: rgba(88, 228, 231, 0.14);
}

.relay-line-test .admin-relay-test-card {
  margin-top: 0;
  padding: 13px;
  background: rgba(3, 10, 18, 0.34);
}

.relay-route-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 12px;
  padding: 13px 14px;
  border: 1px solid rgba(88, 228, 231, 0.14);
  border-radius: 7px;
  background: rgba(88, 228, 231, 0.045);
}

.relay-route-summary > div {
  display: grid;
  gap: 3px;
}

.relay-route-summary span,
.relay-route-summary p,
.relay-route-summary em {
  margin: 0;
  color: rgba(213, 230, 234, 0.62);
  font-size: 11px;
}

.relay-route-summary em {
  overflow: hidden;
  max-width: 320px;
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.relay-route-summary strong {
  color: #e9f7f5;
  font-size: 13px;
}

@media (max-width: 1180px) {
  .relay-parameter-groups,
  .relay-test-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 900px) {
  .relay-settings-sections {
    grid-template-columns: minmax(0, 1fr);
  }

  .relay-settings-section-wide {
    grid-column: auto;
  }

  .relay-settings-section-running .relay-subform {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .relay-settings-section {
    padding: 13px;
  }

  .relay-settings-section-head {
    grid-template-columns: 32px minmax(0, 1fr);
  }

  .relay-config-badge {
    grid-column: 2;
    justify-self: start;
  }

  .relay-settings-section-running .relay-subform,
  .relay-settings-section .relay-subform,
  .relay-parameter-groups,
  .relay-test-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .relay-route-summary,
  .relay-line-test-head {
    align-items: stretch;
    flex-direction: column;
  }

  .relay-line-test-head button {
    width: 100%;
  }
}

.admin-relay-deployment {
  grid-column: 1 / -1;
}

.relay-actions {
  display: flex;
  gap: 10px;
  margin-top: 14px;
}

.relay-actions button {
  height: 40px;
  padding: 0 14px;
  border: 1px solid rgba(155, 246, 255, 0.18);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.07);
  color: #efffff;
  font-weight: 850;
}

.relay-actions button:first-child {
  border: 0;
  background: linear-gradient(135deg, #f5feff, #8ff6ff 48%, #8fffd0);
  color: #051018;
}

.relay-model-card {
  display: grid;
  gap: 12px;
  min-height: 260px;
  align-content: center;
  padding: 24px;
  border: 1px solid rgba(143, 248, 255, 0.16);
  border-radius: 8px;
  background:
    radial-gradient(circle at 72% 28%, rgba(53, 232, 255, 0.16), transparent 34%),
    rgba(255, 255, 255, 0.055);
}

.relay-model-card span,
.relay-model-card p,
.relay-model-card em {
  color: rgba(231, 246, 250, 0.68);
  font-size: 12px;
  font-style: normal;
  line-height: 1.6;
}

.relay-model-card strong {
  color: #f8fffd;
  font-size: clamp(28px, 4vw, 56px);
  line-height: 1;
}

.admin-relay-test-card {
  display: grid;
  gap: 12px;
  margin-top: 14px;
  padding: 18px;
  border: 1px solid rgba(143, 248, 255, 0.14);
  border-radius: 8px;
  background: rgba(3, 10, 18, 0.52);
}

.admin-relay-test-card > span,
.admin-relay-test-card > p,
.relay-test-row em,
.relay-test-row p {
  color: rgba(231, 246, 250, 0.68);
  font-size: 12px;
  font-style: normal;
  line-height: 1.6;
}

.admin-relay-test-card > strong {
  color: #f8fffd;
  font-size: 20px;
}

.relay-test-list {
  display: grid;
  gap: 10px;
}

.relay-test-row {
  display: grid;
  grid-template-columns: minmax(70px, max-content) max-content 1fr;
  gap: 8px 10px;
  align-items: center;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.045);
}

.relay-test-row b {
  color: #f8fffd;
  font-size: 13px;
}

.relay-test-row p {
  grid-column: 1 / -1;
  margin: 0;
}

.relay-test-status {
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 850;
}

.relay-test-status-ok {
  background: rgba(143, 255, 208, 0.14);
  color: #8fffd0;
}

.relay-test-status-fail {
  background: rgba(255, 128, 128, 0.14);
  color: #ffb2b2;
}

.relay-test-status-idle {
  background: rgba(172, 205, 218, 0.1);
  color: rgba(222, 237, 240, 0.68);
}

.admin-deployment-runtime,
.admin-deployment-checklist {
  margin-top: 14px;
}

.admin-deployment-golive,
.admin-deployment-cors,
.admin-deployment-readiness,
.admin-deployment-domains {
  margin-top: 14px;
}

.admin-deployment-golive code {
  padding: 2px 6px;
  border-radius: 5px;
  background: rgba(143, 248, 255, 0.12);
  color: #efffff;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 11px;
}

.admin-deployment-code-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.admin-deployment-actions {
  margin-top: 14px;
}

.admin-deployment-code-card {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid rgba(178, 242, 255, 0.1);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.055);
}

.admin-deployment-code-card span {
  color: rgba(231, 246, 250, 0.72);
  font-size: 12px;
  line-height: 1.5;
}

.admin-deployment-code-card pre {
  margin: 0;
  padding: 12px;
  border-radius: 6px;
  background: rgba(5, 14, 24, 0.72);
  color: #f3fffd;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 12px;
  line-height: 1.7;
  white-space: pre-wrap;
  word-break: break-word;
}

.view-enter {
  animation: viewEnter 0.34s cubic-bezier(0.2, 0.8, 0.2, 1);
}

@keyframes viewEnter {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.992);
    filter: blur(6px);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

@keyframes heroScan {
  0% {
    transform: translateX(-120%);
  }

  100% {
    transform: translateX(120%);
  }
}

@keyframes particleDrift {
  0%,
  100% {
    opacity: 0.3;
    transform: translate3d(0, 0, 0) scale(0.82);
  }

  50% {
    opacity: 1;
    transform: translate3d(28px, -34px, 0) scale(1.18);
  }
}

@keyframes scanDown {
  0%,
  18% {
    opacity: 0;
    transform: translateY(-110%);
  }

  42%,
  72% {
    opacity: 1;
  }

  100% {
    opacity: 0;
    transform: translateY(420%);
  }
}

@keyframes beamSweep {
  0%,
  36% {
    opacity: 0;
    transform: translateX(-120%);
  }

  58% {
    opacity: 1;
  }

  100% {
    opacity: 0;
    transform: translateX(120%);
  }
}

@keyframes ringPulse {
  0%,
  100% {
    filter: drop-shadow(0 0 10px rgba(117, 247, 255, 0.18));
    transform: scale(0.96);
  }

  50% {
    filter: drop-shadow(0 0 28px rgba(117, 247, 255, 0.45));
    transform: scale(1.04);
  }
}

@keyframes heroFloat {
  0%,
  100% {
    transform: translateY(0) rotateY(-4deg) rotateX(1deg);
  }

  50% {
    transform: translateY(-8px) rotateY(-2deg) rotateX(1deg);
  }
}

@keyframes heroPulse {
  0%,
  100% {
    opacity: 0.56;
    transform: scale(0.92);
  }

  50% {
    opacity: 0.92;
    transform: scale(1.08);
  }
}

@keyframes sparkPulse {
  0%,
  100% {
    opacity: 0.82;
    transform: scale(1);
  }

  50% {
    opacity: 1;
    transform: scale(1.08);
  }
}

@keyframes buttonSheen {
  0%,
  54% {
    transform: translateX(-110%);
  }

  100% {
    transform: translateX(110%);
  }
}

@keyframes mistDrift {
  0%,
  100% {
    opacity: 0.58;
    transform: translate3d(-4%, 0, 0) scale(1);
  }

  50% {
    opacity: 0.86;
    transform: translate3d(5%, -7%, 0) scale(1.08);
  }
}

@keyframes hudBreath {
  0%,
  100% {
    opacity: 0.66;
    transform: translateY(0);
  }

  50% {
    opacity: 0.96;
    transform: translateY(-5px);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}

@media (max-width: 1180px) {
  .prototype-frame {
    padding: 0;
  }

  .desktop-app {
    grid-template-columns: clamp(132px, 15vw, 150px) minmax(0, 1fr);
    width: 100%;
    height: 100dvh;
  }

  .sidebar {
    padding: 28px 10px 14px;
  }

  .console-grid {
    grid-template-columns: minmax(240px, 32vw) minmax(300px, 1fr);
    overflow: auto;
  }

  .settings-panel {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    max-height: none;
    overflow: visible;
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .setting-section {
    margin-bottom: 0;
  }

  .generate-button,
  .credit-note,
  .progress-panel {
    grid-column: 1 / -1;
  }

  .module-stats,
  .module-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .asset-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .admin-dashboard-grid {
    grid-template-columns: 1fr;
  }

  .admin-users-grid,
  .admin-subadmin-grid {
    grid-template-columns: 1fr;
  }

  .admin-account-panel {
    grid-column: auto;
    grid-row: auto;
  }

  .admin-overview-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .kanban-board,
  .collab-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .approval-panel {
    grid-column: 1 / -1;
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .login-panel {
    display: block;
    width: min(100%, 540px);
  }

  .login-visual {
    display: none;
  }

  .login-auth {
    padding: clamp(24px, 4vw, 34px);
  }

  .desktop-app {
    display: block;
    overflow: visible;
    border-radius: 0;
    min-height: 100vh;
  }

  .sidebar {
    position: sticky;
    top: 0;
    z-index: 5;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 12px;
    padding: 12px;
  }

  .nav-list {
    display: flex;
    gap: 8px;
    align-items: center;
    overflow-x: auto;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
  }

  .nav-list::-webkit-scrollbar {
    display: none;
  }

  .nav-item {
    flex: 0 0 auto;
    width: auto;
    height: 38px;
    scroll-snap-align: start;
    white-space: nowrap;
  }

  .user-card {
    display: none;
  }

  .legal-links {
    grid-column: 1 / -1;
    justify-content: center;
  }

  .plan-card {
    display: none;
  }

  .sidebar-actions {
    display: flex;
    gap: 8px;
    align-items: center;
  }

  .login-open-button {
    width: auto;
    min-width: 62px;
    height: 34px;
    white-space: nowrap;
  }

  .language-select {
    flex: 1 1 0;
    min-width: 0;
    height: 34px;
  }

  .profile-center-button {
    width: auto;
    min-width: 86px;
    height: 34px;
    white-space: nowrap;
  }

  .workbench {
    display: block;
    overflow: visible;
  }

  .app-header {
    position: sticky;
    top: 62px;
    z-index: 4;
    background: #fff;
  }

  .console-grid {
    grid-template-columns: 1fr;
    overflow: visible;
  }

  .prompt-panel,
  .settings-panel {
    border: 0;
    border-bottom: 1px solid var(--line);
  }

  .settings-panel {
    display: block;
  }

  .setting-section {
    margin-bottom: 22px;
  }

  .poster-shell img {
    height: auto;
    aspect-ratio: 9 / 16;
  }

  .results-row {
    overflow: visible;
    padding-bottom: 26px;
  }

  .variant-strip {
    height: auto;
  }

  .variant-button {
    height: 126px;
  }

  .brand-panel-grid,
  .collab-grid,
  .kanban-board {
    grid-template-columns: 1fr;
  }

  .brand-token-row,
  .brand-rule-list,
  .asset-grid,
  .history-summary,
  .approval-panel {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .history-table {
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .login-overlay {
    grid-template-columns: 1fr;
    overflow-y: auto;
  }

  .billing-panel-grid {
    grid-template-columns: 1fr;
  }

  .billing-package-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .profile-center-grid,
  .generate-summary-grid,
  .generate-balance-row {
    grid-template-columns: 1fr;
  }

  .billing-column + .billing-column {
    border-left: 0;
    border-top: 1px solid rgba(178, 242, 255, 0.08);
  }

  .admin-relay-grid {
    grid-template-columns: 1fr;
  }

  .admin-deployment-code-grid {
    grid-template-columns: 1fr;
  }

  .history-row {
    min-width: 760px;
  }

  .kanban-column {
    min-height: 0;
  }
}

@media (max-width: 640px) {
  .prototype-frame {
    padding: 0;
  }

  .brand small {
    display: none;
  }

  .sidebar {
    grid-template-columns: 44px minmax(0, 1fr);
  }

  .sidebar-actions {
    grid-column: 1 / -1;
    justify-content: stretch;
  }

  .login-open-button {
    flex: 1 1 0;
  }

  .profile-center-button {
    flex: 1 1 0;
    min-width: 0;
  }

  .app-header {
    grid-template-rows: auto 48px;
    padding: 14px 16px 0;
  }

  .app-header p {
    line-height: 1.6;
  }

  .category-tabs {
    margin: 12px -16px 0;
    padding: 0 16px;
  }

  .prompt-panel,
  .settings-panel,
  .canvas-column,
  .module-view {
    padding: 18px 16px;
  }

  .ratio-grid,
  .variant-strip,
  .module-stats,
  .module-card-grid {
    grid-template-columns: 1fr 1fr;
  }

  .brand-token-row,
  .brand-rule-list,
  .asset-grid,
  .history-summary,
  .admin-overview-grid,
  .admin-dashboard-grid,
  .approval-panel {
    grid-template-columns: 1fr;
  }

  .login-overlay {
    padding: 18px;
  }

  .billing-overlay {
    padding: 8px;
  }

  .profile-center-overlay {
    padding: 16px;
  }

  .billing-panel-head,
  .billing-column {
    padding-left: 16px;
    padding-right: 16px;
  }

  .billing-panel {
    max-height: calc(100vh - 16px);
    max-height: calc(100dvh - 16px);
    border-radius: 14px;
  }

  .billing-panel-head {
    align-items: flex-start;
  }

  .billing-panel-head h2 {
    font-size: 23px;
  }

  .billing-section-head {
    display: grid;
  }

  .billing-section-head small {
    justify-content: flex-start;
    max-width: none;
    text-align: left;
  }

  .billing-package-list {
    grid-template-columns: 1fr;
  }

  .billing-checkout-bar {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .billing-checkout-selection small {
    white-space: normal;
  }

  .billing-checkout-bar button {
    width: 100%;
  }

  .purchase-order-card {
    grid-template-columns: 1fr;
  }

  .purchase-order-value {
    justify-items: start;
  }

  .purchase-order-state {
    justify-content: flex-start;
  }

  .login-panel {
    max-height: calc(100vh - 36px);
    max-height: calc(100dvh - 36px);
    overflow-y: auto;
  }

  .login-auth {
    padding: 22px;
  }

  .admin-deployment-code-card pre {
    font-size: 11px;
  }

  .module-section-head {
    display: block;
  }

  .module-section-head h3 {
    margin-top: 6px;
  }

  .brand-command,
  .asset-command,
  .history-command,
  .project-command,
  .collab-command {
    padding: 14px;
  }

  .module-hero {
    display: block;
  }

  .module-hero button {
    width: 100%;
    margin-top: 18px;
  }

  .results-head {
    display: block;
  }

  .results-head > div:last-child {
    display: flex;
    gap: 10px;
    margin-top: 10px;
  }

  .variant-button {
    height: 126px;
  }
}

@media (max-width: 900px) {
  .workbench.home-mode .first-screen-hero {
    margin: 0;
  }

  .dithering-card-hero {
    padding: 0;
  }

  .hero-dithering-card {
    min-height: 100dvh;
    border-radius: 0;
  }
}

@media (max-width: 640px) {
  .dithering-card-hero {
    padding: 0;
  }

  .hero-dithering-card {
    min-height: 100dvh;
    border-radius: 0;
  }

  .hero-dither-content {
    padding: 0 20px;
  }

  .hero-dither-content::before {
    width: min(126vw, 620px);
    height: 308px;
    transform: translate(-50%, -40%);
    opacity: 0.88;
  }

  .hero-live-badge {
    margin-bottom: 16px;
    padding: 7px 15px;
    font-size: 11.5px;
    font-weight: 420;
    line-height: 1.38;
    font-variation-settings: "wght" 420;
  }

  .hero-dither-content h2 {
    max-width: min(92vw, 336px);
    gap: 10px;
    font-size: 35px;
    line-height: 1.04;
    font-weight: 520;
    font-variation-settings: "opsz" 30, "wght" 520;
  }

  .hero-title-lead {
    font-size: 12px;
    font-weight: 400;
    line-height: 1.58;
    font-variation-settings: "opsz" 17, "wght" 400;
  }

  .hero-title-main {
    max-width: none;
    gap: 0.05em;
    font-size: clamp(42px, 10.6vw, 50px);
    font-weight: 520;
    line-height: 1.04;
    font-variation-settings: "opsz" 30, "wght" 520;
    white-space: normal;
  }

  .hero-dither-content p {
    max-width: 20em;
    font-size: 13.6px;
    font-weight: 400;
    line-height: 1.86;
    font-variation-settings: "opsz" 17, "wght" 400;
  }

  .dithering-card-hero .hero-actions button {
    height: 52px;
    font-size: 13.8px;
    font-weight: 500;
    font-variation-settings: "wght" 500;
  }

  .dithering-card-hero .hero-actions,
  .dithering-card-hero .hero-actions button {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .dithering-card-hero .hero-actions button,
  .hero-gradient-breath,
  .hero-smoke-layer,
  .hero-dither-canvas,
  .hero-dither-field {
    animation: none;
    transition: none;
  }
}

/* ponytail: visual-only flow reset; split into components if this page becomes a React app. */
.workbench.app-mode {
  grid-template-rows: auto auto;
  min-height: 100dvh;
  overflow: auto;
  background:
    radial-gradient(circle at 20% 0%, rgba(8, 199, 102, 0.16), transparent 28%),
    radial-gradient(circle at 82% 10%, rgba(53, 232, 255, 0.16), transparent 32%),
    #080b0d;
}

.workbench.app-mode .app-header {
  grid-template-rows: auto auto;
  gap: 18px;
  padding: 26px 30px 22px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(8, 11, 13, 0.92);
  color: #f5fff9;
}

.workbench.app-mode .app-header h1 {
  margin: 0;
  font-size: clamp(28px, 3vw, 44px);
  line-height: 1;
}

.workbench.app-mode .app-header p {
  max-width: 720px;
  margin: 12px 0 0;
  color: rgba(235, 250, 244, 0.68);
  font-size: 14px;
}

.workbench.app-mode .category-tabs {
  gap: 10px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.04);
}

.workbench.app-mode .category-tab {
  min-width: 78px;
  height: 38px;
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.82);
  font-size: 13px;
}

.workbench.app-mode .category-tab:hover,
.workbench.app-mode .category-tab.active {
  background: #10c873;
  color: #04110b;
}

.workbench.app-mode .console-grid {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  align-self: start;
  gap: 14px;
  grid-row: 2;
  height: max-content;
  min-height: max-content;
  padding: 18px;
  overflow: visible;
}

.workbench.app-mode .prompt-panel {
  order: 1;
}

.workbench.app-mode .settings-panel {
  order: 2;
}

.workbench.app-mode .canvas-column {
  order: 3;
}

.workbench.app-mode .prompt-panel,
.workbench.app-mode .settings-panel,
.workbench.app-mode .canvas-column {
  width: 100%;
  flex: 0 0 auto;
  min-height: auto;
  height: auto;
  align-self: stretch;
  overflow: visible;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.24);
}

.workbench.app-mode .prompt-panel {
  display: grid;
  grid-template-columns: 150px minmax(380px, 1.1fr) minmax(260px, 0.75fr) minmax(390px, 1fr) minmax(120px, 0.35fr);
  gap: 14px;
  padding: 18px 20px;
}

.workbench.app-mode .settings-panel {
  display: grid;
  grid-template-columns: 150px minmax(250px, 0.8fr) minmax(460px, 1.2fr) minmax(260px, 0.8fr);
  gap: 14px;
  padding: 18px 20px;
}

.workbench.app-mode .prompt-panel::before,
.workbench.app-mode .canvas-column::before,
.workbench.app-mode .settings-panel::before {
  display: block;
  grid-column: 1;
  grid-row: 1;
  margin: 0;
  padding-top: 4px;
  color: #07100b;
  font-size: 18px;
  font-weight: 900;
}

.workbench.app-mode .prompt-panel::before {
  content: "1. 填写需求";
}

.workbench.app-mode .canvas-column::before {
  width: min(100%, 560px);
  content: "3. 预览方向";
}

.workbench.app-mode .settings-panel::before {
  content: "2. 设置并生成";
}

.workbench.app-mode .workflow-card,
.workbench.app-mode .field-group,
.workbench.app-mode .setting-section {
  min-width: 0;
  margin-bottom: 0;
  padding: 14px;
  border: 1px solid rgba(9, 18, 13, 0.08);
  border-radius: 16px;
  background: #ffffff;
}

.workbench.app-mode .workflow-card,
.workbench.app-mode .workflow-fields-section,
.workbench.app-mode .setting-section:nth-of-type(3),
.workbench.app-mode .setting-section:nth-of-type(4),
.workbench.app-mode .setting-section:nth-of-type(5) {
  display: none;
}

.workbench.app-mode .prompt-panel > .field-group:first-child {
  grid-column: 2;
}

.workbench.app-mode .prompt-panel > .field-group:nth-of-type(2) {
  grid-column: 3;
}

.workbench.app-mode .prompt-panel > .field-group:nth-of-type(3) {
  grid-column: 4;
}

.workbench.app-mode .prompt-panel > .field-group:nth-of-type(4) {
  grid-column: 5;
}

.workbench.app-mode .textarea-shell textarea {
  height: 86px;
  font-size: 13px;
}

.workbench.app-mode .negative-box textarea {
  height: 86px;
}

.workbench.app-mode .ratio-grid {
  grid-template-columns: repeat(5, minmax(52px, 1fr));
  gap: 8px;
}

.workbench.app-mode .ratio {
  min-height: 52px;
}

.workbench.app-mode .custom-size {
  height: 34px;
  margin-top: 10px;
}

.workbench.app-mode .reference-row {
  margin-top: 10px;
}

.workbench.app-mode .reference-row img,
.workbench.app-mode .reference-row button {
  width: 54px;
  height: 54px;
}

.workbench.app-mode .canvas-column {
  display: grid;
  grid-template-columns: 150px minmax(320px, 1fr);
  gap: 14px;
  align-items: center;
  justify-items: start;
  justify-content: flex-start;
  padding: 18px 20px;
}

.workbench.app-mode .poster-shell,
.workbench.app-mode .canvas-head,
.workbench.app-mode .canvas-column::before {
  width: min(100%, 640px);
}

.workbench.app-mode .canvas-head,
.workbench.app-mode .poster-shell,
.workbench.app-mode .canvas-tools {
  grid-column: 2;
}

.workbench.app-mode .canvas-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 0;
}

.workbench.app-mode .poster-shell img {
  height: clamp(220px, 30vh, 340px);
  min-height: 0;
}

.workbench.app-mode .poster-copy span {
  margin-bottom: 18px;
  font-size: 11px;
}

.workbench.app-mode .poster-copy strong {
  font-size: clamp(28px, 3vw, 44px);
}

.workbench.app-mode .poster-copy em {
  font-size: clamp(14px, 1.8vw, 22px);
}

.workbench.app-mode .poster-copy small {
  margin-top: clamp(24px, 8vh, 86px);
  font-size: 13px;
}

.workbench.app-mode .settings-panel > .setting-section:nth-of-type(2) {
  grid-column: 2;
}

.workbench.app-mode .settings-panel > .advanced {
  grid-column: 3;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.workbench.app-mode .settings-panel > .advanced .field-head {
  grid-column: 1 / -1;
  margin-bottom: 0;
}

.workbench.app-mode .advanced label,
.workbench.app-mode .count-row,
.workbench.app-mode .seed-row {
  min-height: 42px;
  margin-top: 0;
  padding: 9px 10px;
  border: 1px solid rgba(9, 18, 13, 0.08);
  border-radius: 12px;
  background: #fbfcfb;
}

.workbench.app-mode .advanced .param-row {
  grid-column: 1 / -1;
}

.workbench.app-mode .generate-button,
.workbench.app-mode .credit-note,
.workbench.app-mode .progress-panel {
  grid-column: 4;
}

.workbench.app-mode .credit-note {
  margin: 0;
}

.workbench.app-mode .generate-button {
  height: 56px;
  margin-top: 0;
  border-radius: 16px;
  font-size: 16px;
}

.workbench.app-mode .results-row {
  display: none;
}

/* ponytail: CSS-only workspace reshape; add real accordions only if sections need saved open state. */
.workbench.app-mode .category-tabs {
  flex-wrap: nowrap;
  align-items: center;
  height: 34px;
  min-height: 34px;
  overflow-x: auto;
  padding: 4px 10px;
  scrollbar-width: none;
}

.workbench.app-mode .category-tab {
  height: 26px;
  min-width: auto;
  padding: 0 12px;
  font-size: 11.5px;
}

.workbench.app-mode .category-tabs::-webkit-scrollbar {
  display: none;
}

.workbench.app-mode .console-grid {
  display: grid;
  grid-template-columns: minmax(680px, 1fr) minmax(420px, 42vw);
  grid-template-areas:
    "prompt preview"
    "settings preview";
  gap: 16px;
}

.workbench.app-mode .prompt-panel {
  grid-area: prompt;
  grid-template-columns: 128px minmax(0, 1fr) minmax(280px, 0.55fr);
  gap: 12px;
  padding: 16px;
}

.workbench.app-mode .settings-panel {
  grid-area: settings;
  grid-template-columns: 128px minmax(210px, 0.8fr) minmax(220px, 0.8fr) minmax(340px, 1fr);
  gap: 12px;
  padding: 16px;
}

.workbench.app-mode .canvas-column {
  position: sticky;
  top: 18px;
  grid-area: preview;
  grid-template-columns: 1fr;
  grid-template-rows: auto auto 1fr auto;
  align-items: start;
  justify-items: center;
  min-height: clamp(620px, calc(100dvh - 270px), 900px);
  padding: 18px;
}

.workbench.app-mode .prompt-panel::before {
  grid-column: 1;
  grid-row: 1 / span 3;
}

.workbench.app-mode .settings-panel::before {
  grid-column: 1;
  grid-row: 1 / span 2;
}

.workbench.app-mode .canvas-column::before,
.workbench.app-mode .canvas-head,
.workbench.app-mode .poster-shell,
.workbench.app-mode .canvas-tools {
  grid-column: 1;
}

.workbench.app-mode .canvas-column::before,
.workbench.app-mode .poster-shell,
.workbench.app-mode .canvas-head {
  width: 100%;
  max-width: 720px;
}

.workbench.app-mode .canvas-head {
  margin-top: 8px;
}

.workbench.app-mode .poster-shell img {
  height: clamp(390px, 56vh, 650px);
}

.workbench.app-mode .prompt-panel > .field-group:first-child {
  grid-column: 2;
  grid-row: 1;
}

.workbench.app-mode .prompt-panel > .field-group:nth-of-type(2) {
  grid-column: 2;
  grid-row: 2;
}

.workbench.app-mode .prompt-panel > .field-group:nth-of-type(3) {
  grid-column: 3;
  grid-row: 1 / span 2;
}

.workbench.app-mode .prompt-panel > .field-group:nth-of-type(4) {
  grid-column: 3;
  grid-row: 3;
}

.workbench.app-mode .textarea-shell textarea {
  height: 118px;
}

.workbench.app-mode .prompt-template-grid {
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
}

.workbench.app-mode .prompt-template-card {
  min-height: 58px;
}

.workbench.app-mode .negative-box textarea {
  height: 64px;
}

.workbench.app-mode .settings-panel > .setting-section:nth-of-type(2) {
  grid-column: 2;
  grid-row: 1;
}

.workbench.app-mode .settings-panel > .setting-section:nth-of-type(3) {
  display: block;
  grid-column: 3;
  grid-row: 1;
}

.workbench.app-mode .settings-panel > .generate-summary-card {
  display: grid;
  grid-column: 2 / 5;
  grid-row: 2;
}

.workbench.app-mode .settings-panel > .advanced {
  grid-column: 4;
  grid-row: 1;
}

.workbench.app-mode .generate-button,
.workbench.app-mode .credit-note,
.workbench.app-mode .progress-panel {
  grid-column: 2 / 5;
}

.workbench.app-mode .generate-button {
  height: 50px;
}

.workbench.app-mode .credit-note,
.workbench.app-mode .progress-panel {
  justify-self: stretch;
  margin-top: 0;
}

.workbench.app-mode .progress-panel {
  padding: 0 4px;
}

.workbench.app-mode .prompt-panel,
.workbench.app-mode .settings-panel {
  align-items: start;
}

.workbench.app-mode .prompt-panel {
  grid-template-columns: 120px minmax(0, 1fr) minmax(230px, 280px);
}

.workbench.app-mode .prompt-panel > .field-group:first-child {
  grid-column: 2;
  grid-row: 1;
}

.workbench.app-mode .prompt-panel > .field-group:nth-of-type(2) {
  grid-column: 2;
  grid-row: 2;
}

.workbench.app-mode .prompt-panel > .field-group:nth-of-type(3) {
  grid-column: 3;
  grid-row: 1 / span 2;
}

.workbench.app-mode .prompt-panel > .field-group:nth-of-type(4) {
  grid-column: 2 / 4;
  grid-row: 3;
}

.workbench.app-mode .ratio-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.workbench.app-mode .settings-panel {
  grid-template-columns: 120px minmax(0, 1fr) minmax(0, 1fr);
}

.workbench.app-mode .settings-panel > .setting-section:nth-of-type(2) {
  grid-column: 2;
}

.workbench.app-mode .settings-panel > .setting-section:nth-of-type(3) {
  grid-column: 3;
}

.workbench.app-mode .settings-panel > .generate-summary-card {
  grid-column: 2 / 4;
  grid-row: 3;
}

.workbench.app-mode .settings-panel > .advanced,
.workbench.app-mode .generate-button,
.workbench.app-mode .credit-note,
.workbench.app-mode .progress-panel {
  grid-column: 2 / 4;
}

.workbench.app-mode .settings-panel > .advanced {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-row: 2;
}

.workbench.app-mode .settings-panel > .setting-section.advanced {
  display: grid;
  grid-column: 2 / 4;
  grid-row: 2;
}

.workbench.app-mode .generate-button,
.workbench.app-mode .credit-note,
.workbench.app-mode .progress-panel {
  grid-row: 4;
}

.workbench.app-mode .typography-row {
  grid-column: 1 / -1;
}

@media (max-width: 1280px) {
  .workbench.app-mode .prompt-panel,
  .workbench.app-mode .settings-panel,
  .workbench.app-mode .canvas-column {
    grid-template-columns: 1fr;
  }

  .workbench.app-mode .prompt-panel::before,
  .workbench.app-mode .settings-panel::before,
  .workbench.app-mode .canvas-column::before,
  .workbench.app-mode .prompt-panel > .field-group,
  .workbench.app-mode .settings-panel > .setting-section,
  .workbench.app-mode .settings-panel > .advanced,
  .workbench.app-mode .generate-button,
  .workbench.app-mode .credit-note,
  .workbench.app-mode .progress-panel,
  .workbench.app-mode .canvas-head,
  .workbench.app-mode .poster-shell,
  .workbench.app-mode .canvas-tools {
    grid-column: 1;
    grid-row: auto;
  }
}

/* ponytail: simplify secondary modules without rewriting the shared module renderer. */
.module-view[data-module="素材库"],
.module-view[data-module="生成记录"] {
  padding: 24px;
  background: #f5f7f6;
}

.module-view[data-module="素材库"] .module-hero,
.module-view[data-module="生成记录"] .module-hero,
.module-view[data-module="素材库"] .module-stat,
.module-view[data-module="生成记录"] .module-stat,
.module-view[data-module="素材库"] .asset-command,
.module-view[data-module="生成记录"] .history-command {
  border: 1px solid #dfe6e2;
  border-radius: 16px;
  background: #fff;
  box-shadow: none;
}

.module-view[data-module="素材库"] .module-card-grid,
.module-view[data-module="素材库"] .module-detail,
.module-view[data-module="生成记录"] .module-card-grid,
.module-view[data-module="生成记录"] .module-detail,
.module-view[data-module="素材库"] .asset-insight {
  display: none;
}

.module-view[data-module="素材库"] .module-stats,
.module-view[data-module="生成记录"] .module-stats {
  margin: 16px 0;
}

.module-view[data-module="素材库"] .asset-command,
.module-view[data-module="生成记录"] .history-command {
  padding: 18px;
}

.module-view[data-module="素材库"] .module-section-head,
.module-view[data-module="生成记录"] .module-section-head {
  padding-bottom: 12px;
  border-bottom: 1px solid #e6ece8;
}

.module-view[data-module="素材库"] .asset-filter-row {
  margin: 0 0 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid #eef2ef;
}

.module-view[data-module="素材库"] .asset-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.module-view[data-module="素材库"] .asset-tile {
  min-height: 168px;
  padding: 12px;
  border-radius: 14px;
  background: #fff;
}

.module-view[data-module="素材库"] .asset-thumb {
  height: 104px;
  border-radius: 12px;
}

.module-view[data-module="生成记录"] .history-table {
  gap: 0;
  overflow: hidden;
  border: 1px solid #e2e8e4;
  border-radius: 14px;
  background: #fff;
}

.module-view[data-module="生成记录"] .history-row {
  grid-template-columns: 82px minmax(220px, 1fr) 86px 110px 72px 72px auto;
  border: 0;
  border-bottom: 1px solid #edf1ee;
  border-radius: 0;
  background: #fff;
}

.module-view[data-module="生成记录"] .history-row:last-child {
  border-bottom: 0;
}

.module-view[data-module="生成记录"] .history-summary {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 14px;
}

@media (max-width: 1180px) {
  .module-view[data-module="素材库"] .asset-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* ponytail: CSS-only module cleanup; split into real components only when these modules get separate routes. */
.workbench.module-mode .module-view {
  padding: clamp(18px, 2.2vw, 34px);
  background:
    radial-gradient(circle at 12% 0%, rgba(15, 199, 112, 0.12), transparent 34%),
    radial-gradient(circle at 88% 12%, rgba(35, 108, 255, 0.1), transparent 30%),
    linear-gradient(135deg, #eef3f0 0%, #f7f8f5 54%, #edf4f1 100%);
}

.workbench.module-mode .module-hero,
.workbench.module-mode .brand-command,
.workbench.module-mode .video-command,
.workbench.module-mode .asset-command,
.workbench.module-mode .history-command,
.workbench.module-mode .project-command,
.workbench.module-mode .collab-command {
  border: 1px solid rgba(16, 29, 23, 0.08);
  border-radius: 22px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.86), rgba(244, 248, 245, 0.78)),
    radial-gradient(circle at 92% 8%, rgba(8, 199, 102, 0.12), transparent 30%);
  box-shadow: 0 22px 58px rgba(12, 24, 20, 0.1);
}

.workbench.module-mode .module-hero {
  align-items: center;
  padding: 22px 24px;
  background:
    radial-gradient(circle at 88% 8%, rgba(58, 255, 178, 0.16), transparent 32%),
    linear-gradient(135deg, #07100c, #18332a 58%, #23463b);
  color: #f6fffb;
}

.workbench.module-mode .module-hero span,
.workbench.module-mode .module-hero h2,
.workbench.module-mode .module-hero p {
  color: inherit;
}

.workbench.module-mode .module-hero span {
  opacity: 0.72;
}

.workbench.module-mode .module-hero p {
  color: rgba(246, 255, 251, 0.72);
}

.workbench.module-mode .module-hero button {
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.12);
  box-shadow: none;
}

.workbench.module-mode .module-stats {
  display: flex;
  gap: 0;
  overflow: hidden;
  margin: 14px 0 18px;
  border: 1px solid rgba(13, 31, 24, 0.08);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.58);
  box-shadow: 0 14px 36px rgba(12, 24, 20, 0.06);
}

.workbench.module-mode .module-stat {
  flex: 1 1 0;
  min-width: 0;
  padding: 14px 18px;
  border: 0;
  border-right: 1px solid rgba(13, 31, 24, 0.07);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.workbench.module-mode .module-stat:last-child {
  border-right: 0;
}

.workbench.module-mode .module-stat strong {
  font-size: 22px;
}

.workbench.module-mode .asset-command,
.workbench.module-mode .video-command,
.workbench.module-mode .history-command {
  padding: clamp(18px, 2vw, 28px);
}

.module-view[data-module="视频生成"] {
  padding: clamp(16px, 2vw, 28px);
}

.workbench.module-mode .module-view[data-module="视频生成"] > .module-hero,
.workbench.module-mode .module-view[data-module="视频生成"] > .module-stats,
.workbench.module-mode .module-view[data-module="视频生成"] > .module-card-grid,
.workbench.module-mode .module-view[data-module="视频生成"] > .module-detail {
  display: none;
}

.module-view[data-module="视频生成"] > .module-workspace {
  margin: 0;
}

.video-command {
  max-width: 1180px;
  margin: 0 auto;
}

.video-command .module-section-head {
  display: grid;
  gap: 4px;
}

.video-command .module-section-head p {
  margin: 0;
  color: #66706b;
  font-size: 13px;
}

.video-guide-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 0 0 16px;
  padding: 0;
  list-style: none;
}

.video-guide-steps li {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(13, 31, 24, 0.08);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.72);
}

.video-guide-steps li > b,
.video-guide-section-head > b {
  display: grid;
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 11px;
  color: #064429;
  background: #dff7eb;
  font-size: 13px;
}

.video-guide-steps span,
.video-guide-steps strong,
.video-guide-steps small {
  display: block;
  min-width: 0;
}

.video-guide-steps strong {
  color: #07100b;
  font-size: 13px;
}

.video-guide-steps small {
  margin-top: 3px;
  color: #66706b;
  font-size: 11px;
  line-height: 1.4;
}

.video-guided-form {
  display: grid;
  gap: 14px;
  padding: 0;
  border: 0;
  background: transparent;
}

.video-guide-section {
  min-width: 0;
  padding: 18px;
  border: 1px solid rgba(13, 31, 24, 0.08);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.78);
}

.video-guide-section-head {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-bottom: 16px;
}

.video-guide-section-head > b {
  color: #04110b;
  background: #10c873;
}

.video-guide-section-head div,
.video-guide-section-head strong,
.video-guide-section-head span {
  display: block;
  min-width: 0;
}

.video-guide-section-head strong {
  color: #07100b;
  font-size: 15px;
}

.video-guide-section-head span {
  margin-top: 3px;
  color: #66706b;
  font-size: 12px;
  line-height: 1.45;
}

.video-prompt-library {
  margin-top: 14px;
  padding: 16px;
  border: 1px solid rgba(13, 31, 24, 0.08);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
}

.video-prompt-library-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.video-prompt-library-head div {
  display: grid;
  gap: 3px;
}

.video-prompt-library-head span,
.video-prompt-library-head small {
  color: #66706b;
  font-size: 12px;
}

.video-prompt-library-head strong {
  color: #07100b;
  font-size: 15px;
}

.video-prompt-library-head small {
  text-align: right;
}

.video-prompt-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.video-prompt-card {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 10px;
  min-width: 0;
  min-height: 72px;
  align-items: center;
  padding: 10px;
  border: 1px solid #dfe8e3;
  border-radius: 14px;
  color: #111714;
  text-align: left;
  background: #f8fbf9;
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.video-prompt-card:hover,
.video-prompt-card:focus-visible,
.video-prompt-card.is-active {
  border-color: rgba(8, 199, 102, 0.5);
  background: rgba(8, 199, 102, 0.08);
  outline: none;
}

.video-prompt-card:hover {
  transform: translateY(-1px);
}

.video-prompt-card b {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 12px;
  color: #075c38;
  background: #dff7eb;
  font-size: 13px;
}

.video-prompt-card.is-active b {
  color: #04110b;
  background: #10c873;
}

.video-prompt-card span,
.video-prompt-card strong,
.video-prompt-card small {
  display: block;
  min-width: 0;
}

.video-prompt-card strong {
  margin-bottom: 3px;
  color: #07100b;
  font-size: 13px;
}

.video-prompt-card small {
  color: #66706b;
  font-size: 11px;
  line-height: 1.4;
}

.video-readiness-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 0 0 14px;
  padding: 12px;
  border: 1px solid rgba(13, 31, 24, 0.08);
  border-radius: 14px;
  background: rgba(237, 243, 240, 0.72);
}

.video-readiness-card div {
  display: grid;
  gap: 4px;
}

.video-readiness-card strong {
  color: #07100b;
  font-size: 13px;
}

.video-readiness-card span {
  color: #66706b;
  font-size: 12px;
  line-height: 1.5;
}

.video-readiness-card b {
  flex: 0 0 auto;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(17, 23, 20, 0.08);
  color: #59645f;
  font-size: 11px;
}

.video-readiness-card.is-ready {
  border-color: rgba(8, 199, 102, 0.22);
  background: rgba(8, 199, 102, 0.08);
}

.video-readiness-card.is-ready b {
  background: #10c873;
  color: #04110b;
}

.video-source-panel label {
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
  color: #5f6964;
  font-size: 12px;
  font-weight: 800;
}

.video-source-panel input,
.video-source-panel textarea,
.video-source-panel select {
  width: 100%;
  border: 1px solid #dfe6e2;
  border-radius: 14px;
  padding: 12px;
  background: #fff;
  color: #111714;
}

.video-source-panel textarea {
  min-height: 180px;
  line-height: 1.65;
  resize: vertical;
}

.video-topic-counter {
  margin-top: -4px;
  color: #66706b;
  font-size: 12px;
  text-align: right;
}

.video-inline-settings {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 2px 0 12px;
}

.video-inline-settings label {
  margin-bottom: 0;
}

.video-workflow-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.video-workflow-group {
  min-width: 0;
  padding: 15px;
  border: 1px solid rgba(13, 31, 24, 0.08);
  border-radius: 16px;
  background: rgba(248, 251, 249, 0.9);
}

.video-workflow-group-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 13px;
}

.video-workflow-group-head strong {
  color: #101713;
  font-size: 14px;
}

.video-workflow-group-head span {
  color: #7b8580;
  font-size: 11px;
  text-align: right;
}

.video-workflow-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.video-workflow-fields label,
.video-workflow-group > label {
  min-width: 0;
  margin-bottom: 10px;
}

.video-workflow-group textarea {
  min-height: 96px;
}

.video-source-panel .video-check-option {
  display: flex;
  min-height: 44px;
  align-items: center;
  align-self: end;
  gap: 9px;
  padding: 10px 12px;
  border: 1px solid #dfe6e2;
  border-radius: 14px;
  background: #fff;
  color: #34423b;
  cursor: pointer;
}

.video-source-panel .video-check-option input[type="checkbox"] {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  margin: 0;
  padding: 0;
  accent-color: #10c873;
}

.video-workflow-advanced {
  margin-top: 12px;
  border: 1px solid rgba(13, 31, 24, 0.08);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.76);
}

.video-workflow-advanced summary {
  padding: 13px 15px;
  color: #34423b;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.video-workflow-advanced .video-workflow-fields {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  padding: 0 15px 15px;
}

.video-task-progress {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px 14px;
  margin-top: 12px;
  padding: 14px 16px;
  border: 1px solid rgba(16, 200, 115, 0.22);
  border-radius: 16px;
  background: #f0fbf6;
}

.video-task-progress[hidden] {
  display: none;
}

.video-task-progress strong,
.video-task-progress span {
  display: block;
}

.video-task-progress strong {
  color: #10231a;
  font-size: 13px;
}

.video-task-progress span,
.video-task-progress > b {
  color: #527062;
  font-size: 12px;
}

.video-task-progress > i {
  grid-column: 1 / -1;
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: #dcebe3;
}

.video-task-progress > i span {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #10c873, #0aa864);
  transition: width 220ms ease;
}

.video-task-result {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
}

.video-task-result-item {
  display: grid;
  gap: 10px;
  padding: 10px;
  border: 1px solid rgba(16, 35, 26, 0.1);
  border-radius: 16px;
  background: #fff;
}

.video-task-result video {
  display: block;
  width: 100%;
  max-height: 420px;
  border-radius: 14px;
  background: #07100b;
}

.video-download-button {
  min-height: 40px;
  border: 0;
  border-radius: 12px;
  color: #fff;
  background: #10231a;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.video-download-button:hover {
  background: #17452f;
}

@media (max-width: 1080px) {
  .video-workflow-grid {
    grid-template-columns: 1fr;
  }

  .video-workflow-advanced .video-workflow-fields {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .video-workflow-fields,
  .video-workflow-advanced .video-workflow-fields {
    grid-template-columns: 1fr;
  }
}

.video-source-panel [data-video-action="submit"] {
  width: 100%;
  height: 44px;
  border: 0;
  border-radius: 14px;
  background: #10c873;
  color: #04110b;
  font-weight: 900;
}

.video-source-panel [data-video-action="submit"]:disabled {
  cursor: wait;
  opacity: 0.68;
}

.video-source-panel button[aria-disabled="true"] {
  cursor: help;
  opacity: 0.72;
}

.video-submit-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(210px, 0.32fr);
  gap: 12px;
  align-items: stretch;
}

.video-submit-row .video-readiness-card {
  margin: 0;
}

.video-submit-action {
  display: grid;
  align-content: center;
  gap: 8px;
}

.video-submit-action > strong {
  color: #07100b;
  font-size: 13px;
  text-align: center;
}

.video-after-submit {
  border: 1px solid rgba(13, 31, 24, 0.08);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.65);
}

.video-after-submit summary {
  padding: 14px 16px;
  color: #34423b;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.video-after-submit > div {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  padding: 0 14px 14px;
}

.video-after-submit article {
  display: flex;
  min-width: 0;
  gap: 8px;
  padding: 10px;
  border-radius: 12px;
  background: #f5f9f7;
}

.video-after-submit article > b {
  display: grid;
  flex: 0 0 24px;
  width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 8px;
  color: #075c38;
  background: #dff7eb;
  font-size: 11px;
}

.video-after-submit article span,
.video-after-submit article strong,
.video-after-submit article small {
  display: block;
  min-width: 0;
}

.video-after-submit article strong {
  color: #07100b;
  font-size: 12px;
}

.video-after-submit article small {
  margin-top: 3px;
  color: #66706b;
  font-size: 10px;
  line-height: 1.4;
}

.workbench.module-mode .module-section-head {
  align-items: center;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(13, 31, 24, 0.08);
}

.workbench.module-mode .module-section-head span {
  color: #087443;
}

.workbench.module-mode .asset-filter-row {
  margin: 0 0 16px;
  padding: 5px;
  border: 1px solid rgba(13, 31, 24, 0.08);
  border-radius: 999px;
  background: rgba(237, 243, 240, 0.9);
}

.workbench.module-mode .asset-filter-row button {
  border: 0;
  background: transparent;
}

.workbench.module-mode .asset-filter-row button.active {
  background: #ffffff;
  box-shadow: 0 8px 18px rgba(12, 24, 20, 0.08);
}

.workbench.module-mode .asset-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.workbench.module-mode .asset-tile,
.workbench.module-mode .history-summary article {
  border: 1px solid rgba(13, 31, 24, 0.08);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: none;
}

.workbench.module-mode .asset-tile {
  min-height: 182px;
  padding: 12px;
}

.workbench.module-mode .asset-thumb {
  height: 112px;
  border-radius: 14px;
}

.workbench.module-mode .history-table {
  gap: 0;
  overflow: hidden;
  border: 1px solid rgba(13, 31, 24, 0.08);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
}

.workbench.module-mode .history-row {
  grid-template-columns: 82px minmax(220px, 1fr) 86px 110px 72px 72px auto;
  border: 0;
  border-bottom: 1px solid rgba(13, 31, 24, 0.07);
  border-radius: 0;
  background: transparent;
}

.workbench.module-mode .history-row:last-child {
  border-bottom: 0;
}

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

  .video-prompt-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .video-after-submit > div {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 520px) {
  .video-prompt-library-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }

  .video-prompt-library-head small {
    text-align: left;
  }

  .video-prompt-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .module-view[data-module="视频生成"] {
    padding: 14px;
  }

  .video-guide-steps,
  .video-submit-row,
  .video-after-submit > div {
    grid-template-columns: 1fr;
  }

  .video-guide-section,
  .video-prompt-library {
    padding: 14px;
  }

  .workbench.module-mode .module-stats,
  .workbench.module-mode .asset-grid,
  .workbench.module-mode .history-summary {
    display: grid;
    grid-template-columns: 1fr;
  }

  .workbench.module-mode .module-stat {
    border-right: 0;
    border-bottom: 1px solid rgba(13, 31, 24, 0.07);
  }

  .workbench.module-mode .module-stat:last-child {
    border-bottom: 0;
  }
}

/* Admin console layout refresh */
@font-face { font-family: "tabler-icons"; src: url("./vendor/tabler-icons.woff2?v=3.45.0") format("woff2"); font-display: block; }

.ti { display: inline-block; width: 1em; height: 1em; font-family: "tabler-icons"; speak: none; font-size: 1em; font-style: normal; font-weight: 400; line-height: 1; text-align: center; vertical-align: -0.125em; -webkit-font-smoothing: antialiased; }

.ti::before { display: block; }
.ti-command::before { content: "\ea78"; }
.ti-layout-dashboard::before { content: "\f02c"; }
.ti-users::before { content: "\ebf2"; }
.ti-user-shield::before { content: "\f7d0"; }
.ti-route::before { content: "\eb17"; }
.ti-arrows-exchange::before { content: "\f1f4"; }
.ti-receipt-yuan::before { content: "\fd6b"; }
.ti-cloud::before { content: "\ea76"; }
.ti-brand-wechat::before { content: "\f5f3"; }
.ti-shield-check::before { content: "\eb22"; }
.ti-file-description::before { content: "\f028"; }
.ti-arrow-left::before { content: "\ea19"; }
.ti-download::before { content: "\ea96"; }
.ti-refresh::before { content: "\eb13"; }
.ti-clipboard-list::before { content: "\ea6d"; }
.ti-player-play::before { content: "\ed46"; }
.ti-currency-yen::before { content: "\ebae"; }
.ti-wallet::before { content: "\eb75"; }
.ti-box::before { content: "\ea45"; }
.ti-photo::before { content: "\eb0a"; }
.ti-user::before { content: "\eb4d"; }
.ti-settings::before { content: "\eb20"; }
.ti-sparkles::before { content: "\f6d7"; }
.ti-menu-2::before { content: "\ec42"; }
.ti-photo-ai::before { content: "\fa32"; }
.ti-video::before { content: "\ed22"; }
.ti-folder::before { content: "\eaad"; }
.ti-history::before { content: "\ebea"; }
.ti-chevron-down::before { content: "\ea5f"; }
.ti-chevron-right::before { content: "\ea61"; }
.ti-x::before { content: "\eb55"; }
.ti-shopping-bag::before { content: "\f5f8"; }
.ti-shield-lock::before { content: "\ed58"; }
.ti-logout::before { content: "\eba8"; }
.ti-user-circle::before { content: "\ef68"; }
.ti-paperclip::before { content: "\eb02"; }

.admin-shell { --admin-bg: #07131f; --admin-sidebar: #0e1a26; --admin-panel: #101e2b; --admin-line: rgba(172, 205, 218, 0.16); --admin-line-soft: rgba(172, 205, 218, 0.1); --admin-text: #f2f7f8; --admin-muted: #93a5b2; --admin-accent: #58e4e7; grid-template-columns: 244px minmax(0, 1fr); overflow: hidden; background: var(--admin-bg); color: var(--admin-text); font-family: "PingFang SC", "Microsoft YaHei", system-ui, sans-serif; font-size: 14px; line-height: 1.5; }

.admin-shell::before { display: none; }

body.admin-visible { overflow: hidden; }

.admin-sidebar { min-height: 0; gap: 20px; padding: 24px 16px 18px; border-right: 1px solid var(--admin-line); background: var(--admin-sidebar); box-shadow: none; backdrop-filter: none; }

.admin-sidebar .brand { flex: 0 0 auto; gap: 12px; min-height: 48px; padding: 0 10px; }

.admin-sidebar .spark-mark { width: 34px; height: 34px; color: #25d99a; font-size: 30px; filter: none; animation: none; }

.admin-sidebar .brand strong { color: var(--admin-text); font-size: 18px; font-weight: 700; line-height: 1.2; }

.admin-sidebar .brand small { margin-top: 4px; color: var(--admin-muted); font-size: 11px; font-weight: 550; }

.admin-nav { display: grid; flex: 1 1 auto; align-content: start; gap: 18px; min-height: 0; overflow-y: auto; padding-right: 2px; scrollbar-width: thin; }

.admin-nav-group, .admin-nav-items { display: grid; align-content: start; }

.admin-nav-group { gap: 7px; }
.admin-nav-items { gap: 4px; }

.admin-nav-label { padding: 0 12px; color: #728493; font-size: 12px; font-weight: 650; }

.admin-nav button, .admin-back-button, .admin-actions button { border-radius: 7px; font-size: 14px; font-weight: 600; }

.admin-nav button { display: flex; align-items: center; gap: 12px; width: 100%; height: 44px; padding: 0 12px; border: 1px solid transparent; background: transparent; color: #aebbc4; text-align: left; box-shadow: none; }

.admin-nav button .ti { flex: 0 0 20px; color: #9fb0bc; font-size: 20px; }

.admin-nav button:hover { border-color: rgba(124, 228, 231, 0.12); background: rgba(79, 137, 151, 0.12); color: var(--admin-text); box-shadow: none; }

.admin-nav button.active { border-color: rgba(88, 228, 231, 0.28); background: #17414a; color: #f4fbfc; box-shadow: none; }

.admin-nav button.active .ti { color: #75edf0; }

.admin-back-button { display: inline-flex; flex: 0 0 auto; align-items: center; justify-content: center; gap: 9px; width: 100%; height: 44px; margin-top: auto; border: 1px solid var(--admin-line); background: #13222f; color: #e5edef; }

.admin-main { display: grid; grid-template-rows: auto auto; align-content: start; gap: 20px; min-width: 0; padding: 24px 28px 30px; overflow-x: hidden; overflow-y: auto; background: var(--admin-bg); }

.admin-topbar { display: flex; align-items: flex-start; min-width: 0; min-height: 98px; gap: 24px; }

.admin-heading { min-width: 0; }

#adminViewKicker { color: var(--admin-accent); font-size: 13px; font-weight: 650; }

.admin-topbar h1 { max-width: 820px; margin: 7px 0 0; color: var(--admin-text); font-size: clamp(34px, 3vw, 40px); font-weight: 720; line-height: 1.12; letter-spacing: -0.035em; }

.admin-view-summary { max-width: 760px; margin: 8px 0 0; color: var(--admin-muted); font-size: 14px; }

.admin-topbar-meta { display: grid; flex: 0 0 auto; justify-items: end; gap: 10px; }

.admin-updated-at { min-height: 20px; color: #718493; font-size: 12px; font-variant-numeric: tabular-nums; }

.admin-actions { display: flex; gap: 10px; margin: 0; }

.admin-actions button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 42px; padding: 0 15px; border: 1px solid var(--admin-line); background: #122330; color: #e7eff1; box-shadow: none; }

.admin-actions button:first-child { border-color: #c7edf2; background: #d6f3f6; color: #0b2530; }

.admin-actions button span { color: inherit; }

.admin-actions .ti { font-size: 18px; }
.admin-actions .ti[hidden] { display: none; }

.admin-content { gap: 18px; width: 100%; min-width: 0; max-width: 100%; }

.admin-overview-grid, .admin-dashboard-grid { gap: 18px; }

.admin-overview-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-rows: auto; }

.admin-overview-grid article, .admin-section { border: 1px solid var(--admin-line); border-radius: 8px; background: var(--admin-panel); box-shadow: none; backdrop-filter: none; }

.admin-overview-grid article { min-height: 120px; padding: 17px 18px; }

.admin-overview-grid article::after { display: none; }

.admin-overview-grid article > span { max-width: calc(100% - 48px); color: #dce7e9; font-size: 14px; font-weight: 650; }

.admin-stat-icon { position: absolute; top: 16px; right: 16px; display: grid; width: 38px; height: 38px; place-items: center; border-radius: 50%; background: rgba(43, 183, 191, 0.16); color: #62e4e8; font-size: 20px; }

.admin-overview-grid strong { margin: 12px 0 7px; color: #f5fafb; font-size: clamp(28px, 2.25vw, 34px); font-weight: 720; font-variant-numeric: tabular-nums; }

.admin-overview-grid em { color: var(--admin-muted); font-size: 13px; font-weight: 450; }

.admin-overview-flow-grid { grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr); align-items: stretch; }

.admin-overview-flow-grid :is(.admin-service-panel, .admin-config-panel) { min-height: 286px; }

.admin-overview-flow-grid .admin-order-panel { min-height: 304px; }

.admin-miniprogram-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.admin-miniprogram-invite,
.admin-miniprogram-checklist,
.admin-miniprogram-config { grid-column: 1 / -1; }

.admin-section { min-width: 0; padding: 18px 20px; }

.admin-section-head { flex-direction: row-reverse; align-items: center; margin-bottom: 8px; }

.admin-section-head h2 { color: #edf4f5; font-size: 17px; font-weight: 680; }

.admin-section-head > span { color: #9cafba; font-size: 12px; font-weight: 550; }

.admin-shell :is(.admin-service-list, .admin-data-table, .admin-order-list) { gap: 0; min-width: 0; overflow: visible; padding-bottom: 0; }

.admin-shell :is(.admin-service-list, .admin-data-table, .admin-order-list) > div { min-width: 0; min-height: 58px; gap: 14px; padding: 11px 0; border: 0; border-bottom: 1px solid var(--admin-line-soft); border-radius: 0; background: transparent; }

.admin-shell :is(.admin-service-list, .admin-data-table, .admin-order-list) > div:last-child { border-bottom: 0; }

.admin-service-list > div { grid-template-columns: minmax(150px, 0.9fr) minmax(0, 1.5fr) auto; }

.admin-service-list b { display: flex; align-items: center; gap: 11px; color: #eaf2f4; font-size: 14px; font-weight: 620; }

.admin-service-list b > .ti { display: grid; flex: 0 0 36px; width: 36px; height: 36px; place-items: center; border-radius: 50%; background: rgba(65, 122, 142, 0.2); color: #65dfe4; font-size: 18px; }

.admin-shell :is(.admin-service-list, .admin-data-table, .admin-order-list) span, .admin-key-value-row span { color: #a2b2bd; font-size: 13px; font-weight: 450; }

.admin-shell :is(.admin-service-list, .admin-data-table, .admin-order-list, .admin-account-row, .admin-package-row, .admin-billing-order-row, .admin-log-head) em { display: inline-flex; align-items: center; justify-content: center; justify-self: end; min-height: 26px; padding: 4px 9px; border-radius: 999px; background: rgba(132, 151, 165, 0.14); color: #b7c5cd; font-size: 12px; font-style: normal; font-weight: 600; white-space: nowrap; }

.admin-shell :is(em.status-positive, em.status-paid, em.status-active) { background: rgba(43, 194, 132, 0.15); color: #76e6b8; }

.admin-shell :is(em.status-warning, em.status-pending) { background: rgba(224, 171, 61, 0.17); color: #f2ce76; }

.admin-shell :is(em.status-negative, em.status-failed, em.status-rejected, em.status-cancelled) { background: rgba(225, 82, 88, 0.17); color: #ff9ea4; }

.admin-shell em.status-neutral { background: rgba(132, 151, 165, 0.14); color: #b7c5cd; }

.admin-key-value-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(170px, 0.72fr); gap: 12px; align-items: center; min-width: 0; padding: 12px 0; border-bottom: 1px solid var(--admin-line-soft); }

.admin-key-value-row:last-child { border-bottom: 0; }

.admin-key-value-row b { overflow-wrap: anywhere; color: #eaf2f4; font-size: 13px; font-weight: 600; text-align: right; }

.admin-table-scroll { width: 100%; max-width: 100%; overflow-x: auto; border: 1px solid var(--admin-line-soft); border-radius: 7px; scrollbar-width: thin; }

.admin-overview-recent-table, .admin-user-table { width: 100%; min-width: 860px; border-spacing: 0; border-collapse: separate; color: #dce6e9; }

.admin-overview-recent-table :is(th, td), .admin-user-table :is(th, td) { overflow: hidden; padding: 12px 14px; border-bottom: 1px solid var(--admin-line-soft); text-align: left; vertical-align: middle; }

.admin-overview-recent-table th, .admin-user-table thead th { background: #142635; color: #91a4b1; font-size: 12px; font-weight: 620; white-space: nowrap; }

.admin-overview-recent-table td { color: #d5e0e3; font-size: 13px; }

.admin-overview-recent-table tbody tr:last-child td, .admin-user-table tbody tr:last-child td { border-bottom: 0; }

.admin-user-table { min-width: 1040px; table-layout: fixed; }

.admin-user-table tbody th { font-weight: inherit; }

.admin-user-dialog {
  width: min(900px, calc(100vw - 32px));
  max-height: min(820px, calc(100vh - 32px));
  overflow: auto;
  border-color: var(--admin-line);
  border-radius: 10px;
  background: var(--admin-panel);
  color: var(--admin-text);
}

.admin-user-dialog::backdrop { background: rgba(2, 9, 15, 0.78); }

.admin-user-dialog > header {
  position: sticky;
  top: 0;
  z-index: 2;
  border-color: var(--admin-line);
  background: #142635;
}

.admin-user-dialog-heading { display: grid; gap: 3px; }
.admin-user-dialog-heading span { color: var(--admin-accent); font-size: 12px; font-weight: 650; }
.admin-user-dialog h2 { color: var(--admin-text); font-size: 20px; }
.admin-user-dialog header button { background: #203746; color: #dcebed; }
.admin-user-dialog-body { display: grid; gap: 18px; padding: 20px; }

.admin-user-dialog-summary {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 16px;
  border: 1px solid var(--admin-line-soft);
  border-radius: 8px;
  background: #13222f;
}

.admin-user-dialog-summary > div { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.admin-user-dialog-summary b { color: #edf4f5; font-size: 16px; }
.admin-user-dialog-summary em { font-style: normal; }
.admin-user-dialog-summary > strong { color: #76e6b8; font-size: 26px; font-variant-numeric: tabular-nums; }
.admin-user-dialog-summary > strong small { color: #8fa2ad; font-size: 12px; font-weight: 550; }

.admin-user-detail-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0;
  border-top: 1px solid var(--admin-line-soft);
  border-left: 1px solid var(--admin-line-soft);
}

.admin-user-detail-grid > div { min-width: 0; padding: 12px 14px; border-right: 1px solid var(--admin-line-soft); border-bottom: 1px solid var(--admin-line-soft); }
.admin-user-detail-grid dt { color: #8295a2; font-size: 11px; }
.admin-user-detail-grid dd { overflow: hidden; margin: 5px 0 0; color: #eaf2f4; font-size: 13px; font-weight: 620; text-overflow: ellipsis; white-space: nowrap; }

.admin-user-grant-form { margin: 0; padding: 16px; border: 1px solid rgba(88, 228, 231, 0.2); border-radius: 8px; background: rgba(43, 183, 191, 0.06); }
.admin-user-grant-form > p { margin: 10px 0 14px; color: #8fa2ad; font-size: 12px; }

.admin-overview-recent-table .admin-empty-state { display: grid; height: 205px; padding: 28px; place-content: center; justify-items: center; gap: 8px; border: 0; background: transparent; color: #8496a3; text-align: center; }

.admin-overview-recent-table .admin-empty-state .ti { color: #6f8796; font-size: 34px; }

.admin-overview-recent-table .admin-empty-state strong { color: #c2d0d5; font-size: 14px; }

.admin-shell :is(button, input, select, textarea, a):focus-visible { outline: 3px solid #7cf4dc; outline-offset: 2px; }

.admin-invite-reward-form { margin: 0; }

.admin-invite-reward-status { display: flex; align-items: center; min-height: 38px; margin: 0; color: var(--admin-muted); font-size: 12px; }

.admin-invite-reward-status[data-state="saving"] { color: var(--admin-accent); }

.admin-invite-reward-status[data-state="success"] { color: #76e6b8; }

.admin-invite-reward-status[data-state="error"] { color: #ff9ea4; }

@media (max-width: 900px) {
  .admin-shell { inset: 72px 0 0; grid-template-columns: 1fr; grid-template-rows: auto minmax(0, 1fr); overflow: hidden; }

  .admin-sidebar { position: relative; top: auto; z-index: 3; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 10px 14px; border-right: 0; border-bottom: 1px solid var(--admin-line); overflow: hidden; }

  .admin-sidebar .brand { min-height: 44px; padding: 0; }

  .admin-sidebar .brand small { display: none; }

  .admin-nav { display: flex; gap: 16px; min-width: 0; overflow-x: auto; overflow-y: hidden; padding: 0 2px 2px; scrollbar-width: none; }

  .admin-nav-group { display: flex; flex: 0 0 auto; align-items: center; gap: 6px; }

  .admin-nav-label { padding: 0 2px; white-space: nowrap; }

  .admin-nav-items { display: flex; gap: 4px; }

  .admin-nav button { flex: 0 0 auto; width: auto; height: 44px; white-space: nowrap; }

  .admin-back-button { width: auto; min-width: 116px; margin: 0; padding: 0 12px; white-space: nowrap; }

  .admin-main { min-height: 0; padding: 24px; overflow-x: hidden; overflow-y: auto; }

  .admin-overview-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  .admin-dashboard-grid, .admin-overview-flow-grid, .admin-billing-grid, .admin-users-grid, .admin-subadmin-grid, .admin-relay-grid, .admin-deployment-code-grid { grid-template-columns: minmax(0, 1fr); }

  .admin-overview-flow-grid :is(.admin-service-panel, .admin-config-panel, .admin-order-panel) { grid-column: auto; min-height: 0; }

  .admin-shell :is(.admin-service-list, .admin-data-table, .admin-order-list, .admin-account-list, .admin-package-list, .admin-billing-order-list, .admin-log-list, .admin-config-list, .relay-form) { overflow: visible; padding-bottom: 0; }
}

@media (max-width: 760px) {
  .admin-shell { inset: 64px 0 0; }

  .admin-user-detail-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  .admin-topbar { display: grid; grid-template-columns: minmax(0, 1fr); width: 100%; height: max-content; min-height: max-content; }

  .admin-heading, .admin-topbar-meta { width: 100%; }

  .admin-topbar-meta { justify-items: start; }

}

@media (max-width: 640px) {
  .admin-sidebar { grid-template-columns: minmax(0, 1fr) auto; padding: 10px 12px 8px; }

  .admin-nav { grid-column: 1 / -1; grid-row: 2; }

  .admin-back-button { width: 44px; min-width: 44px; padding: 0; }

  .admin-back-button span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

  .admin-main { gap: 16px; padding: 16px; }

  .admin-user-dialog-summary { grid-template-columns: auto minmax(0, 1fr); }
  .admin-user-dialog-summary > strong { grid-column: 1 / -1; }
  .admin-user-detail-grid { grid-template-columns: minmax(0, 1fr); }

  .admin-topbar h1 { font-size: clamp(28px, 9vw, 34px); }

  .admin-actions { display: grid; width: 100%; }

  .admin-actions button { width: 100%; }

  .admin-overview-grid { grid-template-columns: minmax(0, 1fr); }

  .admin-overview-grid article, .admin-section { padding: 15px; }

  .admin-shell :is(.admin-service-list, .admin-data-table, .admin-order-list) > div, .admin-account-row, .admin-package-row, .admin-billing-order-row, .admin-log-row, .admin-config-list label, .admin-key-value-row, .relay-form label { grid-template-columns: minmax(0, 1fr); min-width: 0; gap: 8px; align-items: start; }

  .admin-shell :is(.admin-service-list, .admin-data-table, .admin-order-list, .admin-account-row, .admin-package-row, .admin-billing-order-row) em, .admin-key-value-row b { justify-self: start; text-align: left; }

  .admin-billing-form-grid { grid-template-columns: minmax(0, 1fr); min-width: 0; }

  .admin-billing-form-wide { grid-column: auto; }

  .admin-inline-actions, .relay-actions { display: grid; }

  .admin-inline-actions button, .relay-actions button { width: 100%; }
}

/* H5 selected home: horizontal navigation + work gallery */
.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;
}

.desktop-app {
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: 86px minmax(0, 1fr);
  height: 100dvh;
  min-height: 0;
  background: #030b0d;
}

.h5-topbar {
  position: relative;
  z-index: 2420;
  display: grid;
  grid-column: 1;
  grid-row: 1;
  grid-template-columns: 205px minmax(420px, 1fr) auto;
  gap: 24px;
  align-items: center;
  min-width: 0;
  padding: 0 24px;
  border-right: 0;
  border-bottom: 1px solid rgba(218, 255, 238, 0.1);
  background: rgba(2, 10, 12, 0.98);
  color: #f4fff8;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.16);
}

.h5-topbar .brand {
  gap: 10px;
  min-width: 0;
  padding: 0;
}

.h5-topbar .brand > .ti {
  color: #19cf7c;
  font-size: 27px;
  filter: drop-shadow(0 0 16px rgba(25, 207, 124, 0.34));
}

.h5-topbar .brand strong {
  font-size: 18px;
  letter-spacing: -0.02em;
}

.h5-topbar .brand small {
  margin-top: 3px;
  color: rgba(225, 242, 235, 0.58);
  font-size: 10px;
  font-weight: 600;
}

.h5-topbar .nav-list {
  display: flex;
  justify-content: flex-start;
  gap: clamp(12px, 2.2vw, 34px);
  min-width: 0;
}

.h5-topbar .nav-item {
  position: relative;
  gap: 8px;
  width: auto;
  height: 48px;
  padding: 0 4px;
  border-radius: 0;
  background: transparent;
  color: rgba(233, 244, 239, 0.68);
  font-size: 14px;
  font-weight: 620;
  white-space: nowrap;
  box-shadow: none;
}

.h5-topbar .nav-item::before {
  top: auto;
  right: 4px;
  bottom: 0;
  left: 4px;
  width: auto;
  height: 2px;
  background: #1bd17f;
  transform: scaleX(0.4);
}

.h5-topbar .nav-item:hover,
.h5-topbar .nav-item.active {
  background: transparent;
  color: #f5fff9;
  box-shadow: none;
}

.h5-topbar .nav-item.active::before {
  transform: scaleX(1);
}

.h5-topbar .nav-item > .ti {
  color: currentColor;
  font-size: 18px;
}

.h5-topbar-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  align-items: center;
  min-width: 0;
}

.h5-topbar .plan-card {
  display: flex;
  flex: 0 0 auto;
  gap: 8px;
  height: 40px;
  align-items: baseline;
  margin: 0;
  padding: 12px 10px;
  border: 0;
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.05);
  box-shadow: none;
}

.h5-topbar .plan-card > span,
.h5-topbar .plan-card > b,
.h5-topbar .plan-card > button {
  line-height: 1;
  white-space: nowrap;
}

.h5-topbar .plan-card > b > span {
  color: inherit;
  font-size: inherit;
}

.h5-topbar .plan-card > strong,
.h5-topbar .plan-card .quota-track,
.h5-topbar .plan-card em {
  display: none;
}

.h5-topbar .plan-card > span {
  color: rgba(231, 244, 238, 0.62);
  font-size: 11px;
}

.h5-topbar .plan-card > b {
  margin: 0;
  color: #f2fff7;
  font-size: 13px;
}

.h5-topbar .plan-card button {
  width: auto;
  height: auto;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: #38df91;
  font-size: 11px;
}

.h5-topbar .sidebar-actions {
  display: flex;
  gap: 7px;
  align-items: center;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.h5-topbar .login-open-button,
.h5-topbar .language-select {
  min-width: 0;
  height: 40px;
  border-radius: 10px;
}

.h5-topbar .login-open-button {
  width: auto;
  padding: 0 15px;
  border-color: rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.04);
  color: #effcf5;
}

.h5-topbar .language-select {
  width: 64px;
  padding: 0 8px;
  color: rgba(236, 249, 242, 0.72);
}

.h5-topbar .profile-center-button {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) 16px;
  gap: 9px;
  align-items: center;
  width: 206px;
  height: 58px;
  margin: 0;
  padding: 8px 10px;
  border: 0;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.055);
  color: #f4fff8;
  text-align: left;
}

.workbench.module-mode[data-module="视频生成"] > .app-header,
.workbench.module-mode[data-module="素材库"] > .app-header,
.workbench.module-mode[data-module="生成记录"] > .app-header {
  display: none;
}

.h5-topbar .profile-center-button[hidden] {
  display: none;
}

.h5-topbar .profile-center-button > span:nth-child(2) {
  min-width: 0;
}

.h5-topbar .profile-center-button strong,
.h5-topbar .profile-center-button small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.h5-topbar .profile-center-button strong {
  font-size: 13px;
}

.h5-topbar .profile-center-button small {
  margin-top: 3px;
  color: rgba(232, 245, 238, 0.6);
  font-size: 10px;
}

.user-avatar img {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  object-fit: cover;
}

.mobile-navigation-button {
  display: none;
  min-width: 44px;
  min-height: 44px;
}

.workbench {
  grid-column: 1;
  grid-row: 2;
  width: 100%;
  height: 100%;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  background: #030b0d;
}

.workbench.home-mode {
  display: block;
}

.home-showcase {
  display: grid;
  gap: 18px;
  width: 100%;
  min-height: 100%;
  padding: 28px clamp(24px, 3vw, 44px) 22px;
  background: #030b0d;
  color: #edf9f2;
}

.home-showcase-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.75fr) minmax(360px, 0.8fr);
  gap: clamp(24px, 2vw, 32px);
  align-items: stretch;
}

.home-gallery {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(220px, 0.75fr);
  grid-template-rows: repeat(2, minmax(0, 1fr));
  gap: 14px;
  height: clamp(360px, 48vh, 525px);
  min-height: 0;
}

.home-gallery-item {
  position: relative;
  min-width: 0;
  min-height: 0;
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(211, 255, 232, 0.08);
  border-radius: 12px;
  background: #0a1413;
}

.home-gallery-primary {
  grid-row: 1 / 3;
}

.home-gallery-item img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease, filter 0.3s ease;
}

.home-gallery-item:hover img,
.home-gallery-item:focus-visible img {
  transform: scale(1.025);
  filter: saturate(1.06);
}

.home-gallery-item:focus-visible {
  outline: 3px solid #56e9a4;
  outline-offset: 3px;
}

.home-showcase-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  padding: 14px 0;
}

.home-showcase-kicker {
  color: #39d98d;
  font-size: 12px;
  font-weight: 720;
  letter-spacing: 0.08em;
}

.home-showcase-copy h2 {
  margin: 18px 0 0;
  color: #f1f8f4;
  font-family: var(--hero-cn-display-premium);
  font-size: clamp(40px, 3.25vw, 52px);
  font-weight: 700;
  letter-spacing: -0.055em;
  line-height: 1.12;
}

.home-showcase-copy h2 span {
  display: block;
  color: #25cc7c;
}

.home-showcase-copy > p {
  max-width: 520px;
  margin: 22px 0 0;
  color: rgba(225, 239, 232, 0.66);
  font-size: 15px;
  line-height: 1.8;
}

.home-use-cases {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 34px;
}

.home-use-cases button {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 10px 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #e8f5ed;
  text-align: left;
}

.home-use-cases button + button {
  padding-left: 12px;
  border-left: 1px solid rgba(225, 247, 236, 0.1);
}

.home-use-cases .ti {
  color: #27d382;
  font-size: 24px;
}

.home-use-cases strong,
.home-use-cases span,
.home-use-cases small {
  display: block;
}

.home-use-cases span {
  font-size: 13px;
  font-weight: 650;
}

.home-use-cases small {
  margin-top: 3px;
  color: rgba(225, 239, 232, 0.48);
  font-size: 10px;
  font-weight: 500;
}

.home-command-bar {
  display: grid;
  grid-template-columns: 28px minmax(220px, 1fr) auto auto auto 178px;
  gap: 12px;
  align-items: center;
  width: min(1120px, calc(100% - 100px));
  min-height: 74px;
  margin: 0 auto;
  padding: 10px 12px 10px 18px;
  border: 1px solid rgba(37, 211, 128, 0.56);
  border-radius: 14px;
  background: #111c1d;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.22), inset 0 1px rgba(255, 255, 255, 0.035);
}

.home-command-bar > .ti {
  color: #35d88b;
  font-size: 27px;
}

.home-command-bar input {
  width: 100%;
  min-width: 0;
  height: 48px;
  border: 0;
  outline: 0;
  background: transparent;
  color: #f1faf5;
  font-size: 15px;
}

.home-command-bar input::placeholder {
  color: rgba(223, 239, 231, 0.54);
}

.home-command-secondary,
.home-command-bar > #heroGenerateButton {
  min-height: 48px;
  border-radius: 10px;
}

.home-command-secondary {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  padding: 0 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.035);
  color: rgba(236, 247, 241, 0.76);
  font-size: 11px;
}

.home-parameter-summary,
.home-estimated-credits {
  color: rgba(228, 242, 235, 0.58);
  font-size: 11px;
  white-space: nowrap;
}

.home-command-bar > #heroGenerateButton {
  padding: 0 22px;
  border: 1px solid #27d17f;
  background: linear-gradient(135deg, #20c874, #35d88b);
  color: #04110a;
  font-size: 14px;
  font-weight: 800;
  box-shadow: 0 10px 24px rgba(24, 202, 112, 0.2);
}

.home-command-bar :is(input, button):focus-visible,
.home-command-foot button:focus-visible,
.home-use-cases button:focus-visible,
.home-recent-projects button:focus-visible {
  outline: 3px solid rgba(83, 233, 166, 0.72);
  outline-offset: 3px;
}

.home-command-foot {
  display: flex;
  justify-content: center;
  gap: 18px;
  align-items: center;
  min-height: 18px;
  color: rgba(224, 238, 231, 0.5);
  font-size: 11px;
}

.home-command-foot [data-state="warning"] {
  color: #f4c96d;
}

.home-command-foot [data-state="error"] {
  color: #ff989e;
}

.home-command-foot button {
  padding: 0;
  border: 0;
  background: transparent;
  color: #38d98d;
  font-size: 11px;
}

.home-recent-projects {
  display: grid;
  gap: 12px;
  padding: 15px 18px;
  border: 1px solid rgba(224, 252, 238, 0.08);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.025);
}

.home-recent-projects > header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: end;
}

.home-recent-projects > header span {
  color: #2dce80;
  font-size: 10px;
  font-weight: 700;
}

.home-recent-projects h3 {
  margin: 3px 0 0;
  font-size: 15px;
}

.home-recent-projects > header button {
  display: inline-flex;
  gap: 4px;
  align-items: center;
  padding: 4px 0;
  border: 0;
  background: transparent;
  color: #2fd58a;
  font-size: 11px;
}

.home-recent-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.home-recent-list > button {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: #edf8f1;
  text-align: left;
}

.home-recent-list img {
  width: 58px;
  height: 48px;
  border-radius: 7px;
  object-fit: cover;
}

.home-recent-list span,
.home-recent-list strong,
.home-recent-list small {
  display: block;
  min-width: 0;
}

.home-recent-list strong,
.home-recent-list small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-recent-list strong {
  font-size: 12px;
}

.home-recent-list small {
  margin-top: 5px;
  color: rgba(226, 240, 233, 0.48);
  font-size: 10px;
}

.home-showcase > .compliance-footer {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  padding: 2px 0 0;
  border: 0;
  color: rgba(218, 235, 226, 0.46);
}

.home-showcase > .compliance-footer .legal-links {
  display: flex;
  gap: 12px;
  padding: 0;
  border: 0;
}

.home-showcase > .compliance-footer :is(button, a) {
  padding: 0;
  border: 0;
  background: transparent;
  color: rgba(224, 241, 232, 0.58);
  font-size: 10px;
  text-decoration: none;
}

.home-showcase > .compliance-footer > div {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
  font-size: 10px;
}

.profile-center-overlay {
  display: block;
  padding: 0;
}

.profile-center-backdrop {
  background: transparent;
  backdrop-filter: none;
}

.profile-center-panel {
  position: absolute;
  top: 84px;
  right: 20px;
  display: grid;
  gap: 0;
  width: min(300px, calc(100vw - 32px));
  max-height: calc(100dvh - 92px);
  padding: 16px;
  border: 1px solid rgba(216, 255, 236, 0.1);
  border-radius: 14px;
  background: #111b1d;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.38);
}

.profile-center-close {
  top: 10px;
  right: 10px;
  width: 44px;
  height: 44px;
  border: 0;
  background: transparent;
  color: rgba(236, 249, 242, 0.62);
  font-size: 18px;
}

.profile-center-head {
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 12px;
  padding: 4px 34px 15px 4px;
  border-bottom: 1px solid rgba(224, 250, 238, 0.08);
}

.profile-center-head .user-avatar {
  width: 48px;
  height: 48px;
}

.profile-center-head h2 {
  margin: 0;
  font-size: 15px;
}

.profile-center-head p {
  margin-top: 5px;
  font-size: 10px;
}

.profile-center-balance {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 14px 4px;
  border: 0;
  border-bottom: 1px solid rgba(224, 250, 238, 0.08);
  border-radius: 0;
  background: transparent;
}

.profile-center-balance strong,
.profile-center-balance small {
  display: inline;
  margin: 0 0 0 6px;
  font-size: 13px;
}

.profile-center-balance small {
  color: rgba(224, 240, 232, 0.45);
  font-size: 9px;
}

.profile-center-balance > button {
  min-width: 58px;
  height: 34px;
  border: 0;
  border-radius: 8px;
  background: #22ca78;
  color: #04110a;
  font-size: 11px;
  font-weight: 800;
}

.profile-invite-reward {
  display: grid;
  gap: 10px;
  padding: 14px 4px;
  border-bottom: 1px solid rgba(224, 250, 238, 0.08);
}

.profile-invite-reward[hidden] {
  display: none;
}

.profile-invite-reward span,
.profile-invite-reward strong,
.profile-invite-reward small {
  display: block;
}

.profile-invite-reward span {
  color: #78e8b2;
  font-size: 10px;
  font-weight: 800;
}

.profile-invite-reward strong {
  margin-top: 4px;
  color: #edf8f2;
  font-size: 12px;
}

.profile-invite-reward small {
  margin-top: 4px;
  color: rgba(224, 239, 231, 0.48);
  font-size: 9px;
}

.profile-invite-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.profile-invite-actions button {
  min-height: 40px;
  border: 1px solid rgba(104, 231, 168, 0.22);
  border-radius: 8px;
  background: rgba(34, 202, 120, 0.1);
  color: #baf3d8;
  font-size: 10px;
  font-weight: 800;
}

.profile-invite-actions button:first-child {
  border-color: transparent;
  background: #22ca78;
  color: #04110a;
}

.profile-center-actions {
  display: grid;
  gap: 0;
  padding-top: 8px;
}

.profile-center-actions > button {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) 16px;
  gap: 10px;
  align-items: center;
  min-height: 48px;
  padding: 7px 4px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #edf8f2;
  text-align: left;
}

.profile-center-actions > button:hover,
.profile-center-actions > button:focus-visible {
  background: rgba(255, 255, 255, 0.05);
}

.profile-center-actions > button > .ti:first-child {
  color: rgba(232, 247, 239, 0.72);
  font-size: 19px;
}

.profile-center-actions > button > .ti:last-child {
  color: rgba(232, 247, 239, 0.36);
}

.profile-center-actions span,
.profile-center-actions small {
  display: block;
}

.profile-center-actions span {
  font-size: 12px;
  font-weight: 650;
}

.profile-center-actions small {
  margin-top: 3px;
  color: rgba(224, 239, 231, 0.44);
  font-size: 9px;
  font-weight: 500;
}

.profile-center-actions > .profile-center-logout {
  grid-template-columns: 24px minmax(0, 1fr);
  margin-top: 8px;
  padding-top: 12px;
  border-top: 1px solid rgba(224, 250, 238, 0.08);
  border-radius: 0;
  color: #ffc0c4;
}

.profile-center-details {
  display: grid;
  gap: 9px;
  margin-top: 10px;
  padding: 12px;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.04);
}

.profile-center-details[hidden] {
  display: none;
}

.profile-center-details > div {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 8px;
  color: rgba(224, 239, 231, 0.55);
  font-size: 10px;
}

.profile-center-details strong {
  overflow: hidden;
  color: #edf8f2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-security-head {
  display: grid;
  gap: 3px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(224, 250, 238, 0.08);
}

.profile-security-head strong {
  color: #edf8f2;
  font-size: 12px;
}

.profile-security-head span,
.profile-password-hint {
  margin: 0;
  color: rgba(224, 239, 231, 0.5);
  font-size: 10px;
  line-height: 1.5;
}

.profile-password-form {
  display: grid;
  gap: 9px;
  padding-top: 4px;
  border-top: 1px solid rgba(224, 250, 238, 0.08);
}

.profile-password-form[hidden] {
  display: none;
}

.profile-password-form label {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  color: rgba(224, 239, 231, 0.64);
  font-size: 10px;
}

.profile-password-form input {
  width: 100%;
  height: 36px;
  padding: 0 10px;
  border: 1px solid rgba(224, 250, 238, 0.12);
  border-radius: 7px;
  background: rgba(4, 12, 13, 0.72);
  color: #edf8f2;
}

.profile-password-form button {
  min-height: 38px;
  margin-top: 4px;
  border: 1px solid rgba(104, 231, 168, 0.22);
  border-radius: 8px;
  background: #22ca78;
  color: #04110a;
  font-size: 11px;
  font-weight: 800;
}

@media (max-width: 1120px) {
  .h5-topbar {
    grid-template-columns: 180px minmax(360px, 1fr) auto;
    gap: 14px;
    padding: 0 18px;
  }

  .h5-topbar .nav-list {
    gap: 14px;
  }

  .h5-topbar .nav-item > .ti,
  .h5-topbar .plan-card,
  .h5-topbar .language-select {
    display: none;
  }

  .home-showcase-grid {
    grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.8fr);
    gap: 26px;
  }

  .home-command-bar {
    width: 100%;
    grid-template-columns: 28px minmax(180px, 1fr) auto auto 168px;
  }

  .home-estimated-credits {
    display: none;
  }
}

@media (max-width: 900px) {
  .desktop-app {
    grid-template-rows: 72px minmax(0, 1fr);
    height: 100dvh;
    min-height: 0;
    overflow: hidden;
  }

  .h5-topbar {
    position: relative;
    top: auto;
    display: grid;
    grid-template-columns: 170px minmax(320px, 1fr) auto;
    min-height: 0;
    padding: 0 14px;
    overflow: visible;
  }

  .h5-topbar .nav-list {
    display: flex;
    grid-column: auto;
    grid-row: auto;
    padding: 0;
    overflow: visible;
  }

  .workbench {
    display: block;
    overflow-x: hidden;
    overflow-y: auto;
  }

  .home-showcase {
    padding: 22px;
  }

  .home-showcase-grid {
    grid-template-columns: minmax(0, 1.2fr) minmax(250px, 0.8fr);
  }

  .home-gallery {
    height: 420px;
    grid-template-columns: minmax(0, 1fr) 160px;
  }

  .home-showcase-copy h2 {
    font-size: clamp(36px, 5.2vw, 48px);
  }

  .home-use-cases {
    grid-template-columns: minmax(0, 1fr);
    gap: 2px;
    margin-top: 20px;
  }

  .home-use-cases button + button {
    padding-left: 0;
    border-left: 0;
  }
}

@media (max-width: 760px) {
  .desktop-app {
    grid-template-rows: 64px minmax(0, 1fr);
  }

  .h5-topbar {
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 8px;
    padding: 0 12px;
  }

  .h5-topbar .brand {
    grid-column: 1;
    grid-row: 1;
  }

  .h5-topbar .brand strong {
    font-size: 15px;
  }

  .h5-topbar .brand small {
    display: none;
  }

  .mobile-navigation-button {
    display: inline-flex;
    grid-column: 2;
    grid-row: 1;
    gap: 5px;
    align-items: center;
    min-width: 44px;
    min-height: 44px;
    padding: 0 9px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 9px;
    background: rgba(255, 255, 255, 0.04);
    color: #eef9f3;
    font-size: 10px;
  }

  .h5-topbar .nav-list {
    position: absolute;
    top: calc(100% + 1px);
    right: 10px;
    left: 10px;
    display: none;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4px;
    padding: 10px;
    border: 1px solid rgba(218, 255, 238, 0.1);
    border-radius: 0 0 12px 12px;
    background: #081214;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
  }

  .h5-topbar.navigation-open .nav-list {
    display: grid;
  }

  .h5-topbar .nav-item {
    justify-content: flex-start;
    width: 100%;
    height: 44px;
    padding: 0 10px;
    border-radius: 8px;
  }

  .h5-topbar .nav-item > .ti {
    display: inline-block;
  }

  .h5-topbar .nav-item::before {
    display: none;
  }

  .h5-topbar-actions {
    grid-column: 3;
    grid-row: 1;
  }

  .h5-topbar .plan-card,
  .h5-topbar .language-select {
    display: none;
  }

  .h5-topbar .login-open-button {
    min-height: 44px;
    padding: 0 10px;
    font-size: 11px;
  }

  .h5-topbar .profile-center-button {
    grid-template-columns: 34px;
    width: 44px;
    height: 44px;
    padding: 5px;
  }

  .h5-topbar .profile-center-button > :not(.user-avatar) {
    display: none;
  }

  .home-showcase {
    gap: 14px;
    padding: 18px 14px 24px;
  }

  .home-showcase-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
  }

  .home-showcase-copy {
    order: -1;
    padding: 2px 0;
  }

  .home-showcase-kicker {
    font-size: 10px;
  }

  .home-showcase-copy h2 {
    margin-top: 10px;
    font-size: clamp(32px, 10vw, 42px);
    letter-spacing: -0.045em;
  }

  .home-showcase-copy > p {
    margin-top: 12px;
    font-size: 13px;
    line-height: 1.65;
  }

  .home-use-cases {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-top: 14px;
  }

  .home-use-cases button {
    grid-template-columns: minmax(0, 1fr);
    justify-items: start;
  }

  .home-use-cases button + button {
    padding-left: 8px;
    border-left: 1px solid rgba(225, 247, 236, 0.1);
  }

  .home-use-cases .ti {
    font-size: 20px;
  }

  .home-use-cases small {
    display: none;
  }

  .home-gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: 230px 92px;
    height: 336px;
    gap: 8px;
  }

  .home-gallery-primary {
    grid-column: 1 / -1;
    grid-row: 1;
  }

  .home-command-bar {
    grid-template-columns: 24px minmax(0, 1fr) auto;
    gap: 8px;
    width: 100%;
    min-height: 0;
    padding: 10px;
  }

  .home-command-bar input {
    height: 44px;
    font-size: 13px;
  }

  .home-command-secondary {
    width: 44px;
    padding: 0;
    justify-content: center;
  }

  .home-command-secondary span {
    display: none;
  }

  .home-parameter-summary,
  .home-estimated-credits {
    grid-row: 2;
    font-size: 10px;
  }

  .home-parameter-summary {
    grid-column: 1 / 3;
  }

  .home-estimated-credits {
    display: block;
    grid-column: 3;
  }

  .home-command-bar > #heroGenerateButton {
    grid-column: 1 / -1;
    grid-row: 3;
    width: 100%;
  }

  .home-command-foot {
    justify-content: space-between;
    padding: 0 4px;
  }

  .home-recent-list {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
  }

  .home-showcase > .compliance-footer {
    display: grid;
    gap: 10px;
  }

  .home-showcase > .compliance-footer .legal-links {
    flex-wrap: wrap;
  }

  .home-showcase > .compliance-footer .legal-links button {
    min-height: 44px;
    padding: 8px 0;
  }

  .home-showcase > .compliance-footer > div {
    justify-content: flex-start;
  }

  .profile-center-panel {
    top: auto;
    right: 0;
    bottom: 0;
    left: 0;
    width: 100%;
    max-height: min(82dvh, 680px);
    border-right: 0;
    border-bottom: 0;
    border-left: 0;
    border-radius: 18px 18px 0 0;
    padding: 18px 16px max(18px, env(safe-area-inset-bottom));
  }

  .profile-center-backdrop {
    background: rgba(0, 0, 0, 0.48);
    backdrop-filter: blur(3px);
  }
}
