*, *::before, *::after {
  box-sizing: border-box;
}

:root {
  --bg-main: #141416;
  --bg-panel: #202022;
  --bg-panel-soft: #18181b;
  --bg-hover: #2c2c2e;
  --text-primary: #ffffff;
  --text-secondary: #a1a1aa;
  --text-muted: #71717a;
  --accent-yellow: #facc15;
  --accent-yellow-hover: #eab308;
  --accent-purple: #8b5cf6;
  --accent-blue: #3b82f6;
  --border-color: #3f3f46;
  --shadow-lg: 0 18px 40px rgba(0, 0, 0, 0.42);
  --radius: 12px;
  --header-height: 56px;
  --status-height: 30px;
  --tool-width: 64px;
  --panel-width: 286px;
  --stats-width: 320px;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans SC", Arial, sans-serif;
  --font-mono: Consolas, "SFMono-Regular", Menlo, monospace;
}

html,
body {
  width: 100%;
  height: 100%;
}

body {
  margin: 0;
  overflow: hidden;
  background: var(--bg-main);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 14px;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  background: var(--bg-main);
}

.top-bar {
  position: relative;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  height: var(--header-height);
  padding: 0 24px;
  gap: 18px;
  border-bottom: 1px solid var(--border-color);
  background: var(--bg-main);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 180px;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.brand-mark {
  width: 0;
  height: 0;
  border-left: 9px solid transparent;
  border-right: 9px solid transparent;
  border-bottom: 16px solid var(--accent-yellow);
  filter: drop-shadow(0 0 12px rgba(250, 204, 21, 0.32));
}

.brand-logo-img {
  display: none;
  width: 28px;
  height: 28px;
  object-fit: contain;
  flex-shrink: 0;
}

.brand.has-logo .brand-mark {
  display: none;
}

.brand.has-logo .brand-logo-img {
  display: block;
}

.brand-logo-img[hidden] {
  display: none;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 30px;
  color: var(--text-secondary);
}

.nav-links span {
  white-space: nowrap;
}

.nav-links .active {
  color: var(--accent-yellow);
}

.workspace-nav {
  position: relative;
  z-index: 3;
  flex: 0 0 auto;
  align-self: stretch;
  gap: 0;
  margin-left: 4px;
  padding-left: 18px;
  border-left: 1px solid rgba(255, 255, 255, 0.14);
}

.workspace-tab {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  height: 100%;
  padding: 0 16px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 800;
  white-space: nowrap;
  transition: color .18s ease;
}

.workspace-tab:hover {
  color: var(--text-primary);
}

.workspace-tab.active {
  color: var(--accent-yellow);
}

.workspace-tab.active::after {
  position: absolute;
  right: 16px;
  bottom: 12px;
  left: 16px;
  height: 2px;
  border-radius: 999px;
  background: var(--accent-yellow);
  content: "";
}

.top-center {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 1;
  display: flex;
  justify-content: center;
  width: min(380px, calc(100vw - 680px));
  min-width: 240px;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.studio-top-center,
.creative-top-center {
  display: flex;
  width: 100%;
  gap: 8px;
  pointer-events: auto;
}

.studio-top-center[hidden],
.creative-top-center[hidden] {
  display: none !important;
}

.project-name {
  display: block;
  width: 100%;
  overflow: hidden;
  padding: 8px 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: rgba(20, 20, 22, 0.96);
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.24);
  pointer-events: auto;
}

.creative-search-input {
  display: block;
  width: 100%;
  padding: 8px 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: rgba(20, 20, 22, 0.96);
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.2;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.24);
}

.top-account {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-width: 180px;
  margin-left: auto;
  gap: 10px;
}

.credits {
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
}

.credits::before {
  content: "";
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent-yellow);
  box-shadow: 0 0 12px rgba(250, 204, 21, 0.35);
  flex-shrink: 0;
}

.credits-label {
  font-weight: 400;
  opacity: 0.8;
}

.credits-count {
  color: var(--accent-yellow);
  font-weight: 800;
  font-size: 15px;
  min-width: 20px;
  text-align: center;
}

.credits-unit {
  font-weight: 400;
  font-size: 11px;
  opacity: 0.7;
}

.upgrade-btn,
.tutorial-btn,
.cs-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 68px;
  height: 32px;
  padding: 0 12px;
  border-radius: 8px;
  box-sizing: border-box;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  transition: background .16s ease, border-color .16s ease, color .16s ease, transform .16s ease, box-shadow .16s ease;
}

.upgrade-btn {
  border: 1px solid rgba(168, 85, 247, 0.65);
  background: linear-gradient(135deg, #a855f7, #7c3aed);
  color: #fff;
  box-shadow: 0 10px 22px rgba(124, 58, 237, 0.28);
}

.upgrade-btn:hover,
.upgrade-btn:focus-visible {
  border-color: rgba(196, 181, 253, 0.75);
  background: linear-gradient(135deg, #b36cff, #8b5cf6);
  outline: none;
  transform: translateY(-1px);
}

.main-container {
  display: flex;
  flex: 1;
  min-width: 0;
  min-height: 0;
}

.main-container[hidden],
.creative-workspace[hidden],
.creative-detail-overlay[hidden] {
  display: none !important;
}

.creative-workspace {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  background:
    linear-gradient(180deg, rgba(250, 204, 21, 0.08), rgba(20, 20, 22, 0) 260px),
    var(--bg-main);
}

.creative-shell {
  width: min(1320px, calc(100vw - 48px));
  margin: 0 auto;
  padding: 32px 0 56px;
}

.creative-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.creative-eyebrow {
  margin: 0 0 8px;
  color: #8bd3ff;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.12em;
}

.creative-hero h1,
.creative-detail-info h2 {
  margin: 0;
  color: var(--text-primary);
  font-weight: 900;
  letter-spacing: 0;
}

.creative-hero h1 {
  font-size: 34px;
  line-height: 1.1;
}

.creative-hero p,
.creative-detail-desc {
  max-width: 680px;
  margin: 10px 0 0;
  color: var(--text-secondary);
  line-height: 1.7;
}

.creative-primary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 18px;
  border: 1px solid rgba(250, 204, 21, 0.7);
  border-radius: 8px;
  background: var(--accent-yellow);
  color: #17130a;
  font-weight: 900;
  white-space: nowrap;
}

.creative-primary-btn:disabled {
  cursor: wait;
  opacity: 0.65;
}

.creative-secondary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 18px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-primary);
  font-weight: 900;
  white-space: nowrap;
}

.creative-secondary-btn:hover,
.creative-primary-btn:hover {
  transform: translateY(-1px);
}

.creative-filter-select {
  min-width: 138px;
  height: 38px;
  padding: 0 44px 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background-color: rgba(20, 20, 22, 0.96);
  background-image: url("data:image/svg+xml,%3Csvg width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23f5f7ff' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-position: right 16px center;
  background-repeat: no-repeat;
  background-size: 14px 14px;
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 900;
  outline: none;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
}

.creative-filter-select:focus {
  border-color: rgba(250, 204, 21, 0.55);
  box-shadow: 0 0 0 3px rgba(250, 204, 21, 0.12);
}

select.creative-filter-select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
}

select.creative-filter-select::-ms-expand {
  display: none;
}

.creative-hero-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.creative-status {
  margin-bottom: 18px;
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-secondary);
}

.creative-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 18px;
  align-items: start;
}

.creative-card {
  display: block;
  width: 100%;
  margin: 0;
  overflow: hidden;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: rgba(32, 32, 34, 0.92);
  color: inherit;
  text-align: left;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.24);
}

.creative-card:hover {
  border-color: rgba(250, 204, 21, 0.34);
  transform: translateY(-2px);
}

.creative-card-cover {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  background: #0f1115;
  object-fit: cover;
}

.creative-card-cover.is-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.24);
  font-size: 36px;
  font-weight: 900;
}

.creative-card-body {
  display: block;
  padding: 14px;
}

.creative-card-title {
  display: block;
  margin: 0 0 8px;
  color: var(--text-primary);
  font-size: 16px;
  font-weight: 900;
  line-height: 1.35;
}

.creative-card-meta,
.creative-download-hint {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 1.55;
}

.creative-download-hint {
  display: block;
}

.creative-card-avatar {
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  border-radius: 50%;
  object-fit: cover;
  background: rgba(139, 92, 246, 0.22);
}

.creative-card-avatar--empty {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #c4b5fd;
  font-size: 11px;
  font-weight: 900;
}

.creative-card-creator {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.creative-card-dot {
  color: rgba(255, 255, 255, 0.36);
}

.creative-card-foot {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  margin-top: 12px;
}

.creative-tag {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  background: rgba(59, 130, 246, 0.14);
  color: #9fd0ff;
  font-size: 11px;
  font-weight: 800;
}

.creative-empty {
  padding: 60px 20px;
  border: 1px dashed rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  color: var(--text-secondary);
  text-align: center;
}

.creative-detail-overlay {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px;
  background: rgba(0, 0, 0, 0.68);
  backdrop-filter: blur(10px);
}

.creative-detail-panel {
  position: relative;
  display: grid;
  grid-template-columns: minmax(640px, 1.18fr) minmax(420px, 0.82fr);
  width: min(1480px, calc(100vw - 64px));
  max-height: min(860px, calc(100dvh - 56px));
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  background: #1b1b20;
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.56);
}

.creative-detail-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-size: 24px;
  line-height: 1;
}

.creative-detail-media {
  display: grid;
  grid-template-rows: minmax(500px, 1fr) auto;
  gap: 12px;
  min-width: 0;
  min-height: 0;
  padding: 18px;
  background: #111216;
}

.creative-stl-viewer {
  position: relative;
  min-height: 220px;
  margin: 16px 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  background:
    radial-gradient(circle at 50% 40%, rgba(255,255,255,0.09), transparent 38%),
    linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.01)),
    #0b0c10;
}

.creative-detail-media .creative-stl-viewer {
  min-height: 0;
  height: 100%;
  margin: 0;
}

.creative-detail-info .creative-stl-viewer {
  display: none;
}

.creative-stl-mount {
  position: absolute;
  inset: 0;
}

.creative-stl-mount canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
}

.creative-main-preview-image {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  background: #0b0c10;
  object-fit: contain;
}

.creative-main-preview-image[hidden] {
  display: none;
}

.creative-stl-viewer.is-image-preview .creative-stl-mount {
  display: none;
}

.creative-stl-viewer.is-image-preview .creative-stl-state {
  display: none;
}

.creative-stl-state {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  color: rgba(255,255,255,0.46);
  font-size: 14px;
  font-weight: 900;
  text-align: center;
  pointer-events: none;
}

.creative-stl-state[hidden] {
  display: none;
}

.creative-carousel {
  position: relative;
  min-height: 0;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 10px;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.035), rgba(255,255,255,0.01)),
    #0b0c10;
}

.creative-carousel::-webkit-scrollbar {
  height: 6px;
}

.creative-carousel::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(255,255,255,0.18);
}

.creative-detail-gallery {
  display: flex;
  align-items: stretch;
  justify-content: flex-start;
  gap: 10px;
  min-width: min-content;
}

.creative-preview-thumb {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 92px;
  width: 92px;
  aspect-ratio: 1;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 8px;
  background:
    radial-gradient(circle at 50% 38%, rgba(255,255,255,0.1), transparent 45%),
    rgba(255,255,255,0.035);
  color: rgba(255,255,255,0.82);
  cursor: pointer;
}

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

.creative-preview-thumb.is-active {
  border-color: rgba(250,204,21,0.92);
  box-shadow: 0 0 0 2px rgba(250,204,21,0.16), 0 12px 24px rgba(0,0,0,0.26);
}

.creative-preview-thumb-label {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  gap: 3px;
  color: rgba(255,255,255,0.7);
  font-size: 11px;
  font-weight: 900;
  line-height: 1.2;
  text-align: center;
}

.creative-preview-thumb-model .creative-preview-thumb-label {
  background:
    radial-gradient(circle at 50% 35%, rgba(139,92,246,0.3), transparent 46%),
    rgba(255,255,255,0.035);
  color: #fff;
}

.creative-preview-thumb-label span {
  display: block;
  font-size: 18px;
  line-height: 1;
}

.creative-preview-thumb-model .creative-preview-thumb-label small {
  display: block;
  color: rgba(255,255,255,0.55);
  font-size: 11px;
  letter-spacing: 0;
  line-height: 1.1;
}

.creative-preview-thumb-badge {
  position: absolute;
  top: 6px;
  left: 6px;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: rgba(0,0,0,0.58);
  color: #fff;
  font-size: 11px;
  font-weight: 900;
  line-height: 20px;
  text-align: center;
}

.creative-carousel-btn {
  position: absolute;
  top: 50%;
  z-index: 2;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 50%;
  background: rgba(0,0,0,0.52);
  color: #fff;
  font-size: 28px;
  line-height: 1;
  transform: translateY(-50%);
}

.creative-carousel-prev {
  left: 12px;
}

.creative-carousel-next {
  right: 12px;
}

.creative-carousel-btn:disabled {
  opacity: 0.32;
  cursor: default;
}

.creative-carousel-count {
  position: absolute;
  right: 12px;
  bottom: 10px;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(0,0,0,0.56);
  color: rgba(255,255,255,0.76);
  font-size: 11px;
  font-weight: 900;
}

.creative-gallery-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 92px;
  padding: 0 18px;
  color: rgba(255, 255, 255, 0.26);
  font-weight: 900;
}

.creative-detail-gallery .creative-gallery-empty {
  min-height: 0;
}

.creative-detail-info {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow-y: auto;
  padding: 34px 32px 24px;
  background:
    radial-gradient(circle at top right, rgba(139,92,246,0.1), transparent 34%),
    rgba(255,255,255,0.01);
}

.creative-detail-info h2 {
  padding-right: 32px;
  font-size: 28px;
  line-height: 1.2;
}

.creative-creator-card {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0 26px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
}

.creative-creator-avatar {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: #2c2c2e;
  object-fit: cover;
  flex-shrink: 0;
}

.creative-creator-avatar--empty::after {
  content: "3D";
  display: flex;
  width: 100%;
  height: 100%;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.42);
  font-size: 12px;
  font-weight: 900;
}

.creative-creator-name {
  color: var(--text-primary);
  font-weight: 900;
}

.creative-creator-bio {
  margin-top: 3px;
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 1.45;
}

.creative-meta-grid {
  order: 10;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 0;
  margin-bottom: 24px;
}

.creative-meta-item {
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
}

.creative-meta-label {
  display: block;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 800;
}

.creative-meta-value {
  display: block;
  margin-top: 5px;
  overflow-wrap: anywhere;
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 800;
}

.creative-detail-actions {
  order: 20;
  display: flex;
  align-items: stretch;
  flex-shrink: 0;
  gap: 14px;
  margin-top: auto;
  padding: 14px;
  border: 1px solid rgba(250, 204, 21, 0.16);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(250, 204, 21, 0.12), rgba(139, 92, 246, 0.08)),
    rgba(255, 255, 255, 0.035);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.18);
}

.creative-detail-actions .creative-primary-btn {
  min-width: 190px;
}

.creative-detail-actions .creative-download-hint {
  display: flex;
  align-items: center;
  flex: 1 1 auto;
}

.creative-source-badge {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  background: rgba(139, 92, 246, 0.15);
  color: #c4b5fd;
  font-size: 11px;
  font-weight: 900;
}

.creative-submission-panel {
  position: relative;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  width: min(940px, 100%);
  max-height: min(820px, calc(100dvh - 64px));
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  background:
    radial-gradient(circle at top right, rgba(139, 92, 246, 0.16), transparent 34%),
    #1b1b24;
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.58);
}

.creative-submission-head {
  padding: 26px 30px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.creative-submission-head h2 {
  margin: 0;
  font-size: 26px;
  line-height: 1.18;
}

.creative-submission-head p {
  max-width: 700px;
  margin: 8px 0 0;
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.7;
}

.creative-submission-body {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(0, 0.88fr);
  gap: 18px;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 22px 30px;
  scrollbar-color: rgba(139, 92, 246, 0.62) rgba(255, 255, 255, 0.06);
  scrollbar-width: thin;
}

.creative-submission-body::-webkit-scrollbar {
  width: 8px;
}

.creative-submission-body::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 999px;
}

.creative-submission-body::-webkit-scrollbar-thumb {
  border: 2px solid rgba(20, 20, 30, 0.9);
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(167, 139, 250, 0.85), rgba(250, 204, 21, 0.58));
}

.creative-submission-form,
.creative-submission-assets {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.creative-submission-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 140px;
  gap: 12px;
}

.creative-submission-field {
  display: grid;
  gap: 7px;
}

.creative-submission-field span {
  color: rgba(255, 255, 255, 0.62);
  font-size: 12px;
  font-weight: 800;
}

.creative-submission-field-help {
  color: rgba(255, 255, 255, 0.45);
  font-size: 11px;
  line-height: 1.5;
}

.creative-submission-field strong {
  color: #f87171;
}

.creative-submission-field input,
.creative-submission-field textarea {
  min-width: 0;
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.26);
  color: var(--text-primary);
  outline: none;
}

.creative-submission-field input {
  height: 42px;
  padding: 0 12px;
}

.creative-submission-field textarea {
  min-height: 132px;
  padding: 12px;
  resize: vertical;
}

.creative-submission-field input:focus,
.creative-submission-field textarea:focus {
  border-color: rgba(139, 92, 246, 0.52);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.16);
}

.creative-submission-upload {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 10px 14px;
  align-items: center;
  min-height: 132px;
  padding: 18px;
  border: 1px dashed rgba(139, 92, 246, 0.36);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.025));
  cursor: pointer;
}

.creative-submission-upload:hover {
  border-color: rgba(250, 204, 21, 0.42);
  background: rgba(250, 204, 21, 0.055);
}

.creative-upload-mark {
  grid-row: span 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(250, 204, 21, 0.22), rgba(139, 92, 246, 0.22));
  color: #fff;
  font-weight: 900;
}

.creative-submission-upload strong {
  align-self: end;
  color: #fff;
  font-size: 15px;
}

.creative-submission-upload small {
  align-self: start;
  color: rgba(255, 255, 255, 0.58);
  font-size: 12px;
  line-height: 1.55;
}

.creative-preview-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  min-width: 0;
}

.creative-preview-cell {
  position: relative;
  display: flex;
  min-width: 0;
  min-height: 0;
  aspect-ratio: 1 / 1;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 1px dashed rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255,255,255,0.055), rgba(255,255,255,0.018)),
    rgba(0,0,0,0.18);
  color: rgba(255, 255, 255, 0.28);
  font-size: 12px;
  font-weight: 900;
}

.creative-preview-cell.has-image {
  border-style: solid;
  border-color: rgba(250, 204, 21, 0.36);
  background: #0d0e12;
}

.creative-preview-cell.is-loading {
  background:
    linear-gradient(135deg, rgba(250, 204, 21, 0.055), rgba(139, 92, 246, 0.06)),
    rgba(0, 0, 0, 0.2);
}

.creative-preview-cell img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.creative-preview-loading {
  color: rgba(255, 255, 255, 0.46);
  font-size: 11px;
  font-weight: 800;
}

.creative-preview-index {
  position: absolute;
  left: 50%;
  top: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  background: rgba(0,0,0,0.58);
  color: #fff;
  font-size: 10px;
  line-height: 1;
  text-align: center;
  transform: translate(-50%, -50%);
}

.creative-preview-cell.has-image .creative-preview-index {
  left: 5px;
  top: 5px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  transform: none;
}

.creative-preview-tools {
  position: absolute;
  inset: auto 5px 5px 5px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 3px;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity .16s ease, transform .16s ease;
}

.creative-preview-cell.has-image:hover .creative-preview-tools,
.creative-preview-cell.has-image:focus-within .creative-preview-tools {
  opacity: 1;
  transform: translateY(0);
}

.creative-preview-tool {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  height: 22px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 6px;
  background: rgba(8, 8, 14, 0.78);
  color: #f7f7ff;
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
  text-align: center;
  cursor: pointer;
}

.creative-preview-tool:hover:not(:disabled) {
  border-color: rgba(250, 204, 21, 0.55);
  color: #facc15;
}

.creative-preview-tool.is-danger {
  color: #fca5a5;
}

.creative-preview-tool:disabled {
  opacity: 0.38;
  cursor: not-allowed;
}

.creative-submission-note {
  grid-column: 1 / -1;
  display: grid;
  gap: 6px;
  padding: 12px 14px;
  border: 1px solid rgba(59, 130, 246, 0.24);
  border-radius: 12px;
  background: rgba(59, 130, 246, 0.1);
  color: #bfdbfe;
  font-size: 12px;
  line-height: 1.6;
}

.creative-submission-note strong {
  color: #fde68a;
  font-size: 12px;
}

.creative-submission-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 18px 30px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.18);
}

.stats-creative-submissions-list {
  max-height: 360px;
}

.creative-submission-side-list {
  display: grid;
  gap: 10px;
}

.creative-submission-side-card {
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.025));
}

.creative-submission-side-title {
  color: #fff;
  font-size: 13px;
  font-weight: 900;
  line-height: 1.35;
  word-break: break-word;
}

.creative-submission-side-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 9px;
  color: rgba(255, 255, 255, 0.56);
  font-size: 11px;
}

.creative-submission-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  color: rgba(255, 255, 255, 0.72);
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
  text-align: center;
}

.creative-submission-status.is-pending_review {
  background: rgba(250, 204, 21, 0.16);
  color: #facc15;
}

.creative-submission-status.is-published {
  background: rgba(34, 197, 94, 0.16);
  color: #86efac;
}

.creative-submission-status.is-rejected {
  background: rgba(239, 68, 68, 0.16);
  color: #fca5a5;
}

.creative-submission-side-note {
  margin-top: 8px;
  color: #fca5a5;
  font-size: 11px;
  line-height: 1.5;
}

.creative-submission-card-actions {
  margin-top: 10px;
}

.creative-submission-card-actions .project-item-btn {
  width: 100%;
}

.left-toolbar {
  display: flex;
  flex: 0 0 var(--tool-width);
  flex-direction: column;
  align-items: center;
  gap: 18px;
  padding: 16px 8px;
  border-right: 1px solid var(--border-color);
  background: var(--bg-main);
}

.tool-item {
  display: flex;
  width: 48px;
  min-height: 54px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--text-secondary);
  transition: background 0.18s ease, color 0.18s ease;
}

.tool-item:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.tool-item.active {
  color: var(--accent-yellow);
}

.tool-item span {
  font-size: 12px;
  line-height: 1;
}

.tool-more-popover,
.mobile-stats-backdrop {
  display: none;
}

#mobileAccountBtn,
#btnToolMore,
#btnMoreExport {
  display: none !important;
}

.right-panel,
.stats-panel {
  display: flex;
  min-height: 0;
  flex-direction: column;
  background: var(--bg-panel);
}

.right-panel {
  flex: 0 0 var(--panel-width);
  border-right: 1px solid var(--border-color);
  overflow-y: auto;
}

.stats-panel {
  flex: 0 0 var(--stats-width);
  border-left: 1px solid var(--border-color);
}

.stats-panel-mobile-header {
  display: none;
}

.right-panel::-webkit-scrollbar {
  width: 6px;
}

.right-panel::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: var(--border-color);
}

.mobile-panel-grip,
.mobile-panel-backdrop {
  display: none;
}

.panel-header {
  display: flex;
  align-items: center;
  min-height: 54px;
  padding: 0 16px;
  border-bottom: 1px solid var(--border-color);
  font-size: 16px;
  font-weight: 700;
}

.model-source-card {
  margin: 16px;
  padding: 12px;
  border: 1px solid rgba(139, 92, 246, 0.32);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(139, 92, 246, 0.14), rgba(255, 255, 255, 0.025));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 14px 34px rgba(0, 0, 0, 0.2);
}

.model-source-switch {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  margin: 0 0 12px;
  padding: 6px;
  border: 0;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.045);
}

.model-source-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  flex: 0 0 40px;
  width: 40px;
  min-width: 40px;
  height: 36px;
  min-height: 36px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: rgba(226, 232, 240, 0.66);
  cursor: pointer;
  overflow: hidden;
  transition: flex-basis 0.2s ease, width 0.2s ease, min-width 0.2s ease, background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.model-source-tab:hover {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.92);
}

.model-source-tab.active {
  flex: 1 1 124px;
  width: auto;
  min-width: 112px;
  color: #111;
  background: linear-gradient(135deg, #facc15, #f59e0b);
  box-shadow: 0 10px 24px rgba(250, 204, 21, 0.22);
}

.model-source-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 26px;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: currentColor;
}

.model-source-tab.active .model-source-icon {
  background: rgba(0, 0, 0, 0.16);
}

.model-source-svg {
  width: 16px;
  height: 16px;
  display: block;
}

.model-source-label {
  width: 0;
  max-width: 0;
  opacity: 0;
  overflow: hidden;
  color: currentColor;
  font-size: 12px;
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
  transition: max-width 0.18s ease, opacity 0.12s ease, margin-left 0.18s ease;
}

.model-source-tab.active .model-source-label {
  width: auto;
  max-width: 76px;
  margin-left: 7px;
  opacity: 1;
}

.model-source-pane {
  display: none;
}

.model-source-pane.source-active {
  display: block;
}

.model-source-card .model-source-pane:not(.source-active),
.model-source-card .panel-section.model-source-pane:not(.source-active),
.model-source-card .upload-zone.model-source-pane:not(.source-active) {
  display: none !important;
}

.model-source-card .model-source-pane.source-active,
.model-source-card .panel-section.model-source-pane.source-active,
.model-source-card .upload-zone.model-source-pane.source-active {
  display: block !important;
}

#panelImageTo3D.source-active {
  display: block;
}

#panelImageTo3D .image-source-tabs {
  display: none;
}

.model-source-card .upload-zone {
  margin: 0;
  min-height: 224px;
  height: 224px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 22px 16px;
  border-color: rgba(148, 163, 184, 0.34);
  border-radius: 12px;
  background: rgba(8, 8, 12, 0.22);
}

.model-source-card .upload-zone.model-source-pane.source-active {
  display: flex !important;
}

.model-source-card #panelImageTo3D {
  margin: 0;
  padding: 0;
  border-radius: 0;
  background: transparent;
}

.model-source-card #panelImageTo3D .panel-title {
  display: none;
}

.model-source-card #panelImageTo3D .image-upload-zone {
  min-height: 224px;
  height: 224px;
  margin: 0 0 14px;
}

.model-source-card #panelImageTo3D .multiview-upload {
  min-height: 0;
  height: auto;
  margin: 0 0 14px;
}

.model-source-card #panelImageTo3D .multiview-card {
  display: grid;
  grid-template-rows: minmax(0, 1fr) 72px;
  min-height: 0;
  height: 224px;
}

.model-source-card #panelImageTo3D .multiview-slot-main,
.model-source-card #panelImageTo3D .mv-slot-front {
  min-height: 0;
  height: auto;
}

.model-source-card #panelImageTo3D .multiview-slot-row {
  min-height: 0;
  height: auto;
}

.model-source-card #panelImageTo3D .mv-slot-label {
  width: 34px;
  height: 34px;
  font-size: 12px;
}

.model-source-card #panelImageTo3D .mv-slot-front .mv-slot-label {
  width: 44px;
  height: 44px;
  font-size: 14px;
}

.model-source-card #panelImageTo3D .mv-slot-hint {
  max-width: 92%;
  font-size: 10px;
  line-height: 1.3;
}

.model-source-card #panelImageTo3D .multiview-cost-note {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2px 4px;
  min-height: 34px;
  margin: 8px 2px 12px;
  font-size: 10px;
  line-height: 1.35;
}

.model-source-card #panelImageTo3D .image-mode-select {
  margin-top: 0;
}

.model-source-card #panelImageTo3D .image-mode-header {
  min-height: 22px;
  margin-bottom: 8px;
}

.model-source-card #panelImageTo3D .image-mode-selected {
  min-height: 60px;
  padding: 9px 10px;
}

.model-source-card #panelImageTo3D .image-mode-selected .image-mode-icon {
  flex-basis: 34px;
  width: 34px;
  height: 34px;
  font-size: 16px;
}

.upload-zone {
  margin: 16px;
  padding: 22px 16px;
  border: 2px dashed var(--border-color);
  border-radius: var(--radius);
  background: rgba(0, 0, 0, 0.16);
  color: var(--text-secondary);
  text-align: center;
  transition: border-color 0.18s ease, background 0.18s ease;
}

.upload-zone:hover,
.viewport.drag-over .drop-content {
  border-color: var(--accent-yellow);
  background: rgba(250, 204, 21, 0.08);
}

.upload-zone svg {
  color: var(--text-secondary);
}

.upload-zone p {
  margin: 10px 0 14px;
  color: var(--text-primary);
  line-height: 1.55;
}

.upload-zone small {
  color: var(--text-secondary);
}

.upload-btn {
  border: 1px solid var(--accent-yellow);
  border-radius: 999px;
  padding: 7px 18px;
  background: transparent;
  color: var(--accent-yellow);
  font-weight: 700;
  transition: background 0.18s ease, color 0.18s ease;
}

.upload-btn:hover {
  background: var(--accent-yellow);
  color: #111;
}

.inline-action {
  width: 100%;
  min-height: 36px;
  margin: 0 0 16px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: transparent;
  color: var(--text-primary);
  font-weight: 700;
}

.inline-action:hover {
  border-color: var(--accent-yellow);
  color: var(--accent-yellow);
  background: rgba(250, 204, 21, 0.08);
}

.action-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 14px;
}

.inline-action.compact {
  min-height: 34px;
  margin: 0;
  padding: 0 8px;
  font-size: 13px;
}

.inline-action.accent {
  border-color: rgba(250, 204, 21, 0.72);
  background: rgba(250, 204, 21, 0.1);
  color: var(--accent-yellow);
}

.inline-action.accent:hover {
  background: var(--accent-yellow);
  color: #111;
}

/* ---- 移动/旋转 步进控件 ---- */
.transform-section { margin-bottom: 16px; }
.transform-section-title {
  margin: 0 0 8px; font-size: 13px; font-weight: 700; color: var(--text-primary);
  display: flex; align-items: center; gap: 6px;
}
.transform-section-title .transform-unit {
  font-size: 11px; font-weight: 400; color: var(--text-tertiary);
}
.stepper-row {
  display: flex; align-items: center; gap: 4px; margin-bottom: 6px;
}
.stepper-axis {
  width: 16px; font-size: 12px; font-weight: 700; color: var(--text-secondary); text-align: center;
}
.stepper-btn {
  width: 28px; height: 28px; border-radius: 6px; border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.04); color: var(--text-primary);
  font-size: 14px; font-weight: 700; cursor: pointer; line-height: 1;
  display: flex; align-items: center; justify-content: center;
}
.stepper-btn:hover { background: rgba(255,255,255,0.1); }
.stepper-input {
  flex: 1; min-width: 0; height: 28px; border-radius: 6px;
  border: 1px solid rgba(255,255,255,0.1); background: rgba(0,0,0,0.25);
  color: var(--text-primary); font-size: 13px; text-align: center; padding: 0 4px;
}
.stepper-input:focus { border-color: var(--accent); outline: none; }
.quick-btn {
  height: 24px; padding: 0 6px; border-radius: 4px;
  border: 1px solid rgba(255,255,255,0.08); background: rgba(255,255,255,0.03);
  color: var(--text-tertiary); font-size: 11px; cursor: pointer;
}
.quick-btn:hover { background: rgba(255,255,255,0.08); color: var(--text-primary); }

.panel-section {
  display: block;
  margin: 0 16px 16px;
  padding: 16px;
  border-radius: var(--radius);
  background: rgba(0, 0, 0, 0.15);
}

.panel-title {
  margin: 0 0 16px;
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 700;
}

.param-group {
  margin-bottom: 14px;
}

.param-group:last-child {
  margin-bottom: 0;
}

.param-subpanel {
  margin: 24px 0 0;
  padding: 18px 14px 20px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.025);
}

.param-subpanel .param-group {
  margin-bottom: 22px;
}

.param-subpanel .param-label {
  margin-bottom: 12px;
  line-height: 1.45;
}

.param-subpanel .param-check {
  min-height: 32px;
  line-height: 1.45;
}

.param-subpanel .param-row {
  min-height: 32px;
}

.leakproof-subpanel {
  border-color: rgba(30, 58, 138, 0.35);
  background: rgba(30, 58, 138, 0.08);
}

.leakproof-subpanel .param-group:first-child {
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(30, 58, 138, 0.22);
}

/* ---- 模型修复面板 ---- */
.repair-status-row {
  display: flex; align-items: center; gap: 8px; margin-bottom: 8px;
}
.repair-status-badge {
  display: inline-block; padding: 3px 10px; border-radius: 999px;
  font-size: 12px; font-weight: 600; line-height: 1.4;
  background: rgba(255,255,255,0.08); color: var(--text-secondary);
}
.repair-status-badge.st-clean { background: rgba(76,175,80,0.18); color: #66bb6a; }
.repair-status-badge.st-repairable { background: rgba(255,152,0,0.18); color: #ffa726; }
.repair-status-badge.st-unrepairable { background: rgba(244,67,54,0.15); color: #ef5350; }
.repair-status-badge.st-checking,
.repair-status-badge.st-repairing { background: rgba(33,150,243,0.15); color: #42a5f5; }
.repair-status-badge.st-repaired { background: rgba(76,175,80,0.18); color: #66bb6a; }
.repair-time { font-size: 11px; color: var(--text-tertiary); margin-left: auto; }
.repair-issues { margin-bottom: 8px; }
.repair-issues .issue-tag {
  display: inline-block; margin: 2px 4px 2px 0; padding: 2px 8px; border-radius: 4px;
  font-size: 11px; background: rgba(244,67,54,0.12); color: #ef5350;
}
.repair-issues .issue-tag.resolved { background: rgba(76,175,80,0.12); color: #66bb6a; }
.repair-info { margin-bottom: 12px; font-size: 11px; color: var(--text-tertiary); }
.repair-info-row { display: flex; justify-content: space-between; padding: 2px 0; }
.repair-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.repair-btn {
  flex: 1; min-width: 80px; padding: 7px 10px; border: none; border-radius: var(--radius);
  font-size: 12px; font-weight: 600; cursor: pointer; transition: opacity .15s;
}
.repair-btn:disabled { opacity: .35; cursor: not-allowed; }
.repair-btn.primary { background: var(--accent); color: #fff; }
.repair-btn.secondary { background: rgba(255,255,255,0.08); color: var(--text-primary); }
.repair-btn.tertiary { background: rgba(255,255,255,0.05); color: var(--text-secondary); }
.inline-spinner {
  display: inline-block; width: 12px; height: 12px; border: 2px solid rgba(255,255,255,0.2);
  border-top-color: var(--accent); border-radius: 50%; animation: spin .6s linear infinite;
  vertical-align: middle; margin-right: 4px;
}
.processing-row {
  display: flex; align-items: center; gap: 6px; padding: 6px 0; margin-bottom: 4px;
  font-size: 11px; color: var(--accent-yellow, #f0c060);
}
.processing-text { color: var(--text-secondary, #aaa); }
.repair-advice {
  font-size: 11px; color: var(--text-tertiary); margin-bottom: 10px;
  padding: 10px 12px; background: rgba(255,255,255,0.04); border-radius: 6px;
  line-height: 1.7; text-align: left;
}
.repair-advice .advice-title {
  font-weight: 700; color: var(--text-primary); margin-bottom: 6px; font-size: 12px;
}
.repair-advice .advice-list {
  margin: 0; padding: 0; list-style: none;
}
.repair-advice .advice-list li {
  margin-bottom: 5px; padding-left: 14px; position: relative;
}
.repair-advice .advice-list li::before {
  content: '•'; position: absolute; left: 0; color: var(--accent); font-weight: 700;
}
.repair-advice .advice-list li b { color: var(--text-secondary); font-weight: 600; }
.repair-advice .advice-footer {
  color: var(--text-tertiary); margin-top: 8px; padding-top: 6px;
  border-top: 1px solid rgba(255,255,255,0.08);
}
.repair-advice .advice-fail-note {
  margin-top: 8px; padding: 6px 8px; background: rgba(244,67,54,0.08);
  border-radius: 4px; color: #ef9a9a; line-height: 1.5;
}

.param-label {
  display: block;
  margin-bottom: 8px;
  color: var(--text-secondary);
  font-size: 13px;
}

.param-row {
  display: flex;
  align-items: center;
  gap: 9px;
}

input[type="range"] {
  width: 100%;
  height: 4px;
  border-radius: 999px;
  background: var(--border-color);
  outline: 0;
  -webkit-appearance: none;
  appearance: none;
}

input[type="range"]::-webkit-slider-thumb {
  width: 15px;
  height: 15px;
  border: 0;
  border-radius: 50%;
  background: var(--accent-yellow);
  box-shadow: 0 0 0 4px rgba(250, 204, 21, 0.12);
  -webkit-appearance: none;
  appearance: none;
}

input[type="number"] {
  appearance: textfield;
  -moz-appearance: textfield;
}

input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
  margin: 0;
  -webkit-appearance: none;
}

.param-number,
.param-select {
  border: 1px solid var(--border-color);
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.28);
  color: var(--text-primary);
  outline: 0;
}
/* 全局 select 下拉选项深色背景 */
select, select option {
  background: #1a1a24; color: #fff;
}

.param-number {
  width: 72px;
  flex: 0 0 72px;
  padding: 5px 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  text-align: right;
}

.param-select {
  width: 100%;
  padding: 8px 10px;
}

.param-number:focus,
.param-select:focus {
  border-color: var(--accent-yellow);
}

.dimension-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.dimension-grid label {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 6px;
  color: var(--text-secondary);
  font-size: 12px;
}

.dimension-input {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 6px 8px;
  background: rgba(0, 0, 0, 0.28);
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 12px;
  outline: 0;
}

.dimension-input:focus {
  border-color: var(--accent-yellow);
}

.param-check {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--text-secondary);
}

.param-check input[type="checkbox"] {
  position: relative;
  width: 38px;
  height: 22px;
  flex: 0 0 38px;
  margin: 0;
  border: 0;
  border-radius: 999px;
  background: var(--border-color);
  appearance: none;
  -webkit-appearance: none;
}

.param-check input[type="checkbox"]::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.18s ease;
}

.param-check input[type="checkbox"]:checked {
  background: var(--accent-purple);
}

.param-check input[type="checkbox"]:checked::after {
  transform: translateX(16px);
}

.viewport {
  position: relative;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  isolation: isolate;
  background:
    radial-gradient(circle at var(--vp-glow-x, 50%) var(--vp-glow-y, 58%), rgba(255, 255, 255, 0.08), transparent 28%),
    radial-gradient(circle at 50% 92%, rgba(0, 0, 0, 0.38), transparent 22%),
    linear-gradient(180deg, #1f1f22 0%, #232326 32%, #2d2d30 62%, #3b3b3f 100%);
  cursor: grab;
}

.viewport::before,
.viewport::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.viewport::before {
  z-index: 0;
  background:
    radial-gradient(circle at var(--vp-glow-x, 50%) calc(var(--vp-glow-y, 58%) - 18%), rgba(255, 255, 255, 0.045), transparent 34%),
    radial-gradient(circle at 15% 12%, rgba(255, 255, 255, 0.028), transparent 28%),
    radial-gradient(circle at 84% 18%, rgba(255, 255, 255, 0.02), transparent 24%);
}

.viewport::after {
  z-index: 2;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.12), transparent 18%, transparent 78%, rgba(0, 0, 0, 0.24)),
    radial-gradient(circle at 50% 50%, transparent 56%, rgba(0, 0, 0, 0.16) 100%);
}

.viewport:active {
  cursor: grabbing;
}

.viewport canvas {
  display: block;
  width: 100%;
  height: 100%;
  position: relative;
  z-index: 1;
}

.viewport-overlay {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.22);
  pointer-events: all;
}

.viewport-overlay.hidden {
  display: none;
}

.drop-content {
  width: min(360px, calc(100% - 48px));
  padding: 34px 28px;
  border: 2px dashed var(--border-color);
  border-radius: var(--radius);
  background: rgba(32, 32, 34, 0.88);
  color: var(--text-secondary);
  text-align: center;
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(12px);
}

.drop-content p {
  margin: 12px 0 0;
  color: var(--text-primary);
}

.viewport-loading {
  position: absolute;
  inset: 0;
  z-index: 10;
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 12px;
  background: rgba(0, 0, 0, 0.58);
}

.viewport-loading.visible {
  display: flex;
}

.loading-status-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 80px;
  height: 80px;
  position: relative;
}

/* ──── 统一轨道球 Loading（orbit-spinner）────
   主站所有 loading 指示器统一为此视觉：
   "固定轨道 + 轨道小球 + 中心脉冲"
   尺寸档：
     --lg  64px  视口蒙层
     --md  42px  普通局部 loading
     --sm  20px  头像 / 支付轮询等行内场景
   CSS 变量入口（可按场景覆写）：
     --orbit-size, --orbit-track-inset, --orbit-track-border,
     --orbit-inner-inset, --orbit-inner-border,
     --orbit-dot-offset, --orbit-dot-size, --orbit-dot-color,
     --orbit-glow-size, --orbit-glow-color,
     --orbit-center-size, --orbit-center-color
   ─────────────────────────────────────────── */

.orbit-spinner {
  --_os:    var(--orbit-size, 64px);
  --_oti:   var(--orbit-track-inset, 6px);
  --_otb:   var(--orbit-track-border, 3px solid rgba(255, 210, 49, 0.16));
  --_otbs:  var(--orbit-track-box-shadow, inset 0 0 14px rgba(255,210,49,0.14), 0 0 14px rgba(255,210,49,0.08));
  --_oii:   var(--orbit-inner-inset, 16px);
  --_oib:   var(--orbit-inner-border, 2px solid rgba(255, 210, 49, 0.12));
  --_odo:   var(--orbit-dot-offset, 8px);
  --_ods:   var(--orbit-dot-size, 12px);
  --_odc:   var(--orbit-dot-color, radial-gradient(circle, #ffe27a 0, var(--accent-yellow) 48%, rgba(255,210,49,0.18) 100%));
  --_odbs:  var(--orbit-dot-shadow, 0 0 10px rgba(255,210,49,0.95), 0 0 22px rgba(255,210,49,0.42));
  --_ocs:   var(--orbit-center-size, 14px);
  --_occ:   var(--orbit-center-color, radial-gradient(circle, #ffe9a6 0, rgba(255,210,49,0.95) 45%, rgba(255,210,49,0.2) 100%));
  --_ocbs:  var(--orbit-center-shadow, 0 0 18px rgba(255,210,49,0.45));
  --_odrop: var(--orbit-drop-shadow, drop-shadow(0 0 18px rgba(255,210,49,0.25)));

  position: relative;
  width:  var(--_os);
  height: var(--_os);
  border-radius: 50%;
  filter: var(--_odrop);
}

.orbit-spinner::before,
.orbit-spinner::after {
  content: '';
  position: absolute;
  border-radius: 50%;
}

.orbit-spinner::before {
  inset: var(--_oti);
  border: var(--_otb);
  box-shadow: var(--_otbs);
}

.orbit-spinner::after {
  inset: var(--_oii);
  border: var(--_oib);
}

.orbit-spinner span {
  position: absolute;
  inset: 0;
  display: block;
  animation: exportSpin 1.05s linear infinite;
  will-change: transform;
}

.orbit-spinner span::before,
.orbit-spinner span::after {
  content: '';
  position: absolute;
}

.orbit-spinner span::before {
  top: var(--_odo);
  left: 50%;
  width:  var(--_ods);
  height: var(--_ods);
  margin-left: calc(var(--_ods) / -2);
  border-radius: 50%;
  background: var(--_odc);
  box-shadow: var(--_odbs);
}

.orbit-spinner span::after {
  top: 50%;
  left: 50%;
  width:  var(--_ocs);
  height: var(--_ocs);
  margin: calc(var(--_ocs) / -2) 0 0 calc(var(--_ocs) / -2);
  border-radius: 50%;
  background: var(--_occ);
  animation: exportPulse 1.4s ease-in-out infinite;
  box-shadow: var(--_ocbs);
}

/* ──── 尺寸档 ──── */
.orbit-spinner--lg {
  /* 64px — 视口蒙层，即默认值，无须覆写 */
}

.orbit-spinner--md {
  --orbit-size:           42px;
  --orbit-track-inset:    4px;
  --orbit-track-border:   2px solid rgba(255,210,49,0.16);
  --orbit-track-box-shadow: inset 0 0 9px rgba(255,210,49,0.14), 0 0 9px rgba(255,210,49,0.08);
  --orbit-inner-inset:    10px;
  --orbit-inner-border:   2px solid rgba(255,210,49,0.12);
  --orbit-dot-offset:     5px;
  --orbit-dot-size:       8px;
  --orbit-dot-shadow:     0 0 7px rgba(255,210,49,0.95), 0 0 14px rgba(255,210,49,0.42);
  --orbit-center-size:    9px;
  --orbit-center-shadow:  0 0 12px rgba(255,210,49,0.45);
  --orbit-drop-shadow:    drop-shadow(0 0 12px rgba(255,210,49,0.2));
}

.orbit-spinner--sm {
  --orbit-size:           20px;
  --orbit-track-inset:    2px;
  --orbit-track-border:   1.5px solid rgba(255,210,49,0.18);
  --orbit-track-box-shadow: inset 0 0 5px rgba(255,210,49,0.12), 0 0 5px rgba(255,210,49,0.06);
  --orbit-inner-inset:    5px;
  --orbit-inner-border:   1px solid rgba(255,210,49,0.14);
  --orbit-dot-offset:     2.5px;
  --orbit-dot-size:       4px;
  --orbit-dot-shadow:     0 0 4px rgba(255,210,49,0.95), 0 0 7px rgba(255,210,49,0.42);
  --orbit-center-size:    5px;
  --orbit-center-shadow:  0 0 6px rgba(255,210,49,0.45);
  --orbit-drop-shadow:    drop-shadow(0 0 6px rgba(255,210,49,0.18));
}

/* 旧 spinner/export-orbit-spinner 已迁移到 .orbit-spinner 体系 */
.export-orbit-spinner { display: none; }

@keyframes exportSpin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

@keyframes exportPulse {
  0%, 100% {
    transform: scale(0.72);
    opacity: 0.55;
  }
  50% {
    transform: scale(1);
    opacity: 1;
  }
}

/* -- 视口加载文案 -- */
.loading-title {
  margin: 0;
  color: var(--text-primary);
  font-size: 16px;
  font-weight: 800;
  text-align: center;
}

.loading-desc {
  margin: 0;
  color: var(--text-secondary);
  font-size: 13px;
  text-align: center;
  max-width: 280px;
  line-height: 1.5;
}

/* -- 排队等待环 -- */
.loading-wait-ring {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 80px;
  height: 80px;
}

.wait-ring-arc {
  animation: ring-spin 2s linear infinite;
  transform-origin: 40px 40px;
}

@keyframes ring-spin {
  to { transform: rotate(360deg); }
}

.wait-elapsed {
  position: absolute;
  color: var(--accent-yellow);
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 800;
}

.loading-close-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 112px;
  height: 36px;
  padding: 0 18px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 800;
  line-height: 1;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.22);
}

.loading-close-btn:hover {
  border-color: rgba(250, 204, 21, 0.48);
  background: rgba(250, 204, 21, 0.16);
  color: var(--accent-yellow);
}

/* -- 排队脉冲动画 -- */
.loading-pulse {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(250, 204, 21, 0.12);
  animation: pulse-ring 2s ease-in-out infinite;
}

@keyframes pulse-ring {
  0%   { transform: scale(0.7); opacity: 0.4; }
  50%  { transform: scale(1.08); opacity: 0.85; }
  100% { transform: scale(0.7); opacity: 0.4; }
}

/* -- 状态修饰 -- */
.viewport-loading.state-submitting .loading-status-icon { color: var(--accent-blue); }
.viewport-loading.state-queue .loading-status-icon { color: var(--accent-yellow); }
.viewport-loading.state-running .loading-status-icon { color: var(--accent-purple); }
.viewport-loading.state-saving .loading-status-icon { color: var(--accent-yellow); }
.viewport-loading.state-exporting .loading-status-icon { color: var(--accent-yellow); }
.viewport-loading.state-done .loading-status-icon { color: #2ed573; }
.viewport-loading.state-error .loading-status-icon { color: #ef4444; }

.viewport-loading.state-saving .loading-title { color: var(--accent-yellow); }
.viewport-loading.state-exporting .loading-title { color: var(--accent-yellow); }
.viewport-loading.state-error .loading-title { color: #ef4444; }
.viewport-loading.state-done .loading-title { color: #2ed573; }

.viewport-status-card {
  position: absolute;
  left: 14px;
  top: 14px;
  z-index: 4;
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 9px 13px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.48);
  pointer-events: none;
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.45;
}

.vsc-row {
  display: flex;
  gap: 8px;
  align-items: baseline;
  white-space: nowrap;
}

.vsc-label {
  color: var(--text-secondary);
  flex-shrink: 0;
}

.vsc-value {
  color: var(--text-primary);
  font-weight: 600;
}

.view-axis-widget {
  position: absolute;
  top: 16px;
  right: 28px;
  z-index: 8;
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 47%, rgba(28, 30, 34, 0.98) 0 64%, rgba(22, 23, 27, 0.98) 100%);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.18);
  pointer-events: none;
}

.view-axis-widget::before {
  display: none;
}

.view-axis-widget::after {
  display: none;
}

.view-axis-btn,
.view-axis-dot {
  position: absolute;
  border: 0;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-weight: 900;
  cursor: pointer;
  pointer-events: auto;
  transition: transform 0.14s ease, filter 0.14s ease;
}

.view-axis-btn {
  z-index: 2;
}

.view-axis-btn::after {
  content: "";
  position: absolute;
  z-index: -1;
  left: 50%;
  top: 50%;
  width: var(--axis-line-length, 0px);
  height: 3px;
  border-radius: 999px;
  background: var(--axis-line-color, currentColor);
  opacity: var(--axis-line-opacity, 0);
  transform: rotate(var(--axis-line-angle, 0deg));
  transform-origin: 0 50%;
  pointer-events: none;
}

.view-axis-btn {
  width: 19px;
  height: 19px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  color: #111318;
  font-size: 13px;
  letter-spacing: 0;
  line-height: 1;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.18);
}

.view-axis-dot {
  width: 11px;
  height: 11px;
  opacity: 0.72;
  box-shadow: none;
}

.view-axis-btn:hover,
.view-axis-dot:hover {
  filter: brightness(1.12);
  transform: scale(1.08);
}

.view-axis-btn:focus-visible,
.view-axis-dot:focus-visible {
  outline: 2px solid rgba(255, 214, 10, 0.75);
  outline-offset: 3px;
}

.view-axis-y {
  top: 10px;
  left: 36px;
  background: #a7e84d;
}

.view-axis-z {
  top: 36px;
  left: 11px;
  background: #45a8f2;
}

.view-axis-x {
  top: 36px;
  left: 36px;
  background: #ff4d68;
}

.dot-y {
  top: 68px;
  left: 40px;
  background: #a7e84d;
}

.dot-z {
  top: 40px;
  left: 68px;
  background: #45a8f2;
}

.dot-x {
  top: 40px;
  left: 11px;
  background: #ff4d68;
}

.gizmo-toolbar {
  position: absolute;
  right: 18px;
  top: 50%;
  z-index: 8;
  display: grid;
  gap: 8px;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  background: rgba(32, 32, 34, 0.86);
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(12px);
  transform: translateY(-50%);
}

.gizmo-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--text-secondary);
  font-size: 18px;
  line-height: 1;
}

.gizmo-btn span,
.gizmo-btn svg {
  display: block;
}

.gizmo-btn svg {
  opacity: 0.92;
}

.gizmo-btn:hover,
.gizmo-btn.active {
  background: rgba(255, 255, 255, 0.12);
  color: var(--text-primary);
}

.gizmo-btn.active {
  box-shadow: inset 0 0 0 1px rgba(250, 204, 21, 0.55);
}

.gizmo-btn-toggle.active {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.1));
  color: #f8fafc;
  box-shadow:
    inset 0 0 0 1px rgba(250, 204, 21, 0.58),
    0 0 16px rgba(250, 204, 21, 0.18);
}

.bg-export-toolbar-btn {
  position: relative;
}

.bg-export-toolbar-btn.has-tasks {
  color: var(--accent-yellow);
}

.bg-export-toolbar-btn.open,
.bg-export-toolbar-btn.has-active {
  background: rgba(250, 204, 21, 0.12);
  box-shadow:
    inset 0 0 0 1px rgba(250, 204, 21, 0.5),
    0 0 16px rgba(250, 204, 21, 0.16);
}

.bg-export-toolbar-btn.receiving {
  animation: bgExportReceive 0.72s ease both;
}

.bg-export-toolbar-badge {
  position: absolute;
  top: -4px;
  right: -5px;
  min-width: 17px;
  height: 17px;
  padding: 0 5px;
  border: 1px solid rgba(20, 20, 20, 0.7);
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-yellow);
  color: #111;
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.28);
}

.bg-export-toolbar-badge.hidden {
  display: none;
}

.bg-export-toolbar-badge.pulse {
  animation: bgExportBadgePulse 0.8s ease both;
}

.export-parcel-flight {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 30;
  width: 52px;
  height: 52px;
  pointer-events: none;
  will-change: transform, opacity;
  filter: drop-shadow(0 18px 22px rgba(0, 0, 0, 0.34));
}

.export-parcel-flight::before {
  content: "";
  position: absolute;
  inset: 8px 7px 7px;
  border: 1px solid rgba(250, 204, 21, 0.45);
  border-radius: 11px;
  background:
    linear-gradient(145deg, rgba(250, 204, 21, 0.95), rgba(139, 92, 246, 0.92)),
    rgba(250, 204, 21, 0.9);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.42),
    0 0 0 7px rgba(250, 204, 21, 0.08);
}

.export-parcel-flight::after {
  content: "";
  position: absolute;
  left: 17px;
  top: 14px;
  width: 18px;
  height: 22px;
  border-radius: 5px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.72));
  box-shadow:
    0 0 0 1px rgba(24, 24, 28, 0.12),
    0 9px 16px rgba(0, 0, 0, 0.16);
}

.export-parcel-trail {
  position: absolute;
  right: 41px;
  top: 23px;
  width: 56px;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(250, 204, 21, 0), rgba(250, 204, 21, 0.75));
  opacity: 0.7;
}

@keyframes bgExportReceive {
  0% { transform: scale(1); }
  38% { transform: scale(1.13); }
  100% { transform: scale(1); }
}

@keyframes bgExportBadgePulse {
  0% { transform: scale(0.82); }
  45% { transform: scale(1.2); }
  100% { transform: scale(1); }
}

.background-export-widget {
  position: absolute;
  right: 72px;
  top: calc(50% + 126px);
  z-index: 9;
  width: clamp(220px, 18vw, 280px);
  max-height: min(46vh, 420px);
  overflow: auto;
  border: 1px solid rgba(250, 204, 21, 0.22);
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(30, 30, 34, 0.94), rgba(17, 17, 20, 0.92)),
    rgba(18, 18, 22, 0.96);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.34);
  backdrop-filter: blur(16px);
}

.background-export-widget.hidden,
.background-export-widget:not(.open) {
  display: none;
}

.bg-export-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 12px 8px;
  color: rgba(255, 255, 255, 0.92);
  font-size: 13px;
  font-weight: 800;
}

.bg-export-count {
  flex: 0 0 auto;
  min-width: 22px;
  height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(250, 204, 21, 0.16);
  color: var(--accent-yellow);
  font-size: 12px;
}

.bg-export-list {
  display: grid;
  gap: 8px;
  padding: 0 10px 10px;
}

.bg-export-item {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.045);
}

.bg-export-title-row,
.bg-export-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.bg-export-title {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: rgba(255, 255, 255, 0.9);
  font-size: 12px;
  font-weight: 800;
}

.bg-export-status {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: rgba(255, 255, 255, 0.62);
  font-size: 11px;
  font-weight: 700;
}

.bg-export-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-yellow);
  box-shadow: 0 0 0 3px rgba(250, 204, 21, 0.12);
}

.bg-export-item.status-running .bg-export-dot,
.bg-export-item.status-uploading .bg-export-dot {
  background: #8b5cf6;
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.14);
}

.bg-export-item.status-done .bg-export-dot {
  background: #2ed573;
  box-shadow: 0 0 0 3px rgba(46, 213, 115, 0.14);
}

.bg-export-item.status-done .bg-export-status {
  color: rgba(134, 239, 172, 0.9);
}

.bg-export-item.status-done .bg-export-desc {
  color: rgba(255, 255, 255, 0.58);
}

.bg-export-item.status-failed .bg-export-dot,
.bg-export-item.status-timeout .bg-export-dot,
.bg-export-item.status-failed_payment .bg-export-dot,
.bg-export-item.status-download_failed .bg-export-dot {
  background: #ef4444;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.14);
}

.bg-export-desc {
  color: rgba(255, 255, 255, 0.48);
  font-size: 11px;
  line-height: 1.45;
}

.bg-export-file {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: rgba(250, 204, 21, 0.82);
  font-size: 11px;
  font-weight: 700;
}

.bg-export-actions {
  display: flex;
  gap: 8px;
}

.bg-export-action {
  flex: 1 1 auto;
  min-height: 30px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.07);
  color: rgba(255, 255, 255, 0.82);
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.bg-export-action.primary {
  border-color: rgba(250, 204, 21, 0.35);
  background: rgba(250, 204, 21, 0.18);
  color: var(--accent-yellow);
}

.bg-export-action:hover {
  background: rgba(255, 255, 255, 0.12);
}

.bottom-toolbar {
  position: absolute;
  left: 50%;
  bottom: 24px;
  z-index: 8;
  display: flex;
  align-items: center;
  gap: 12px;
  width: max-content;
  max-width: calc(100% - 28px);
  padding: 8px 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  background: rgba(32, 32, 34, 0.92);
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(12px);
  transform: translateX(-50%);
}

.print-export-anchor {
  position: relative;
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
}

.print-export-menu {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 12px);
  z-index: 12;
  display: flex;
  min-width: 256px;
  flex-direction: column;
  gap: 6px;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  background: rgba(24, 24, 28, 0.96);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(18px);
  opacity: 0;
  pointer-events: none;
  transform: translateX(-50%) translateY(8px) scale(0.98);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.print-export-menu.open {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0) scale(1);
}

.print-export-menu-item {
  min-height: 42px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: transparent;
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 700;
  text-align: left;
  padding: 0 14px;
  white-space: nowrap;
  transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease, opacity 0.16s ease;
}

.print-export-menu-item:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.12);
}

.print-export-menu-item:disabled {
  opacity: 0.42;
  color: var(--text-secondary);
  cursor: not-allowed;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--text-secondary);
}

.icon-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
}

.icon-btn:disabled {
  opacity: 0.42;
  cursor: not-allowed;
}

.toolbar-divider {
  width: 1px;
  height: 22px;
  background: var(--border-color);
}

.export-btn {
  min-height: 34px;
  border: 0;
  border-radius: 999px;
  padding: 0 15px;
  font-weight: 500;
  white-space: nowrap;
}

.export-btn.primary {
  background: var(--accent-purple);
  color: #fff;
}

.export-btn.secondary {
  background: var(--accent-yellow);
  color: #111;
}

.export-btn.tertiary {
  border: 1px solid var(--border-color);
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
}

.export-btn.primary:hover {
  background: #7c3aed;
}

.export-btn.secondary:hover {
  background: var(--accent-yellow-hover);
}

.export-btn.tertiary:hover {
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.14);
}

.export-btn:disabled,
.export-btn.is-loading {
  cursor: wait;
  opacity: 0.62;
  filter: saturate(0.78);
}

.tabs {
  display: flex;
  border-bottom: 1px solid var(--border-color);
}

.tab {
  flex: 1;
  padding: 16px 0 14px;
  border-bottom: 2px solid transparent;
  color: var(--text-secondary);
  font-weight: 700;
  text-align: center;
}

.tab.active {
  border-bottom-color: var(--accent-yellow);
  color: var(--text-primary);
}

.stats-card {
  margin: 16px 16px 0;
  padding: 16px;
  border-radius: var(--radius);
  background: rgba(0, 0, 0, 0.15);
}

.stats-card:last-child {
  margin-bottom: 16px;
}

.stats-scroll {
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.26) rgba(255, 255, 255, 0.04);
}

.stats-scroll::-webkit-scrollbar,
.fc-detail-body::-webkit-scrollbar {
  width: 6px;
}

.stats-scroll::-webkit-scrollbar-track,
.fc-detail-body::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.04);
  border-radius: 999px;
}

.stats-scroll::-webkit-scrollbar-thumb,
.fc-detail-body::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255,255,255,0.34), rgba(255,255,255,0.18));
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.04);
}

.stats-scroll::-webkit-scrollbar-thumb:hover,
.fc-detail-body::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, rgba(255,255,255,0.5), rgba(255,255,255,0.28));
}

.stats-scroll::-webkit-scrollbar-thumb:active,
.fc-detail-body::-webkit-scrollbar-thumb:active {
  background: linear-gradient(180deg, rgba(255,255,255,0.62), rgba(255,255,255,0.36));
}

.stats-scroll:hover,
.fc-detail-body:hover {
  scrollbar-color: rgba(255, 255, 255, 0.4) rgba(255, 255, 255, 0.05);
}

.stats-scroll::-webkit-scrollbar-corner,
.fc-detail-body::-webkit-scrollbar-corner {
  background: transparent;
}

/* 用户状态卡片 */
.stats-user-info {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.stats-user-avatar {
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #a855f7, #7c3aed);
  color: #fff;
  font-size: 16px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}

.stats-user-meta {
  min-width: 0;
  flex: 1;
}

.stats-user-name {
  font-weight: 700;
  font-size: 14px;
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stats-user-plan {
  font-size: 11px;
  color: var(--text-secondary);
  margin-top: 2px;
}

.stats-quota-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.stats-quota-numbers {
  font-size: 12px;
  color: var(--text-primary);
}

.stats-quota-expiry {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 6px;
}

/* 场景摘要 */
.stats-summary {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.summary-row:last-child {
  padding-bottom: 0;
  border-bottom: none;
}

.summary-label {
  font-size: 12px;
  color: var(--text-secondary);
}

.summary-value {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
  text-align: right;
}

.summary-badge {
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 11px;
  line-height: 1.5;
  white-space: nowrap;
}

.summary-badge[data-status="enabled"] {
  background: rgba(46, 213, 115, 0.15);
  color: #2ed573;
}

.summary-badge[data-status="disabled"] {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-muted);
}

/* 联系客服按钮 */
.cs-btn {
  border: none;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all .2s ease;
}

.cs-btn.icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.cs-btn.icon-btn svg {
  width: 24px;
  height: 24px;
  stroke: currentColor;
}

.cs-btn:hover {
  color: var(--accent-purple);
  background: rgba(139, 92, 246, 0.15);
  border-color: rgba(139, 92, 246, 0.3);
}

/* 客服弹窗 */
.cs-overlay .cs-modal {
  width: 480px;
  max-width: 94vw;
  max-height: 90vh;
  overflow-y: auto;
  background: var(--bg-panel);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
  padding: 0;
}
.cs-header {
  text-align: center;
  padding: 32px 32px 0;
}
.cs-header h2 {
  margin: 0 0 6px;
  font-size: 22px;
  font-weight: 800;
  color: var(--text-primary);
}
.cs-header p {
  margin: 0;
  font-size: 14px;
  color: var(--text-secondary);
}
.cs-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 28px 32px 36px;
  gap: 24px;
}
.cs-qr-wrapper {
  position: relative;
  width: 200px;
  height: 200px;
  flex: 0 0 200px;
  border: 2px solid var(--border-color);
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}
.cs-qr-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
.cs-qr-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--text-muted);
  font-size: 13px;
}
.cs-qr-placeholder svg {
  opacity: 0.4;
}
.cs-info {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.cs-info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  background: var(--bg-main);
  border-radius: 8px;
}
.cs-info-label {
  font-size: 13px;
  color: var(--text-secondary);
  flex-shrink: 0;
}
.cs-info-value {
  font-size: 13px;
  color: var(--text-primary);
  font-weight: 600;
  text-align: right;
  word-break: break-all;
}
.cs-close-btn {
  position: absolute;
  top: 12px;
  right: 16px;
  z-index: 2;
}

.info-grid {
  display: grid;
  gap: 12px;
}

.info-item {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.info-item:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.info-label {
  flex: 0 0 auto;
  color: var(--text-secondary);
  font-size: 13px;
}

.info-value {
  min-width: 0;
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 700;
  text-align: right;
  word-break: break-word;
}

@media (max-width: 1460px) {
  :root {
    --tool-width: 58px;
    --panel-width: 274px;
    --stats-width: 296px;
  }

  .top-bar {
    gap: 12px;
    padding: 0 16px;
  }

  .brand {
    min-width: 150px;
    font-size: 16px;
    letter-spacing: 0.02em;
  }

  .workspace-nav {
    margin-left: 0;
    padding-left: 12px;
  }

  .workspace-tab {
    padding: 0 12px;
    font-size: 13px;
  }

  .top-center {
    position: static;
    left: auto;
    top: auto;
    flex: 1 1 220px;
    width: auto;
    min-width: 0;
    max-width: 340px;
    justify-content: center;
    transform: none;
  }

  .top-account {
    min-width: 0;
    margin-left: auto;
    gap: 8px;
  }

  .upgrade-btn,
  .tutorial-btn,
  .cs-btn {
    width: auto;
    min-width: 64px;
    padding: 0 11px;
  }

  .left-toolbar {
    gap: 14px;
    padding: 14px 6px;
  }

  .tool-item {
    width: 46px;
    min-height: 52px;
  }

  .bottom-toolbar {
    left: 14px;
    right: 14px;
    width: auto;
    max-width: none;
    flex-wrap: wrap;
    gap: 8px;
    padding: 7px 10px;
    justify-content: center;
    border-radius: 18px;
    transform: none;
  }

  .export-btn {
    flex: 0 1 auto;
    min-width: 0;
    padding: 0 12px;
    font-size: 13px;
  }
}

@media (max-width: 1180px) and (min-width: 861px) {
  .top-center {
    flex-basis: 160px;
    max-width: 240px;
  }

  .credits-label,
  .credits-unit {
    display: none;
  }

  .top-account {
    gap: 6px;
  }

  .bottom-toolbar {
    left: 12px;
    right: 12px;
    padding: 8px;
  }

  .upgrade-btn,
  .tutorial-btn,
  .cs-btn {
    min-width: 58px;
    height: 30px;
    padding: 0 9px;
  }
}

@media (max-width: 1100px) {
  .stats-panel {
    display: none;
  }
}

@media (max-width: 860px) {
  :root {
    --header-height: 58px;
    --status-height: 28px;
  }

  body {
    overflow: hidden;
    touch-action: manipulation;
  }

  .app-shell {
    height: 100dvh;
    min-height: 100dvh;
  }

  .top-bar {
    height: var(--header-height);
    padding: 0 14px;
    gap: 8px;
  }

  .brand {
    min-width: 0;
    gap: 8px;
    font-size: 16px;
    letter-spacing: 0;
  }

  .brand-mark {
    border-left-width: 7px;
    border-right-width: 7px;
    border-bottom-width: 13px;
  }

  .nav-links,
  .top-account {
    display: none;
  }

  .top-center {
    position: static;
    width: auto;
    min-width: 0;
    transform: none;
  }

  .project-name {
    max-width: 30vw;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
    text-align: left;
    font-size: 12px;
  }

  .main-container {
    position: relative;
    display: block;
    flex: 1;
    min-height: 0;
    overflow: hidden;
  }

  .viewport {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
  }

  .right-panel {
    position: absolute;
    inset: auto 0 0;
    z-index: 45;
    width: 100%;
    max-height: min(80dvh, 720px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-bottom: 0;
    border-radius: 20px 20px 0 0;
    background: rgba(32, 32, 34, 0.98);
    box-shadow: 0 -18px 46px rgba(0, 0, 0, 0.52);
    transform: translateY(calc(100% + 18px));
    transition: transform 0.24s ease;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding-bottom: calc(12px + env(safe-area-inset-bottom));
  }

  .main-container.mobile-panel-open .right-panel {
    transform: translateY(0);
  }

  .mobile-panel-backdrop {
    position: absolute;
    inset: 0;
    z-index: 40;
    display: block;
    background: rgba(0, 0, 0, 0.46);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
  }

  .main-container.mobile-panel-open .mobile-panel-backdrop {
    opacity: 1;
    pointer-events: auto;
  }

  .mobile-panel-grip {
    position: sticky;
    top: 0;
    z-index: 4;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 58px;
    padding: 16px 52px 8px;
    border-bottom: 1px solid var(--border-color);
    background: rgba(24, 24, 28, 0.98);
    color: var(--text-primary);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.22);
    cursor: grab;
    touch-action: none;
    user-select: none;
  }

  .mobile-panel-grip::before {
    content: "";
    position: absolute;
    top: 8px;
    left: 50%;
    width: 72px;
    height: 5px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.38);
    transform: translateX(-50%);
  }

  .mobile-panel-grip.is-dragging {
    cursor: grabbing;
  }

  .mobile-panel-drag-label {
    color: var(--accent-yellow);
    font-size: 13px;
    font-weight: 900;
    line-height: 1.1;
  }

  .mobile-panel-title {
    margin-top: 3px;
    color: rgba(255, 255, 255, 0.58);
    font-size: 11px;
    font-weight: 700;
    line-height: 1.1;
  }

  .mobile-panel-close {
    position: absolute;
    top: 13px;
    right: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.76);
    font-size: 22px;
    line-height: 1;
  }

  .mobile-panel-close:active {
    background: rgba(255, 255, 255, 0.16);
    color: #fff;
  }

  .panel-header {
    display: none;
  }

  .upload-zone {
    margin: 12px;
    padding: 16px 12px;
  }

  .upload-zone p {
    margin: 6px 0 10px;
  }

  .panel-section {
    display: none;
    margin: 0 12px 12px;
    padding: 12px 12px 14px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.035);
  }

  .panel-section.panel-active {
    display: block;
  }

  .panel-section.model-source-pane.source-active {
    display: block;
  }

  .panel-section > .panel-title {
    margin: 0 0 12px;
    font-size: 14px;
  }

  .param-group {
    margin-bottom: 10px;
  }

  .param-label {
    margin-bottom: 6px;
    font-size: 12px;
  }

  .param-row {
    gap: 8px;
  }

  .param-number {
    width: 64px;
    flex-basis: 64px;
    padding: 5px 6px;
    font-size: 11px;
  }

  .dimension-grid {
    gap: 6px;
  }

  .dimension-grid label {
    gap: 4px;
    font-size: 11px;
  }

  .action-grid {
    gap: 6px;
    margin-bottom: 10px;
  }

  .inline-action.compact {
    min-height: 38px;
    font-size: 12px;
  }

  .transform-section {
    margin-bottom: 12px;
  }

  .transform-section-title {
    margin-bottom: 6px;
    font-size: 12px;
  }

  .stepper-row {
    display: grid;
    grid-template-columns: 16px 26px minmax(0, 1fr) 26px 42px 42px;
    gap: 4px;
    margin-bottom: 5px;
  }

  .stepper-btn,
  .stepper-input {
    height: 30px;
  }

  .quick-btn {
    height: 30px;
    padding: 0 4px;
    font-size: 10px;
  }

  .left-toolbar {
    position: absolute;
    left: 10px;
    right: 10px;
    bottom: 12px;
    z-index: 32;
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    align-items: stretch;
    width: auto;
    height: auto;
    min-height: 64px;
    gap: 6px;
    padding: 6px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 18px;
    background: rgba(20, 20, 22, 0.92);
    box-shadow: var(--shadow-lg);
    backdrop-filter: blur(12px);
  }

  .tool-item {
    width: auto;
    min-width: 0;
    min-height: 50px;
    padding: 4px 0;
    gap: 4px;
    border-radius: 12px;
  }

  .tool-item svg {
    width: 20px;
    height: 20px;
  }

  .tool-item span {
    font-size: 11px;
  }

  /* 第 6 项"减重模具"放入更多 */
  .tool-item[data-panel="lightweightMold"] { display: none !important; }
  .tool-item.tool-more {
    width: auto;
    display: flex !important;
  }
  .tool-more-popover {
    display: none;
    position: absolute; bottom: 84px; left: 10px; right: 10px;
    z-index: 35;
    padding: 8px;
    border-radius: 14px;
    background: rgba(20,20,22,0.96);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,0.08);
  }
  .tool-more-popover.open { display: flex; gap: 8px; justify-content: center; }
  .tool-more-popover .tool-item { width: auto; flex: 1; min-height: 44px; }
  .tool-more-popover .tool-item[data-panel="lightweightMold"] { display: flex; }

  .bottom-toolbar {
    left: 10px;
    right: 10px;
    bottom: 88px;
    width: auto;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px;
    border-radius: 16px;
    transform: none;
  }

  .main-container.mobile-panel-open .bottom-toolbar,
  .main-container.mobile-panel-open .gizmo-toolbar,
  .main-container.mobile-panel-open .left-toolbar {
    display: none;
  }

  .export-btn {
    flex: 1;
    min-width: 0;
    min-height: 38px;
    padding: 0 10px;
    font-size: 13px;
  }

  .icon-btn {
    flex: 0 0 38px;
    width: 38px;
    height: 38px;
  }

  .toolbar-divider {
    display: none;
  }

  .gizmo-toolbar {
    right: 10px;
    top: auto;
    bottom: 162px;
    gap: 6px;
    padding: 7px;
    transform: none;
  }

  .gizmo-btn {
    width: 38px;
    height: 38px;
  }

  .view-axis-widget {
    top: 14px;
    right: 12px;
    transform: scale(0.9);
    transform-origin: top right;
  }

  .stats-panel {
    display: none;
  }

  #panelImageTo3D {
    padding: 12px;
  }

  #panelImageTo3D .panel-title {
    margin-bottom: 12px;
    font-size: 14px;
  }

  #panelImageTo3D .image-upload-zone {
    min-height: 136px;
    margin: 0 0 12px;
    padding: 18px 12px 14px;
    border-radius: 12px;
  }

  #panelImageTo3D .image-upload-zone svg {
    width: 28px;
    height: 28px;
  }

  #panelImageTo3D .image-upload-zone p {
    margin: 10px 0 12px;
    font-size: 14px;
    line-height: 1.5;
  }

  #panelImageTo3D .image-upload-zone small {
    font-size: 11px;
  }

  #panelImageTo3D .upload-btn {
    width: 100%;
    min-width: 0;
    min-height: 38px;
  }

  #panelImageTo3D .image-mode-header {
    margin-bottom: 6px;
    font-size: 12px;
  }

  #panelImageTo3D .image-mode-selected {
    min-height: 58px;
    padding: 10px 12px;
  }

  #panelImageTo3D .image-mode-option {
    min-height: 54px;
    padding: 10px 12px;
  }

  #panelImageTo3D .image-mode-icon {
    flex-basis: 32px;
    width: 32px;
    height: 32px;
    font-size: 15px;
  }

  #panelImageTo3D .image-mode-title,
  #panelImageTo3D .image-mode-desc {
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
  }

  #panelImageTo3D .image-mode-title {
    font-size: 12px;
    line-height: 1.3;
  }

  #panelImageTo3D .image-mode-desc {
    font-size: 10px;
    line-height: 1.35;
  }

  #panelImageTo3D .image-preview-area {
    margin-bottom: 10px;
  }

  #panelImageTo3D .image-preview-canvas {
    max-height: 220px;
  }

  #panelImageTo3D #btnGenerateFromImage,
  #panelImageTo3D #btnDownloadImage3D {
    min-height: 40px;
    margin-bottom: 8px !important;
  }

}

@media (max-width: 640px) {
  .top-bar {
    padding: 0 12px;
  }

  .brand {
    font-size: 15px;
  }

  .project-name {
    max-width: 34vw;
    font-size: 12px;
  }

  .right-panel {
    max-height: 82dvh;
  }

  .dimension-grid {
    gap: 7px;
  }

  .param-number {
    width: 68px;
    flex-basis: 68px;
  }

  .action-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .stepper-row {
    grid-template-columns: 14px 24px minmax(0, 1fr) 24px 38px 38px;
  }

  .bottom-toolbar {
    flex-wrap: nowrap;
  }
}

/* ===== 公告横幅 ===== */
.site-announcement {
  display: flex;
  align-items: center;
  height: 38px;
  padding: 0 40px 0 0;
  background: linear-gradient(135deg, #1a1a2e, #2d1b69);
  border-bottom: 1px solid rgba(139, 92, 246, 0.3);
  position: relative;
  z-index: 15;
  overflow: hidden;
}

.site-announcement-marquee {
  flex: 1;
  overflow: hidden;
  height: 100%;
  display: flex;
  align-items: center;
}

.site-announcement-track {
  display: flex;
  white-space: nowrap;
  will-change: transform;
}

.site-announcement-text {
  font-size: 13px;
  line-height: 38px;
  color: var(--text-primary);
  padding-right: 60px;
  display: inline-block;
  white-space: nowrap;
  flex-shrink: 0;
}

@keyframes marquee-scroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.site-announcement-close {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 20px;
  cursor: pointer;
  padding: 4px 8px;
  line-height: 1;
  border-radius: 4px;
  transition: color 0.2s, background 0.2s;
}

.site-announcement-close:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.1);
}

/* ===== 站点页脚 ===== */
.site-footer {
  padding: 12px 24px;
  background: var(--bg-main);
  border-top: 1px solid var(--border-color);
  text-align: center;
  position: relative;
  z-index: 5;
}

.site-footer-inner {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.6;
}

.site-footer-inner a {
  color: var(--accent-purple);
  text-decoration: none;
}

.site-footer-inner a:hover {
  text-decoration: underline;
}

/* ========== 图生3D 图片上传区域 ========== */
.image-upload-zone {
  margin: 0 0 16px;
  padding: 16px 12px;
  border: 2px dashed var(--border-color);
  border-radius: var(--radius);
  background: rgba(0, 0, 0, 0.16);
  color: var(--text-secondary);
  text-align: center;
  transition: border-color 0.18s ease, background 0.18s ease;
}

.image-upload-zone:hover {
  border-color: var(--accent-purple);
  background: rgba(139, 92, 246, 0.08);
}

.image-upload-zone svg {
  color: var(--text-secondary);
}

.image-upload-zone p {
  margin: 8px 0 12px;
  color: var(--text-primary);
  line-height: 1.55;
}

.image-upload-zone small {
  color: var(--text-secondary);
}

.image-preview-area {
  margin-bottom: 16px;
  text-align: center;
}

.image-preview-area {
  max-width: 100%;
  margin-bottom: 16px;
  text-align: center;
}

.preview-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.preview-label {
  font-size: 12px;
  color: var(--text-secondary);
  font-weight: 600;
}

.preview-switch-btn {
  border: none;
  background: transparent;
  color: var(--accent-purple);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  padding: 2px 8px;
  border-radius: 4px;
}

.preview-switch-btn:hover {
  background: rgba(139, 92, 246, 0.12);
}

.image-preview-canvas {
  width: 100%;
  background: #1a1a1a;
  border-radius: 8px;
  border: 1px solid var(--border-color);
}

/* 浮雕模式预设按钮 */
.mode-presets {
  margin-bottom: 16px;
}

.mode-label {
  display: block;
  font-size: 11px;
  color: var(--text-secondary);
  font-weight: 600;
  margin-bottom: 6px;
}

.mode-btns {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

.mode-btn {
  padding: 6px 0;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: rgba(0,0,0,0.2);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.18s, background 0.18s, color 0.18s;
}

.mode-btn:hover {
  border-color: var(--accent-purple);
  color: var(--text-primary);
}

.mode-btn.active {
  border-color: var(--accent-purple);
  background: rgba(139, 92, 246, 0.18);
  color: #c4b5fd;
}

/* ====== 积分消耗标注 ====== */
.credit-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 500;
  padding: 1px 6px;
  border-radius: 10px;
  background: rgba(250, 204, 21, 0.15);
  color: #facc15;
  vertical-align: middle;
  margin-left: 6px;
}
.credit-badge:empty { display: none; }

.credit-badge-inline {
  display: inline-block;
  font-size: 10px;
  font-weight: 500;
  padding: 0 5px;
  border-radius: 8px;
  background: rgba(250, 204, 21, 0.12);
  color: #facc15;
  vertical-align: middle;
  margin-left: 4px;
}
.credit-badge-inline:empty { display: none; }

/* ====== Tripo-style 图生3D 面板 ====== */
#panelImageTo3D {
  padding: 16px;
}

#panelImageTo3D .panel-title {
  margin-bottom: 18px;
  font-size: 15px;
}

#panelImageTo3D .image-upload-zone {
  min-height: 164px;
  margin: 0 0 18px;
  padding: 24px 14px 18px;
  border-color: rgba(148, 163, 184, 0.34);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.015);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.025);
}

#panelImageTo3D .image-upload-zone:hover {
  border-color: rgba(250, 204, 21, 0.72);
  background: rgba(250, 204, 21, 0.04);
}

#panelImageTo3D .image-upload-zone svg {
  width: 34px;
  height: 34px;
  color: rgba(229, 231, 235, 0.72);
}

#panelImageTo3D .image-upload-zone p {
  margin: 12px 0 16px;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.65;
}

#panelImageTo3D .image-upload-zone small {
  font-size: 12px;
  font-weight: 500;
}

#panelImageTo3D .upload-btn {
  min-width: 112px;
  min-height: 34px;
  border-color: rgba(250, 204, 21, 0.9);
  border-radius: 999px;
  background: transparent;
  color: var(--accent-yellow);
}

#panelImageTo3D .upload-btn:hover,
#panelImageTo3D .upload-btn:focus-visible,
#panelImageTo3D .upload-btn:active {
  background: var(--accent-yellow);
  color: #111;
}

#panelImageTo3D .image-upload-zone:hover {
  border-color: rgba(250, 204, 21, 0.72);
  background: rgba(250, 204, 21, 0.04);
}

#panelImageTo3D .image-upload-zone:hover .upload-btn:not(:hover):not(:focus-visible):not(:active) {
  background: transparent;
  color: var(--accent-yellow);
}

.image-mode-select {
  margin: 0 0 14px;
}

.image-mode-select .param-label {
  margin-bottom: 8px;
  color: rgba(226, 232, 240, 0.66);
}

#panelImageTo3D .mode-btns {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

#panelImageTo3D .mode-btn {
  min-height: 54px;
  padding: 8px 6px;
  border-color: rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.025);
  color: rgba(255, 255, 255, 0.86);
  font-size: 12px;
  line-height: 1.35;
}

#panelImageTo3D .mode-btn:hover {
  border-color: rgba(250, 204, 21, 0.54);
  color: var(--accent-yellow);
}

#panelImageTo3D .mode-btn.active {
  border-color: rgba(250, 204, 21, 0.92);
  background: rgba(250, 204, 21, 0.12);
  color: var(--accent-yellow);
}

#panelImageTo3D .mode-credit-cost {
  display: inline-block;
  margin-top: 2px;
  color: rgba(255, 255, 255, 0.5);
  font-size: 10px;
  font-weight: 700;
}

#panelImageTo3D .image-preview-area {
  margin: 0 0 14px;
  cursor: pointer;
}

#panelImageTo3D .image-preview-canvas {
  max-height: 330px;
  object-fit: contain;
  border-color: rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.025);
}

#panelImageTo3D #image3DConfirm,
#panelImageTo3D #image3DStatus {
  margin: 0 0 12px !important;
}

#panelImageTo3D #btnGenerateFromImage,
#panelImageTo3D #btnDownloadImage3D {
  margin-bottom: 10px !important;
}

/* 图生3D 生成模式：Tripo-style 展开选择器 */
#panelImageTo3D .image-mode-select {
  margin: 0 0 14px;
}

#panelImageTo3D .image-mode-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 0 0 8px;
  color: rgba(226, 232, 240, 0.76);
  font-size: 13px;
}

#panelImageTo3D .image-mode-header > span {
  font-weight: 700;
}

#panelImageTo3D .image-mode-more {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 0;
  background: transparent;
  color: var(--accent-purple);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

#panelImageTo3D .image-mode-options {
  overflow: hidden;
  margin: 0 0 8px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.02);
}

#panelImageTo3D .image-mode-options[hidden] {
  display: none;
}

#panelImageTo3D .image-mode-option,
#panelImageTo3D .image-mode-selected {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 58px;
  padding: 10px 14px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.9);
  text-align: left;
  cursor: pointer;
}

#panelImageTo3D .image-mode-option + .image-mode-option {
  border-top: 1px solid rgba(255, 255, 255, 0.045);
}

#panelImageTo3D .image-mode-option:hover {
  background: rgba(139, 92, 246, 0.1);
}

#panelImageTo3D .image-mode-option.active {
  background: rgba(139, 92, 246, 0.22);
  color: #fff;
}

#panelImageTo3D .image-mode-selected {
  min-height: 66px;
  margin: 0;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.025);
}

#panelImageTo3D .image-mode-selected:hover {
  border-color: rgba(139, 92, 246, 0.45);
  background: rgba(139, 92, 246, 0.08);
}

#panelImageTo3D .image-mode-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  border-radius: 9px;
  color: #fff;
  font-size: 18px;
  font-weight: 900;
}

#panelImageTo3D .image-mode-icon-good {
  background: linear-gradient(135deg, #34d399, #7c3aed);
}

#panelImageTo3D .image-mode-icon-balance {
  background: radial-gradient(circle at 35% 35%, #f8fafc, #7c3aed 42%, #1d4ed8 100%);
}

#panelImageTo3D .image-mode-icon-fast {
  background: linear-gradient(135deg, #7c3aed, #4f46e5);
}

#panelImageTo3D .image-mode-copy {
  display: flex;
  flex: 1 1 auto;
  min-width: 0;
  flex-direction: column;
  gap: 2px;
}

#panelImageTo3D .image-mode-title {
  overflow: hidden;
  color: rgba(255, 255, 255, 0.94);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#panelImageTo3D .image-mode-desc {
  overflow: hidden;
  color: rgba(255, 255, 255, 0.44);
  font-size: 11px;
  font-weight: 600;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#panelImageTo3D .image-mode-option.active .image-mode-desc {
  color: var(--accent-yellow);
}

#panelImageTo3D .image-mode-selected-arrow {
  flex: 0 0 auto;
  color: rgba(255, 255, 255, 0.6);
  font-size: 15px;
}

#panelImageTo3D .mode-credit-cost {
  display: inline;
  margin: 0;
  color: inherit;
  font-size: inherit;
}

.export-btn.secondary .credit-badge-inline {
  background: rgba(0, 0, 0, 0.18);
  color: #1a1a1a;
}

.inline-action.accent .credit-badge-inline {
  background: rgba(250, 204, 21, 0.18);
}

/* ====== 多视图上传：Tripo-style ====== */
.image-source-tabs,
.image-input-mode {
  display: flex;
  gap: 4px;
  margin: 0 0 10px;
  padding: 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.045);
}

.image-source-tab,
.image-input-mode-btn {
  flex: 1;
  min-height: 34px;
  padding: 6px 14px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: rgba(255, 255, 255, 0.46);
  font-size: 13px;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.image-source-tab:hover,
.image-input-mode-btn:hover {
  color: rgba(255, 255, 255, 0.82);
}

.image-source-tab.active,
.image-input-mode-btn.active {
  background: #fff;
  color: #111318;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.18);
}

.image-input-card.multiview,
.multiview-upload {
  margin: 0 0 18px;
}

.multiview-card {
  overflow: hidden;
  min-height: 242px;
  border: 1px solid rgba(107, 79, 255, 0.75);
  border-radius: 12px;
  background:
    linear-gradient(45deg, rgba(255, 255, 255, 0.035) 25%, transparent 25% 75%, rgba(255, 255, 255, 0.035) 75%),
    linear-gradient(45deg, rgba(255, 255, 255, 0.035) 25%, transparent 25% 75%, rgba(255, 255, 255, 0.035) 75%),
    #17171b;
  background-position: 0 0, 8px 8px, 0 0;
  background-size: 16px 16px, 16px 16px, auto;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.035), 0 0 0 1px rgba(107, 79, 255, 0.1);
}

.multiview-card:hover {
  border-color: rgba(139, 92, 246, 0.96);
}

.multiview-slot-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  min-height: 80px;
  border-top: 1px solid rgba(107, 79, 255, 0.38);
}

.multiview-slot,
.mv-slot {
  position: relative;
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.72);
  overflow: hidden;
  cursor: pointer;
  isolation: isolate;
  transition: background 0.18s ease, box-shadow 0.18s ease;
}

.multiview-slot + .multiview-slot {
  border-left: 1px solid rgba(107, 79, 255, 0.38);
}

.multiview-slot-main,
.mv-slot-front {
  width: 100%;
  min-height: 160px;
}

.multiview-slot:hover,
.mv-slot.drag-over {
  background: rgba(107, 79, 255, 0.16);
  box-shadow: inset 0 0 0 1px rgba(167, 139, 250, 0.56);
}

.mv-slot.missing {
  box-shadow: inset 0 0 0 1px rgba(239, 68, 68, 0.74);
}

.mv-slot-label {
  position: relative;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1.5px solid rgba(200, 175, 255, 0.5);
  background: rgba(107, 79, 255, 0.15);
  color: rgba(255, 255, 255, 0.92);
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  text-shadow: none;
  flex-shrink: 0;
  letter-spacing: -0.3px;
}

.mv-slot-front .mv-slot-label {
  width: 46px;
  height: 46px;
  font-size: 14px;
  border-color: rgba(167, 139, 250, 0.65);
  background: rgba(107, 79, 255, 0.22);
}

.mv-slot-icon {
  display: none;
}

.mv-slot-hint {
  max-width: 86%;
  color: rgba(255, 255, 255, 0.28);
  font-size: 10px;
  font-weight: 500;
  line-height: 1.45;
  text-align: center;
}

.multiview-slot-main .mv-slot-hint {
  max-width: 76%;
}

.mv-slot-img {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #17171b;
}

.mv-slot.filled .mv-slot-icon,
.mv-slot.filled .mv-slot-hint {
  display: none;
}

.mv-slot.filled .mv-slot-label {
  position: absolute;
  top: 7px;
  left: 7px;
  width: 26px;
  height: 26px;
  font-size: 11px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.55);
  border-color: rgba(255, 255, 255, 0.38);
  color: rgba(255, 255, 255, 0.95);
}

.mv-slot-clear {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 4;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.62);
  color: #fff;
  font-size: 14px;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
}

.mv-slot-clear:hover {
  background: rgba(239, 68, 68, 0.82);
}

.multiview-cost-note {
  margin: 10px 0 0;
  color: rgba(255, 255, 255, 0.4);
  font-size: 11px;
  font-weight: 500;
  text-align: center;
  line-height: 1.5;
}

.multiview-cost-value {
  color: var(--accent-yellow);
  font-weight: 800;
}

.inline-action.accent:hover .credit-badge-inline {
  background: rgba(0, 0, 0, 0.2);
  color: #1a1a1a;
}

/* ====== 项目保存/列表 ====== */
.save-project-btn {
  margin-left: 10px;
  padding: 4px 12px;
  font-size: 12px;
  border-radius: 6px;
  border: 1px solid rgba(139,92,246,0.5);
  background: rgba(139,92,246,0.15);
  color: #c4b5fd;
  cursor: pointer;
  white-space: nowrap;
  display: inline-block;
  line-height: 1.4;
  transition: background 0.15s;
  pointer-events: auto;
}
.save-project-btn:hover { background: rgba(139,92,246,0.3); }
.save-project-btn:active { background: rgba(139,92,246,0.4); }

.dropdown-section {
  padding: 8px 0;
  border-top: 1px solid rgba(255,255,255,0.06);
  margin-top: 4px;
}
.dropdown-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 16px 8px;
  font-size: 11px;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.dropdown-section-count {
  font-size: 10px;
  background: rgba(139,92,246,0.2);
  padding: 1px 6px;
  border-radius: 8px;
  color: #c4b5fd;
}
.project-list-dropdown {
  max-height: 180px;
  overflow-y: auto;
}
.project-list-empty {
  padding: 12px 16px;
  font-size: 12px;
  color: #64748b;
  text-align: center;
}
.project-item-dropdown {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 16px;
  cursor: pointer;
  transition: background 0.15s;
}
.project-item-dropdown:hover { background: rgba(255,255,255,0.04); }
.project-item-dropdown .pj-name {
  font-size: 13px;
  color: #e2e8f0;
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.project-item-dropdown .pj-date {
  font-size: 10px;
  color: #64748b;
}
.project-item-dropdown .pj-delete {
  font-size: 14px;
  color: #ef4444;
  cursor: pointer;
  padding: 2px 6px;
  visibility: hidden;
}
.project-item-dropdown:hover .pj-delete { visibility: visible; }
.project-item-dropdown .pj-delete:hover { color: #f87171; }

/* ====== 项目卡片网格 ====== */
.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
}
.project-card {
  background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.02));
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 14px;
  overflow: hidden;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}
.project-card:hover {
  transform: translateY(-1px);
  border-color: rgba(139,92,246,0.3);
  box-shadow: 0 14px 26px rgba(0,0,0,0.18);
}
.project-card-thumb {
  height: 110px;
  background: rgba(0,0,0,0.3);
  cursor: pointer;
  overflow: hidden;
}
.project-card-noimg {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  font-size: 24px;
  color: rgba(139,92,246,0.5);
}
.project-card-body { padding: 10px 10px 12px; }
.project-card-name {
  font-size: 13px;
  line-height: 1.45;
  font-weight: 700;
  color: #e2e8f0;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  min-height: 38px;
  margin-bottom: 6px;
}
.project-card-statusline {
  min-height: 18px;
  margin-bottom: 6px;
}
.project-card-date {
  font-size: 10px;
  line-height: 1.5;
  color: #64748b;
  margin-bottom: 8px;
}
.project-expiry {
  font-weight: 600;
}
.project-expiry { color: #94a3b8; }
.project-card-warning .project-expiry { color: #f59e0b; }
.project-card-expired .project-expiry { color: #ef4444; }
.project-card-warning { border-color: rgba(245, 158, 11, 0.3); }
.project-card-expired { border-color: rgba(239, 68, 68, 0.3); opacity: 0.7; }
.project-card-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.project-item-btn {
  min-height: 30px;
  padding: 0 10px;
  font-size: 11px;
  font-weight: 700;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.05);
  color: #cbd5e1;
  cursor: pointer;
}
.project-item-btn:hover { background: rgba(139,92,246,0.2); border-color: rgba(139,92,246,0.3); }
.project-item-btn.danger { color: #f87171; }
.project-item-btn.danger:hover { background: rgba(239,68,68,0.15); border-color: rgba(239,68,68,0.3); }

.project-version-overlay {
  position: fixed;
  inset: 0;
  z-index: 10020;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(4, 5, 12, 0.74);
  backdrop-filter: blur(12px);
}
.project-version-overlay.visible { display: flex; }
.project-version-modal {
  width: min(560px, calc(100vw - 48px));
  max-height: min(760px, calc(100vh - 48px));
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(139, 92, 246, 0.42);
  border-radius: 14px;
  background: linear-gradient(180deg, #20202b 0%, #14141b 100%);
  color: #f8fafc;
  box-shadow: 0 30px 80px rgba(0,0,0,0.6), inset 0 1px 0 rgba(255,255,255,0.04);
  overflow: hidden;
  animation: projectVersionIn .16s ease both;
}
.project-version-modal--compact { width: min(460px, calc(100vw - 48px)); }
@keyframes projectVersionIn {
  from { opacity: 0; transform: translateY(10px) scale(.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.project-version-head {
  padding: 24px 26px 18px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.project-version-kicker {
  margin-bottom: 8px;
  color: #a5b4fc;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
}
.project-version-head h3 {
  margin: 0;
  font-size: 21px;
  line-height: 1.3;
  letter-spacing: 0;
}
.project-version-head p {
  margin: 8px 0 0;
  color: rgba(226,232,240,0.7);
  font-size: 13px;
  line-height: 1.7;
}
.project-version-body {
  padding: 22px 26px;
  overflow: auto;
}
.project-version-field {
  display: grid;
  gap: 8px;
  color: rgba(226,232,240,0.84);
  font-size: 13px;
  font-weight: 700;
}
.project-version-field input {
  height: 44px;
  box-sizing: border-box;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.13);
  background: rgba(0,0,0,0.28);
  color: #fff;
  padding: 0 13px;
  outline: none;
  font-size: 14px;
}
.project-version-field input:focus {
  border-color: rgba(139,92,246,0.88);
  box-shadow: 0 0 0 3px rgba(139,92,246,0.18);
}
.project-version-note {
  margin-top: 10px;
  color: rgba(226,232,240,0.56);
  font-size: 12px;
  line-height: 1.6;
}
.project-version-tip-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 14px;
}
.project-version-tip-grid span {
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px;
  background: rgba(255,255,255,0.04);
  color: rgba(226,232,240,0.68);
  padding: 9px 10px;
  font-size: 12px;
  line-height: 1.5;
}
.project-version-list {
  display: grid;
  gap: 10px;
}
.project-version-row {
  width: 100%;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  text-align: left;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px;
  background: rgba(255,255,255,0.04);
  color: inherit;
  padding: 12px;
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease;
}
.project-version-row:hover {
  border-color: rgba(139,92,246,0.45);
  background: rgba(139,92,246,0.10);
}
.project-version-row.selected {
  border-color: rgba(139,92,246,0.9);
  background: rgba(139,92,246,0.16);
  box-shadow: inset 0 0 0 1px rgba(139,92,246,0.28);
}
.project-version-index {
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: rgba(255,255,255,0.06);
  color: #c4b5fd;
  font-weight: 800;
  font-size: 13px;
}
.project-version-main {
  min-width: 0;
  display: grid;
  gap: 4px;
}
.project-version-main strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
  line-height: 1.3;
}
.project-version-main small {
  color: rgba(226,232,240,0.56);
  font-size: 12px;
  line-height: 1.4;
}
.project-version-tag {
  border-radius: 999px;
  background: rgba(251,191,36,0.13);
  color: #facc15;
  padding: 5px 8px;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}
.project-version-row.selected .project-version-tag {
  background: rgba(139,92,246,0.24);
  color: #ddd6fe;
}
.project-version-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 18px 26px 24px;
  border-top: 1px solid rgba(255,255,255,0.08);
}
.project-version-btn {
  min-width: 96px;
  height: 40px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.12);
  color: #fff;
  font-weight: 800;
  font-size: 13px;
  cursor: pointer;
}
.project-version-btn--ghost {
  background: rgba(255,255,255,0.05);
  color: rgba(226,232,240,0.84);
}
.project-version-btn--primary {
  background: linear-gradient(135deg, #8b5cf6, #6d5dfc);
  box-shadow: 0 12px 24px rgba(139,92,246,0.26);
}
.project-version-btn:hover { filter: brightness(1.06); }

@media (max-width: 640px) {
  .project-version-overlay { padding: 16px; }
  .project-version-modal,
  .project-version-modal--compact { width: 100%; }
  .project-version-head,
  .project-version-body,
  .project-version-actions { padding-left: 18px; padding-right: 18px; }
  .project-version-tip-grid { grid-template-columns: 1fr; }
  .project-version-row { grid-template-columns: 30px minmax(0, 1fr); }
  .project-version-tag { grid-column: 2; justify-self: start; }
}

/* ====== 账户状态 - 我的项目 ====== */
.stats-projects {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(255,255,255,0.06);
}
.stats-projects-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 6px 0;
  background: none;
  border: none;
  color: #94a3b8;
  font-size: 12px;
  cursor: pointer;
  text-align: left;
}
.stats-projects-toggle:hover { color: #c4b5fd; }
.stats-projects-count {
  font-size: 10px;
  background: rgba(139,92,246,0.2);
  padding: 1px 6px;
  border-radius: 8px;
  color: #c4b5fd;
}
.stats-projects-arrow {
  margin-left: auto;
  font-size: 16px;
  transition: transform 0.2s;
}
.stats-projects-arrow.open { transform: rotate(90deg); }
.stats-projects-hints {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}
.stats-projects-hints:empty {
  display: none;
}
.stats-projects-hint {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.68);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.03);
}
.stats-projects-hint--warn {
  background: linear-gradient(135deg, rgba(245,158,11,0.16), rgba(245,158,11,0.06));
  border-color: rgba(245,158,11,0.22);
  color: #fbbf24;
}
.stats-projects-hint--danger {
  background: linear-gradient(135deg, rgba(239,68,68,0.16), rgba(239,68,68,0.06));
  border-color: rgba(239,68,68,0.22);
  color: #f87171;
}
.stats-projects-hint--info {
  background: linear-gradient(135deg, rgba(59,130,246,0.14), rgba(59,130,246,0.05));
  border-color: rgba(59,130,246,0.2);
  color: #93c5fd;
}
.stats-projects-hint--success {
  background: linear-gradient(135deg, rgba(34,197,94,0.15), rgba(34,197,94,0.05));
  border-color: rgba(34,197,94,0.2);
  color: #4ade80;
}
.stats-projects-list {
  margin-top: 8px;
  max-height: 420px;
  overflow-y: auto;
  padding-right: 4px;
}
.stats-custom-orders-list {
  max-height: 360px;
  padding-right: 2px;
}
.stats-projects-list .project-grid {
  grid-template-columns: 1fr;
  gap: 14px;
}
.stats-projects-list .project-card {
  position: relative;
  isolation: isolate;
  border-radius: 18px;
  overflow: hidden;
  background:
    radial-gradient(circle at top right, rgba(139,92,246,0.16), transparent 34%),
    linear-gradient(180deg, rgba(255,255,255,0.055), rgba(255,255,255,0.02)),
    rgba(16, 16, 21, 0.96);
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: 0 16px 30px rgba(0,0,0,0.24);
}
.stats-projects-list .project-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(139,92,246,0.9), transparent);
  opacity: 0.95;
}
.stats-projects-list .project-card::after {
  content: "";
  position: absolute;
  inset: -42px -18px auto auto;
  width: 126px;
  height: 126px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(139,92,246,0.18), transparent 68%);
  pointer-events: none;
  z-index: -1;
}
.stats-projects-list .project-card.project-card-warning::after {
  background: radial-gradient(circle, rgba(245,158,11,0.18), transparent 68%);
}
.stats-projects-list .project-card.project-card-expired::after {
  background: radial-gradient(circle, rgba(239,68,68,0.18), transparent 68%);
}
.stats-projects-list .project-card-thumb {
  height: 156px;
  background:
    radial-gradient(circle at top right, rgba(139,92,246,0.18), transparent 42%),
    rgba(8, 10, 18, 0.92);
}
.stats-projects-list .project-card-thumb img {
  transition: transform 0.28s ease;
}
.stats-projects-list .project-card:hover .project-card-thumb img {
  transform: scale(1.04);
}
.stats-projects-list .project-card-body {
  padding: 14px 14px 15px;
}
.stats-projects-list .project-card-name {
  font-size: 15px;
  line-height: 1.45;
  min-height: 0;
  margin-bottom: 10px;
  font-weight: 800;
  color: #fff;
}
.stats-projects-list .project-card-statusline {
  min-height: 0;
  margin-bottom: 10px;
}
.stats-projects-list .project-card-statusline:empty {
  display: none;
}
.stats-projects-list .project-card-meta {
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
}
.stats-projects-list .project-card-meta-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 36px;
  padding: 0 12px;
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.03));
  border: 1px solid rgba(255,255,255,0.06);
}
.stats-projects-list .project-card-meta-item--expiry {
  background: linear-gradient(135deg, rgba(139,92,246,0.14), rgba(139,92,246,0.05));
  border-color: rgba(139,92,246,0.18);
}
.stats-projects-list .project-card.project-card-warning .project-card-meta-item--expiry {
  background: linear-gradient(135deg, rgba(245,158,11,0.15), rgba(245,158,11,0.05));
  border-color: rgba(245,158,11,0.22);
}
.stats-projects-list .project-card.project-card-expired .project-card-meta-item--expiry {
  background: linear-gradient(135deg, rgba(239,68,68,0.15), rgba(239,68,68,0.05));
  border-color: rgba(239,68,68,0.22);
}
.stats-projects-list .project-card-meta-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: rgba(255,255,255,0.48);
  white-space: nowrap;
}
.stats-projects-list .project-card-meta-value {
  font-size: 11px;
  font-weight: 700;
  color: rgba(255,255,255,0.82);
  text-align: right;
}
.stats-projects-list .project-card-meta-value.project-expiry {
  color: #c4b5fd;
}
.stats-projects-list .project-item-btn {
  min-height: 36px;
  padding: 0 10px;
  font-size: 12px;
  border-radius: 10px;
  background: rgba(255,255,255,0.06);
  border-color: rgba(255,255,255,0.12);
  color: #fff;
}
.stats-projects-list .gen-status-badge {
  margin-left: 0;
}
.stats-projects-list .project-card-actions {
  gap: 10px;
  padding-top: 10px;
  border-top: 1px dashed rgba(255,255,255,0.08);
}
.stats-projects-list .project-card-warning .project-expiry { color: #fbbf24; }
.stats-projects-list .project-card-expired .project-expiry { color: #f87171; }
.stats-projects-list .project-empty {
  position: relative;
  overflow: hidden;
  padding: 20px 18px;
  border-radius: 20px;
  background:
    radial-gradient(circle at top right, rgba(139,92,246,0.15), transparent 38%),
    linear-gradient(180deg, rgba(255,255,255,0.055), rgba(255,255,255,0.02)),
    rgba(16, 16, 21, 0.96);
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: 0 16px 30px rgba(0,0,0,0.22);
  text-align: left;
}
.stats-projects-list .project-empty::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(139,92,246,0.88), transparent);
}
.stats-projects-list .project-empty-badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 11px;
  border-radius: 999px;
  background: rgba(255,255,255,0.07);
  color: rgba(255,255,255,0.76);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  margin-bottom: 12px;
}
.stats-projects-list .project-empty-title {
  font-size: 18px;
  line-height: 1.4;
  font-weight: 800;
  color: #fff;
  margin-bottom: 8px;
}
.stats-projects-list .project-empty-desc {
  font-size: 12px;
  line-height: 1.72;
  color: rgba(255,255,255,0.66);
  margin-bottom: 14px;
}
.stats-projects-list .project-empty-btn {
  min-width: 132px;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 10px;
  border: 1px solid rgba(250,204,21,0.28);
  background: linear-gradient(135deg, rgba(250,204,21,0.22), rgba(250,204,21,0.1));
  color: #facc15;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.03);
}
.stats-projects-list .project-empty-btn:hover {
  background: linear-gradient(135deg, rgba(250,204,21,0.3), rgba(250,204,21,0.14));
  border-color: rgba(250,204,21,0.42);
}

/* ====== 可编辑项目名 ====== */
.project-name:focus {
  box-shadow: 0 0 0 2px var(--accent-purple);
  outline: none;
}

/* ====== 图生3D 状态标签 ====== */
.gen-status-badge {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 8px;
  font-size: 10px;
  font-weight: 700;
  vertical-align: middle;
  margin-left: 4px;
}
.gen-status-badge.gen-pending {
  background: rgba(250, 204, 21, 0.15);
  color: #facc15;
}
.gen-status-badge.gen-done {
  background: rgba(46, 213, 115, 0.15);
  color: #2ed573;
}
.gen-status-badge.gen-failed {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
}
.gen-status-error {
  display: block;
  margin-top: 4px;
  overflow: hidden;
  color: #fca5a5;
  font-size: 11px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ====== 移动端导出 Action Sheet ====== */
.mobile-export-sheet {
  display: none;
}
.mobile-export-sheet-backdrop {
  display: none;
}
.mobile-export-sheet-panel {
  display: none;
}

@media (max-width: 860px) {
  /* 顶部栏简化 */
  .top-account { display: none !important; }
  .nav-links { display: none !important; }
  .top-bar { padding: 0 10px; }
  .brand { font-size: 15px; min-width: auto; gap: 6px; }

  /* ---- 移动端"我的"按钮 ---- */
  #mobileAccountBtn {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 34px; height: 34px;
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 50%;
    background: rgba(255,255,255,0.06);
    color: #fff;
    font-size: 16px;
    cursor: pointer;
    flex-shrink: 0;
  }
  #mobileAccountBtn:hover { background: rgba(255,255,255,0.12); }

  /* ---- 公告条压缩 ---- */
  .site-announcement { height: 28px; font-size: 11px; padding: 0 32px 0 8px; }

  /* ---- 账户抽屉 (860px 全屏滑入) ---- */
  .account-drawer-backdrop {
    display: none;
    position: fixed; inset: 0; z-index: 100;
    background: rgba(0,0,0,0.48);
    opacity: 0; transition: opacity 0.22s ease;
  }
  .account-drawer-backdrop.open {
    display: block; opacity: 1;
  }
  .account-drawer {
    display: flex;
    flex-direction: column;
    position: fixed; top: 0; right: 0; bottom: 0;
    z-index: 101;
    width: min(100vw, 380px);
    max-width: 100vw;
    background: #1a1a1e;
    border-left: 1px solid rgba(255,255,255,0.08);
    box-shadow: -8px 0 30px rgba(0,0,0,0.5);
    transform: translateX(100%);
    transition: transform 0.24s ease;
  }
  .account-drawer.open { transform: translateX(0); }
  .account-drawer-header {
    display: flex; align-items: center; justify-content: space-between;
    min-height: 56px; padding: 0 18px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    font-size: 18px; font-weight: 800;
    flex-shrink: 0;
  }
  .account-drawer-close {
    display: inline-flex; align-items: center; justify-content: center;
    width: 32px; height: 32px; border-radius: 50%;
    border: none; background: rgba(255,255,255,0.08);
    color: #fff; font-size: 20px; cursor: pointer;
  }
  .account-drawer-body {
    flex: 1; overflow-y: auto; padding: 16px;
    -webkit-overflow-scrolling: touch;
  }

  .mobile-stats-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 88;
    background: rgba(0,0,0,0.48);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.22s ease;
  }
  .mobile-stats-backdrop.open {
    opacity: 1;
    pointer-events: auto;
  }
  .stats-panel {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    z-index: 89;
    display: flex;
    width: min(100vw, 380px);
    max-width: 100vw;
    border-left: 1px solid rgba(255,255,255,0.08);
    background: #1a1a1e;
    box-shadow: -8px 0 30px rgba(0,0,0,0.5);
    transform: translateX(100%);
    transition: transform 0.24s ease;
  }
  .stats-panel.mobile-open {
    transform: translateX(0);
  }
  .stats-panel-mobile-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 56px;
    padding: 0 18px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    font-size: 18px;
    font-weight: 800;
    flex-shrink: 0;
  }
  .stats-panel-mobile-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 50%;
    background: rgba(255,255,255,0.08);
    color: #fff;
    font-size: 20px;
    cursor: pointer;
  }
  .stats-panel .stats-scroll {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  /* ---- 底部导出按钮 (隐藏 desktop，显示 mobile) ---- */
  .bottom-toolbar .export-btn { display: none; }
  .bottom-toolbar {
    left: 10px; right: 10px; bottom: 78px;
    padding: 6px 10px; gap: 6px;
    justify-content: space-between;
    flex-wrap: nowrap;
  }
  .bottom-toolbar #btnReset { flex: 0 1 auto; }
  .bottom-toolbar #btnPrintExport { flex: 0 0 auto; }
  #btnExportSolidModel { display: inline-flex !important; flex: 1; }
  #btnMoreExport { display: inline-flex !important; align-items: center; justify-content: center; flex: 0 0 auto; min-width: 84px; min-height: 38px; padding: 0 12px; border: 1px solid rgba(255,255,255,0.12); border-radius: 10px; background: rgba(255,255,255,0.05); color: #fff; font-size: 13px; font-weight: 700; white-space: nowrap; cursor: pointer; }
  #btnToolMore { display: flex !important; }
  .print-export-menu {
    left: 0;
    bottom: calc(100% + 10px);
    min-width: 224px;
    transform: translateX(0) translateY(8px) scale(0.98);
  }
  .print-export-menu.open {
    transform: translateX(0) translateY(0) scale(1);
  }
  .print-export-menu-item {
    min-height: 40px;
    font-size: 13px;
  }

  /* ---- 导出 Action Sheet ---- */
  .mobile-export-sheet {
    display: none;
    position: fixed; inset: 0; z-index: 5000;
    align-items: flex-end; justify-content: center;
  }
  .mobile-export-sheet.open { display: flex; }
  .mobile-export-sheet-backdrop {
    display: block;
    position: absolute; inset: 0;
    background: rgba(0,0,0,0.55);
    cursor: pointer;
  }
  .mobile-export-sheet-panel {
    display: flex;
    position: relative; z-index: 1;
    width: 100%; max-width: 480px;
    flex-direction: column;
    gap: 6px;
    padding: 12px 14px calc(12px + env(safe-area-inset-bottom));
    border-radius: 16px 16px 0 0;
    background: #1d1d26;
    border: 1px solid rgba(255,255,255,0.08);
    border-bottom: none;
    box-shadow: 0 -8px 30px rgba(0,0,0,0.5);
    transform: translateY(100%);
    transition: transform 0.22s ease;
  }
  .mobile-export-sheet.open .mobile-export-sheet-panel { transform: translateY(0); }
  .mobile-export-sheet-grip {
    width: 36px; height: 4px; border-radius: 2px;
    background: rgba(255,255,255,0.2);
    margin: 0 auto 8px;
  }
  .mobile-export-sheet-title {
    text-align: center; font-size: 14px; font-weight: 700;
    color: #fff; padding: 4px 0 10px;
  }
  .mobile-export-sheet-btn {
    display: flex; align-items: center; gap: 10px;
    width: 100%; padding: 14px 16px;
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 10px;
    background: rgba(255,255,255,0.03);
    color: #e2e8f0; font-size: 14px; font-weight: 600;
    text-align: left; cursor: pointer;
  }
  .mobile-export-sheet-btn:hover { background: rgba(255,255,255,0.08); }
  .mobile-export-sheet-cancel {
    width: 100%; padding: 14px;
    border: none; border-radius: 10px;
    background: rgba(255,255,255,0.06);
    color: rgba(255,255,255,0.5); font-size: 14px;
    font-weight: 600; cursor: pointer; margin-top: 4px;
  }

  /* ---- 视口控件位置调整 ---- */
  .gizmo-toolbar { right: 8px; bottom: 170px; top: auto; gap: 4px; padding: 5px; }
  .background-export-widget {
    left: 8px;
    right: 8px;
    top: auto;
    bottom: 230px;
    width: auto;
    max-height: 34vh;
  }
  .viewport-status-card { left: 8px; top: 8px; font-size: 10px; padding: 6px 10px; }
  .view-axis-widget { right: 10px; top: 10px; transform: scale(0.7); transform-origin: top right; }
}

/* ---- 侧栏定制需求卡片 ---- */
.fc-order-list {
  display: grid;
  gap: 10px;
  font-size: 12px;
  color: rgba(255,255,255,0.38);
}

.fc-order-empty {
  padding: 18px 14px;
  border: 1px dashed rgba(255,255,255,0.1);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0.01));
  color: rgba(255,255,255,0.34);
  text-align: center;
  line-height: 1.6;
}

.fc-order-empty span {
  display: block;
  margin-top: 4px;
  font-size: 11px;
  color: rgba(255,255,255,0.24);
}

.co-side-card {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background:
    radial-gradient(circle at top right, rgba(255,255,255,0.08), transparent 34%),
    linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.02)),
    rgba(16, 16, 21, 0.96);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 20px;
  padding: 16px 15px 14px;
  transition: transform .18s ease, border-color .18s ease, background .18s ease, box-shadow .18s ease;
  box-shadow: 0 14px 28px rgba(0,0,0,0.22);
}
.co-side-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--co-accent, rgba(250, 204, 21, 0.95)), transparent);
  opacity: 0.9;
}
.co-side-card::after {
  content: "";
  position: absolute;
  inset: -32px -12px auto auto;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--co-glow, rgba(250, 204, 21, 0.18)), transparent 68%);
  pointer-events: none;
  z-index: -1;
}
.co-side-card:hover,
.co-side-card:focus-visible {
  transform: translateY(-2px);
  background:
    radial-gradient(circle at top right, rgba(255,255,255,0.12), transparent 38%),
    linear-gradient(180deg, rgba(255,255,255,0.08), rgba(255,255,255,0.025)),
    rgba(20, 20, 28, 0.98);
  border-color: rgba(255,255,255,0.14);
  box-shadow: 0 18px 34px rgba(0,0,0,0.28);
  outline: none;
}
.co-side-card.co-side-card--fence {
  --co-glow: rgba(34, 197, 94, 0.16);
}
.co-side-card.co-side-card--mold {
  --co-glow: rgba(139, 92, 246, 0.18);
}
.co-side-card.co-side-card--completed {
  background:
    radial-gradient(circle at top right, rgba(34,197,94,0.12), transparent 36%),
    linear-gradient(180deg, rgba(255,255,255,0.055), rgba(255,255,255,0.02)),
    rgba(14, 18, 17, 0.96);
}
.co-side-card.co-side-card--communicating {
  background:
    radial-gradient(circle at top right, rgba(139,92,246,0.14), transparent 38%),
    linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.02)),
    rgba(18, 16, 24, 0.96);
}
.co-side-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.co-side-type {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 28px;
  padding: 0 11px;
  border-radius: 999px;
  background: rgba(255,255,255,0.07);
  color: rgba(255,255,255,0.78);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.04);
  white-space: nowrap;
}
.co-side-status {
  font-size: 10px;
  font-weight: 700;
  min-height: 28px;
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  white-space: nowrap;
  border: 1px solid transparent;
  backdrop-filter: blur(8px);
  flex-shrink: 0;
}
.co-side-name {
  font-size: 17px;
  line-height: 1.4;
  font-weight: 800;
  color: #fff;
  margin-bottom: 9px;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}
.co-side-desc {
  font-size: 13px;
  line-height: 1.72;
  color: rgba(255,255,255,0.74);
  margin-bottom: 10px;
}
.co-side-body {
  position: relative;
}
.co-side-meta-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}
.co-side-chip {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  background: rgba(255,255,255,0.05);
  color: rgba(255,255,255,0.56);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  white-space: nowrap;
}
.co-side-comm {
  font-size: 12px;
  color: rgba(255,255,255,0.76);
  margin: 0 0 10px;
  line-height: 1.55;
  padding: 10px 12px;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.03));
  border: 1px solid rgba(255,255,255,0.06);
}
.co-side-quote {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
  color: rgba(255,255,255,0.82);
  margin: 0;
  padding: 10px 12px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(250,204,21,0.13), rgba(250,204,21,0.05));
  border: 1px solid rgba(250,204,21,0.18);
}
.co-side-quote b {
  color: #facc15;
  font-size: 14px;
}
.co-side-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px dashed rgba(255,255,255,0.08);
}
.co-side-time {
  font-size: 11px;
  color: rgba(255,255,255,0.34);
}
.co-side-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  flex-wrap: wrap;
}
.co-side-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.06);
  color: #fff;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  font-size: 11px;
  font-weight: 700;
  transition: transform .16s ease, border-color .16s ease, background .16s ease, color .16s ease;
}
.co-side-btn:hover,
.co-side-btn:focus-visible {
  transform: translateY(-1px);
  background: rgba(255,255,255,0.11);
  border-color: rgba(255,255,255,0.18);
  outline: none;
}
.co-side-confirm { border-color: rgba(34,197,94,0.4); background: rgba(34,197,94,0.1); color: #4ade80; }
.co-side-confirm:hover { background: rgba(34,197,94,0.2); }
.co-side-reject { border-color: rgba(239,68,68,0.4); background: rgba(239,68,68,0.08); color: #f87171; }
.co-side-reject:hover { background: rgba(239,68,68,0.15); }
.co-side-dl { border-color: rgba(59,130,246,0.4); background: rgba(59,130,246,0.1); color: #60a5fa; }
.co-side-dl:hover { background: rgba(59,130,246,0.16); }
.fc-del-btn {
  min-width: 82px;
  padding: 0 12px;
  border-color: rgba(239,68,68,0.32);
  background: rgba(239,68,68,0.08);
  color: #fca5a5;
}
.fc-del-btn:hover,
.fc-del-btn:focus-visible {
  color: #fca5a5;
  border-color: rgba(239,68,68,0.24);
  background: rgba(239,68,68,0.12);
}

.stats-custom-orders-list .fc-order-list {
  gap: 12px;
}

/* ---- 定制需求详情弹窗 ---- */
.fc-detail-overlay {
  display: none;
  z-index: 2000;
  padding: 20px;
}

.auth-modal.fc-detail-modal {
  width: min(1280px, calc(100vw - 360px));
  height: min(760px, calc(100vh - 120px));
  max-width: none;
  aspect-ratio: auto;
  max-height: none;
  padding: 0;
  overflow: hidden;
  display: grid;
  grid-template-rows: 72px minmax(0, 1fr);
  position: relative;
  background:
    radial-gradient(circle at top, rgba(139,92,246,0.12), transparent 40%),
    linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0)),
    #171722;
  border: 1px solid rgba(255,255,255,0.08);
}

.fc-detail-close {
  top: 16px;
  right: 16px;
  z-index: 5;
}

.fc-detail-statusbar {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 0 68px 0 24px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  background: rgba(0,0,0,0.12);
}

.fc-detail-status-main {
  min-width: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
}

.fc-detail-workspace {
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(300px, 34%) minmax(0, 1fr);
  gap: 12px;
  padding: 12px;
}

.fc-detail-info-pane,
.fc-detail-chat-pane {
  min-height: 0;
  overflow-y: auto;
  padding: 16px;
  border-radius: 14px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.26) rgba(255, 255, 255, 0.04);
}

.fc-detail-info-pane {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.fc-detail-chat-pane {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.fc-detail-thumb {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  min-height: 180px;
  aspect-ratio: 4 / 3;
  padding: 0;
  overflow: hidden;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.08);
  background:
    radial-gradient(circle at 50% 20%, rgba(250,204,21,0.1), transparent 34%),
    linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.01));
}

.fc-detail-thumb::after {
  content: "";
  position: absolute;
  inset: auto 18px 18px;
  height: 36px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(0,0,0,0.28), transparent 70%);
  filter: blur(12px);
  pointer-events: none;
}

.fc-detail-thumb img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
  box-shadow: none;
}

.fc-detail-thumb img,
.fc-detail-comm-img,
.fc-chat-image,
.fc-reply-preview img {
  cursor: zoom-in;
}

.fc-detail-thumb-empty {
  color: rgba(255,255,255,0.28);
  font-size: 13px;
}

.fc-detail-header {
  margin-bottom: 16px;
}

.fc-detail-eyebrow {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.05);
  color: rgba(255,255,255,0.56);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.fc-detail-title {
  min-width: 0;
  margin: 0;
  font-size: 18px;
  line-height: 1.25;
  font-weight: 800;
  letter-spacing: 0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.fc-detail-subline {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.fc-detail-meta {
  color: rgba(255,255,255,0.42);
  font-size: 12px;
}

.fc-detail-hint {
  margin: 0;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.04);
  color: rgba(255,255,255,0.74);
  font-size: 13px;
  line-height: 1.65;
}

.fc-detail-section,
.fc-detail-image-block {
  margin-bottom: 0;
  padding: 16px;
  border-radius: 18px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.06);
}

.fc-info-section {
  flex: 1 1 auto;
}

.fc-chat-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 4px 2px;
}

.fc-chat-panel-header .fc-detail-section-title {
  margin-bottom: 4px;
}

.fc-chat-panel-header p {
  margin: 0;
  color: rgba(255,255,255,0.4);
  font-size: 12px;
}

.fc-detail-section-title {
  margin-bottom: 12px;
  color: rgba(255,255,255,0.54);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.fc-detail-comm-img {
  display: block;
  width: 100%;
  max-height: 420px;
  object-fit: contain;
  border-radius: 14px;
  background: rgba(0,0,0,0.18);
}

.fc-conversation {
  background: rgba(255,255,255,0.035);
}

.fc-conversation-list {
  display: grid;
  gap: 14px;
}

.fc-chat-message {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 10px;
  max-width: 82%;
}

.fc-chat-message.is-user {
  justify-self: end;
  grid-template-columns: minmax(0, 1fr) 36px;
}

.fc-chat-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 900;
  color: #fff;
  background: linear-gradient(135deg, #64748b, #334155);
}

.fc-chat-message.is-designer .fc-chat-avatar {
  background: linear-gradient(135deg, #8b5cf6, #4f46e5);
}

.fc-chat-message.is-user .fc-chat-avatar {
  grid-column: 2;
  background: linear-gradient(135deg, #0ea5e9, #2563eb);
}

.fc-chat-bubble {
  min-width: 0;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.06);
}

.fc-chat-message.is-user .fc-chat-bubble {
  grid-column: 1;
  grid-row: 1;
  background: rgba(37,99,235,0.16);
  border-color: rgba(96,165,250,0.2);
}

.fc-chat-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
  color: rgba(255,255,255,0.48);
  font-size: 11px;
  font-weight: 800;
}

.fc-chat-role {
  color: rgba(255,255,255,0.72);
}

.fc-chat-text {
  margin: 0;
  color: rgba(255,255,255,0.88);
  font-size: 13px;
  line-height: 1.7;
  white-space: pre-wrap;
  word-break: break-word;
}

.fc-chat-image {
  display: block;
  width: min(320px, 100%);
  max-height: 220px;
  object-fit: contain;
  margin-top: 10px;
  border-radius: 12px;
  background: rgba(0,0,0,0.25);
}

.fc-image-viewer {
  position: fixed;
  inset: 0;
  z-index: 2600;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 28px;
  background: rgba(0,0,0,0.78);
  backdrop-filter: blur(10px);
}

.fc-image-viewer.open {
  display: flex;
}

.fc-image-viewer-stage {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: min(1180px, 94vw);
  height: min(820px, 88vh);
}

.fc-image-viewer-img {
  display: block;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 12px;
  background: rgba(0,0,0,0.28);
  box-shadow: 0 28px 90px rgba(0,0,0,0.58);
}

.fc-image-viewer-close {
  position: absolute;
  top: 18px;
  right: 18px;
  z-index: 1;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  color: #fff;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}

.fc-image-viewer-close:hover,
.fc-image-viewer-close:focus-visible {
  background: rgba(255,255,255,0.16);
  outline: none;
}

.fc-detail-reply {
  display: grid;
  gap: 12px;
}

.fc-reply-textarea {
  width: 100%;
  min-height: 104px;
  resize: vertical;
  box-sizing: border-box;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.09);
  background: rgba(0,0,0,0.18);
  color: rgba(255,255,255,0.88);
  font-size: 13px;
  line-height: 1.6;
  outline: none;
}

.fc-reply-textarea:focus {
  border-color: rgba(139,92,246,0.45);
  box-shadow: 0 0 0 3px rgba(139,92,246,0.16);
}

.fc-reply-preview {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  min-height: 116px;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(0,0,0,0.18);
}

.fc-reply-preview img {
  width: 180px;
  height: 100px;
  object-fit: contain;
  border-radius: 10px;
  background: rgba(0,0,0,0.32);
}

.fc-reply-preview-meta {
  min-width: 0;
  color: rgba(255,255,255,0.66);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.5;
  word-break: break-word;
}

.fc-reply-upload-row {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.fc-reply-file {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  flex: 1 1 140px;
  padding: 0 16px;
  border-radius: 14px;
  border: 1px dashed rgba(255,255,255,0.18);
  background: rgba(255,255,255,0.04);
  color: rgba(255,255,255,0.72);
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.fc-reply-file input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.fc-reply-msg {
  color: rgba(255,255,255,0.54);
  font-size: 12px;
  line-height: 1.6;
}

.fc-detail-info {
  display: grid;
  gap: 10px;
}

.fc-detail-row {
  display: grid;
  grid-template-columns: minmax(90px, 120px) minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  padding: 11px 0;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.fc-detail-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.fc-detail-label {
  color: rgba(255,255,255,0.42);
  font-size: 12px;
  line-height: 1.5;
}

.fc-detail-value {
  color: rgba(255,255,255,0.88);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.6;
  text-align: right;
  word-break: break-word;
}

.fc-detail-row.is-note .fc-detail-value {
  text-align: left;
  white-space: pre-wrap;
}

.fc-detail-context-actions,
.fc-detail-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.fc-detail-context-actions {
  margin: 4px 0 16px;
}

.fc-detail-actions {
  padding-top: 16px;
  border-top: 1px solid rgba(255,255,255,0.08);
}

.fc-detail-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  flex: 1 1 180px;
  padding: 0 18px;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 14px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 800;
  color: #fff;
  background: rgba(255,255,255,0.06);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease, background .18s ease;
}

.fc-detail-action:hover,
.fc-detail-action:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(255,255,255,0.16);
  box-shadow: 0 14px 24px rgba(0,0,0,0.18);
  outline: none;
}

.fc-detail-action-primary {
  background: linear-gradient(135deg, #37d67a, #15a34a);
  border-color: rgba(55,214,122,0.35);
}

.fc-detail-action-secondary {
  background: rgba(59,130,246,0.12);
  border-color: rgba(59,130,246,0.28);
  color: #93c5fd;
}

.fc-detail-action-success {
  background: rgba(34,197,94,0.14);
  border-color: rgba(34,197,94,0.3);
  color: #86efac;
}

.fc-detail-action-danger {
  background: linear-gradient(135deg, #ef4444, #c81e1e);
  border-color: rgba(239,68,68,0.32);
}

@media (max-width: 860px) {
  .fc-detail-overlay {
    padding: 12px;
    align-items: flex-end;
  }

  .auth-modal.fc-detail-modal {
    width: 100%;
    height: min(92vh, 920px);
    max-height: min(92vh, 920px);
    max-width: none;
    aspect-ratio: auto;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    border-radius: 22px 22px 0 0;
  }

  .fc-detail-statusbar {
    align-items: flex-start;
    padding: 14px 58px 14px 16px;
  }

  .fc-detail-status-main {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .fc-detail-workspace {
    grid-template-columns: 1fr;
    overflow-y: auto;
  }

  .fc-detail-info-pane,
  .fc-detail-chat-pane {
    overflow: visible;
  }

  .fc-detail-thumb {
    min-height: 188px;
    padding: 0;
  }

  .fc-detail-title {
    font-size: 20px;
    white-space: normal;
  }

  .fc-detail-row {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .fc-detail-value {
    text-align: left;
  }

  .fc-chat-message,
  .fc-chat-message.is-user {
    max-width: 100%;
  }

  .fc-reply-preview {
    grid-template-columns: 1fr;
  }

  .fc-reply-preview img {
    width: 100%;
  }

  .fc-image-viewer {
    padding: 14px;
  }

  .fc-image-viewer-stage {
    width: 100%;
    height: calc(100dvh - 28px);
  }

  .fc-image-viewer-close {
    top: 12px;
    right: 12px;
    width: 40px;
    height: 40px;
    font-size: 24px;
  }
}

/* ====== 教程视频中心 ====== */
.tutorial-btn {
  border: 1px solid rgba(250, 204, 21, 0.72);
  background: linear-gradient(135deg, #facc15, #eab308);
  color: #17130a;
}
.tutorial-btn:hover,
.tutorial-btn:focus-visible {
  background: linear-gradient(135deg, #fde047, #facc15);
  border-color: rgba(253, 224, 71, 0.9);
  outline: none;
  transform: translateY(-1px);
}
.tutorial-overlay { position: fixed; inset: 0; z-index: 9999; display: none; align-items: center; justify-content: center; padding: 24px; }
.tutorial-overlay.visible { display: flex; }
.tutorial-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.78); backdrop-filter: blur(4px); }
.tutorial-dialog {
  position: relative;
  width: min(1180px, 94vw);
  max-height: min(780px, 88vh);
  background: #111116;
  border: 1px solid rgba(255,255,255,0.09);
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 24px 80px rgba(0,0,0,.55);
}
.tutorial-dialog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 58px;
  padding: 0 18px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  background: #181820;
}
.tutorial-dialog-title { color: #fff; font-size: 16px; font-weight: 900; }
.tutorial-dialog-subtitle { color: #8f8f9b; font-size: 12px; margin-top: 2px; }
.tutorial-close { width: 34px; height: 34px; border-radius: 50%; background: rgba(255,255,255,0.06); border: none; color: #aaa; font-size: 24px; cursor: pointer; line-height: 1; }
.tutorial-close:hover { color: #fff; background: rgba(255,255,255,0.12); }
.tutorial-layout { display: flex; flex: 1; min-height: 0; overflow: hidden; }
.tutorial-player-section { flex: 1; display: flex; flex-direction: column; min-width: 0; padding: 18px; overflow-y: auto; }
.tutorial-player-wrapper { position: relative; width: 100%; aspect-ratio: 16/9; background: #050505; border-radius: 10px; overflow: hidden; border: 1px solid rgba(255,255,255,0.08); }
.tutorial-player-placeholder { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; color: #8a8a92; gap: 8px; text-align: center; padding: 24px; }
.tutorial-empty-icon { width: 52px; height: 52px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: rgba(250,204,21,0.12); color: #facc15; font-size: 22px; font-weight: 900; }
.tutorial-spinner { border: 2px solid rgba(250,204,21,0.22); border-top-color: #facc15; animation: tutorialSpin .85s linear infinite; background: transparent; }
@keyframes tutorialSpin { to { transform: rotate(360deg); } }
.tutorial-empty-title { color: #f5f5f5; font-size: 16px; font-weight: 900; }
.tutorial-empty-desc { color: #898995; font-size: 13px; }
.tutorial-video { width: 100%; height: 100%; object-fit: contain; background: #000; }
.tutorial-iframe { width: 100%; height: 100%; border: none; background: #000; }
.tutorial-player-info { padding: 14px 2px 0; }
.tutorial-title { font-size: 18px; color: #fff; margin: 0 0 8px; font-weight: 900; }
.tutorial-meta { font-size: 12px; color: #8c8c96; margin-bottom: 8px; display: flex; gap: 12px; flex-wrap: wrap; }
.tutorial-desc { font-size: 13px; color: #b6b6c0; line-height: 1.6; margin: 0; }
.tutorial-list-section { width: 340px; border-left: 1px solid rgba(255,255,255,0.08); display: flex; flex-direction: column; overflow: hidden; background: #15151d; }
.tutorial-list-header { padding: 18px 14px 10px; font-size: 14px; color: #fff; font-weight: 900; }
.tutorial-list { flex: 1; overflow-y: auto; padding: 0 10px 12px; }
.tutorial-list-state { padding: 28px 12px; color: #999; text-align: center; font-size: 13px; }
.tutorial-item { width: 100%; display: flex; gap: 10px; padding: 9px; border: 1px solid transparent; border-radius: 8px; cursor: pointer; margin-bottom: 4px; background: transparent; text-align: left; }
.tutorial-item:hover { background: rgba(255,255,255,0.06); }
.tutorial-item-active { background: rgba(250,204,21,0.09); border-color: rgba(250,204,21,0.22); }
.tutorial-item-thumb { width: 112px; aspect-ratio: 16/9; background: #0b0b0f; border-radius: 6px; overflow: hidden; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; color: #facc15; }
.tutorial-item-thumb img { width: 100%; height: 100%; object-fit: cover; }
.tutorial-item-thumb.is-empty { background: linear-gradient(135deg, rgba(250,204,21,0.12), rgba(139,92,246,0.08)); }
.tutorial-thumb-play { font-size: 18px; font-weight: 900; }
.tutorial-item-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.tutorial-item-title { font-size: 13px; color: #e8e8ec; line-height: 1.35; font-weight: 800; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tutorial-item-meta { font-size: 11px; color: #8b8b96; }
@media (max-width: 768px) {
  .tutorial-overlay { padding: 0; }
  .tutorial-layout { flex-direction: column; }
  .tutorial-list-section { width: 100%; border-left: none; border-top: 1px solid rgba(255,255,255,0.08); max-height: 40vh; }
  .tutorial-dialog { width: 100vw; max-height: 100vh; height: 100vh; border-radius: 0; }
}

/* ====== 邀请有礼按钮 ====== */
.referral-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 34px;
  padding: 0 16px;
  border: 1.5px solid transparent;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(250, 204, 21, 0.15) 0%, rgba(245, 158, 11, 0.1) 100%);
  color: var(--accent-yellow);
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  transition: all .2s ease;
  box-shadow: 0 2px 8px rgba(250, 204, 21, 0.15);
  letter-spacing: 0.02em;
  position: relative;
  overflow: hidden;
}

.referral-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  transition: left .5s ease;
}

.referral-btn:hover::before {
  left: 100%;
}

.referral-btn:hover,
.referral-btn:focus-visible {
  border-color: rgba(250, 204, 21, 0.5);
  background: linear-gradient(135deg, rgba(250, 204, 21, 0.25) 0%, rgba(245, 158, 11, 0.15) 100%);
  outline: none;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(250, 204, 21, 0.25);
}

/* ====== 邀请有礼弹窗 ====== */
.referral-overlay {
  backdrop-filter: blur(4px);
}

.referral-overlay .referral-panel {
  width: 520px;
  max-width: 94vw;
  padding: 40px 36px;
  background: linear-gradient(135deg, rgba(32, 32, 34, 0.95) 0%, rgba(20, 20, 22, 0.98) 100%);
  border: 1px solid rgba(250, 204, 21, 0.15);
  border-radius: 20px;
  box-shadow:
    0 25px 50px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.referral-panel .modal-header {
  margin-bottom: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.referral-panel .modal-header h2 {
  margin: 0;
  font-size: 22px;
  font-weight: 800;
  background: linear-gradient(135deg, #ffd700 0%, #facc15 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: 0.03em;
}

.referral-modal-close {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: var(--text-secondary);
  font-size: 18px;
  cursor: pointer;
  transition: all .2s ease;
}

.referral-modal-close:hover {
  background: rgba(250, 204, 21, 0.1);
  border-color: rgba(250, 204, 21, 0.3);
  color: var(--accent-yellow);
}

.referral-panel .modal-body {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

/* 邀请链接区域 */
.referral-link-section,
.referral-stats-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.referral-link-section .section-title,
.referral-stats-section .section-title {
  margin: 0;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* 链接输入+复制行 */
.link-box {
  display: flex;
  align-items: center;
  gap: 10px;
}

.invite-link-input {
  flex: 1;
  min-width: 0;
  padding: 12px 16px;
  border: 1px solid rgba(250, 204, 21, 0.2);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-secondary);
  font-size: 12px;
  font-family: var(--font-mono);
  outline: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: default;
  transition: all .2s ease;
}

.invite-link-input:focus {
  border-color: rgba(250, 204, 21, 0.4);
  background: rgba(250, 204, 21, 0.08);
  box-shadow: 0 0 0 3px rgba(250, 204, 21, 0.1);
}

.btn-copy {
  flex-shrink: 0;
  padding: 10px 20px;
  border: 1px solid rgba(250, 204, 21, 0.3);
  border-radius: 10px;
  background: rgba(250, 204, 21, 0.08);
  color: var(--accent-yellow);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all .2s ease;
  white-space: nowrap;
}

.btn-copy:hover {
  border-color: rgba(250, 204, 21, 0.6);
  background: rgba(250, 204, 21, 0.15);
  box-shadow: 0 4px 12px rgba(250, 204, 21, 0.15);
  transform: translateY(-2px);
}

.btn-copy:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  border: none;
  border-radius: 10px;
  background: linear-gradient(135deg, #facc15 0%, #f59e0b 100%);
  color: #1a1410;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all .2s ease;
  align-self: flex-start;
  box-shadow: 0 6px 16px rgba(250, 204, 21, 0.25);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #fde047 0%, #facc15 100%);
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(250, 204, 21, 0.35);
}

.btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.referral-link-section .hint {
  margin: 0;
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.6;
}

/* 错误消息 */
#referralErrorMsg {
  padding: 12px 16px;
  border-radius: 10px;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #fca5a5;
  font-size: 12px;
  line-height: 1.5;
}

/* 邀请统计 */
.referral-stats-section {
  padding-top: 24px;
  border-top: 1px solid rgba(250, 204, 21, 0.1);
}

.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 20px 16px;
  border: 1px solid rgba(250, 204, 21, 0.15);
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(250, 204, 21, 0.05) 0%, rgba(245, 158, 11, 0.03) 100%);
  transition: all .2s ease;
}

.stat-item:hover {
  border-color: rgba(250, 204, 21, 0.3);
  background: linear-gradient(135deg, rgba(250, 204, 21, 0.1) 0%, rgba(245, 158, 11, 0.05) 100%);
}

.stat-label {
  font-size: 12px;
  color: var(--text-muted);
  text-align: center;
  line-height: 1.4;
  font-weight: 500;
}

.stat-value {
  font-size: 32px;
  font-weight: 800;
  background: linear-gradient(135deg, #ffd700 0%, #facc15 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
}

@media (max-width: 520px) {
  .referral-overlay .referral-panel {
    padding: 28px 20px;
    border-radius: 16px;
  }

  .referral-panel .modal-header h2 {
    font-size: 18px;
  }

  .stats-grid {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .stat-item {
    padding: 16px 12px;
  }

  .stat-value {
    font-size: 24px;
  }
}

/* Mobile viewport polish only. Desktop layout is intentionally untouched. */
@media (max-width: 860px) {
  :root {
    --mobile-nav-bottom: max(8px, env(safe-area-inset-bottom));
    --mobile-nav-height: 62px;
    --mobile-export-bottom: calc(var(--mobile-nav-bottom) + var(--mobile-nav-height) + 10px);
  }

  .top-bar {
    height: 54px;
    padding: 0 12px;
    gap: 8px;
  }

  .brand {
    flex: 0 1 auto;
    max-width: 42vw;
    min-width: 0;
    gap: 8px;
  }

  #siteNameText {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .brand-logo-img {
    width: 26px;
    height: 26px;
  }

  .top-center {
    position: static;
    left: auto;
    top: auto;
    flex: 1 1 auto;
    width: auto;
    min-width: 0;
    max-width: none;
    justify-content: flex-start;
    transform: none;
  }

  .project-name {
    flex: 1 1 auto;
    max-width: none;
    min-width: 0;
    font-size: 12px;
  }

  .save-project-btn {
    flex: 0 0 auto;
    min-width: 58px;
    min-height: 34px;
    margin-left: 8px;
    padding: 0 12px;
  }

  #mobileAccountBtn {
    flex: 0 0 40px;
    width: 40px;
    height: 40px;
  }

  .site-announcement {
    height: 28px;
    padding-right: 34px;
  }

  .site-announcement-text {
    font-size: 12px;
    line-height: 28px;
    padding-right: 44px;
  }

  .viewport-status-card {
    top: 10px;
    left: 10px;
    max-width: min(58vw, 220px);
    gap: 2px;
    padding: 8px 10px;
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.58);
    font-size: 10px;
    line-height: 1.45;
  }

  .vsc-row {
    gap: 6px;
    max-width: 100%;
    overflow: hidden;
  }

  .vsc-row:first-child .vsc-value {
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .view-axis-widget {
    top: 10px;
    right: 10px;
    transform: scale(0.62);
    transform-origin: top right;
  }

  .gizmo-toolbar {
    right: 10px;
    bottom: calc(var(--mobile-export-bottom) + 66px);
    gap: 5px;
    padding: 6px;
    border-radius: 26px;
  }

  .gizmo-btn {
    width: 34px;
    height: 34px;
  }

  .background-export-widget {
    left: 10px;
    right: 10px;
    bottom: calc(var(--mobile-export-bottom) + 64px);
    max-height: 30dvh;
  }

  .bottom-toolbar {
    left: 14px;
    right: 14px;
    bottom: var(--mobile-export-bottom);
    min-height: 54px;
    padding: 7px;
    gap: 8px;
    border-radius: 18px;
    background: rgba(18, 18, 22, 0.84);
  }

  .bottom-toolbar #btnReset {
    flex: 0 0 42px;
    width: 42px;
    height: 42px;
  }

  #btnExportSolidModel {
    min-height: 42px;
    border-radius: 999px;
    font-size: 15px;
    justify-content: center;
  }

  #btnMoreExport {
    min-width: 104px;
    min-height: 42px;
    border-radius: 14px;
    font-size: 14px;
    font-weight: 500;
  }

  .bottom-toolbar .credit-badge-inline {
    margin-left: 6px;
    padding: 1px 7px;
    font-size: 10px;
  }

  .left-toolbar {
    left: 14px;
    right: 14px;
    bottom: var(--mobile-nav-bottom);
    grid-template-columns: repeat(5, minmax(0, 1fr));
    min-height: var(--mobile-nav-height);
    padding: 6px;
    gap: 4px;
    border-radius: 18px;
    background: rgba(14, 14, 18, 0.88);
  }

  .tool-item {
    min-height: 48px;
    gap: 3px;
  }

  .tool-item svg {
    width: 21px;
    height: 21px;
  }

  .tool-item span {
    font-size: 11px;
  }

  .tool-more-popover {
    bottom: calc(var(--mobile-nav-bottom) + var(--mobile-nav-height) + 8px);
  }
}

@media (max-width: 420px) {
  .brand {
    max-width: 36vw;
    font-size: 14px;
  }

  .project-name {
    font-size: 11px;
  }

  .save-project-btn {
    min-width: 52px;
    padding: 0 10px;
  }

  #btnMoreExport {
    min-width: 92px;
  }
}

@media (max-width: 1180px) {
  .creative-grid {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  }
  .creative-detail-panel { grid-template-columns: 1fr; overflow-y: auto; }
  .creative-detail-media {
    grid-template-rows: minmax(360px, 52dvh) auto;
  }
  .creative-preview-thumb {
    flex-basis: 84px;
    width: 84px;
  }
}

@media (max-width: 860px) {
  .workspace-nav.nav-links {
    display: flex !important;
    flex: 1;
    justify-content: center;
    gap: 5px;
  }

  .workspace-tab {
    min-width: 70px;
    height: 30px;
    padding: 0 8px;
    font-size: 12px;
  }

  .studio-top-center,
  .creative-top-center {
    max-width: 32vw;
  }

  .creative-refresh-btn {
    display: none;
  }

  .creative-shell {
    width: min(100% - 28px, 720px);
    padding-top: 22px;
  }

  .creative-hero {
    align-items: flex-start;
    flex-direction: column;
  }

  .creative-hero-actions {
    width: 100%;
  }

  .creative-hero-actions .creative-primary-btn,
  .creative-hero-actions .creative-secondary-btn,
  .creative-hero-actions .creative-filter-select {
    flex: 1 1 120px;
  }

  .creative-hero h1 {
    font-size: 28px;
  }

  .creative-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .creative-detail-overlay {
    padding: 12px;
  }

  .creative-detail-panel {
    max-height: calc(100dvh - 24px);
  }

  .creative-detail-media,
  .creative-detail-info {
    padding: 16px;
  }

  .creative-detail-media {
    grid-template-rows: minmax(300px, 46dvh) auto;
  }

  .creative-preview-thumb {
    flex-basis: 76px;
    width: 76px;
  }

  .creative-detail-actions {
    flex-direction: column;
  }

  .creative-detail-actions .creative-primary-btn {
    width: 100%;
  }

  .creative-submission-panel {
    max-height: calc(100dvh - 24px);
  }

  .creative-submission-body {
    grid-template-columns: 1fr;
    padding: 18px;
  }

  .creative-submission-head,
  .creative-submission-actions {
    padding-left: 18px;
    padding-right: 18px;
  }

  .creative-preview-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .creative-meta-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .workspace-nav.nav-links {
    order: 3;
    flex-basis: 100%;
    margin-top: 6px;
  }

  .top-bar {
    height: auto;
    min-height: var(--header-height);
    flex-wrap: wrap;
    padding-top: 8px;
    padding-bottom: 8px;
  }

  .creative-grid {
    grid-template-columns: 1fr;
  }

  .creative-detail-actions {
    align-items: stretch;
    flex-direction: column;
  }

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

  .creative-submission-row {
    grid-template-columns: 1fr;
  }

  .creative-submission-actions {
    align-items: stretch;
    flex-direction: column-reverse;
  }
}

/* Mobile-only studio layout. Keep desktop rules untouched above 860px. */
@media (max-width: 860px) {
  :root {
    --header-height: 138px;
    --mobile-nav-bottom: max(10px, env(safe-area-inset-bottom));
    --mobile-nav-height: 66px;
    --mobile-export-bottom: calc(var(--mobile-nav-bottom) + var(--mobile-nav-height) + 12px);
  }

  html,
  body,
  .app-shell {
    width: 100%;
    max-width: 100vw;
    min-width: 0;
    overflow-x: hidden;
  }

  .main-container,
  .viewport {
    width: 100%;
    max-width: 100vw;
    min-width: 0;
  }

  .top-bar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 42px;
    grid-template-areas:
      "brand account"
      "project project"
      "tabs tabs";
    height: auto;
    min-height: var(--header-height);
    align-items: center;
    gap: 8px 10px;
    padding: 10px 14px 9px;
    width: 100%;
    max-width: 100vw;
    min-width: 0;
    box-sizing: border-box;
    overflow: hidden;
  }

  .brand {
    grid-area: brand;
    max-width: none;
    min-width: 0;
    font-size: 15px;
    gap: 7px;
  }

  .brand-logo-img {
    width: 25px;
    height: 25px;
  }

  #siteNameText {
    max-width: 112px;
  }

  .top-center {
    grid-area: project;
    position: static;
    left: auto;
    top: auto;
    width: 100%;
    max-width: none;
    min-width: 0;
    transform: none;
    pointer-events: auto;
    justify-content: stretch;
  }

  .studio-top-center,
  .creative-top-center {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    width: 100%;
    max-width: none;
    min-width: 0;
    gap: 6px;
    box-sizing: border-box;
  }

  .project-name,
  .creative-search-input {
    width: auto;
    max-width: 100%;
    min-width: 0;
    min-height: 34px;
    padding: 0 10px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.035);
    text-align: left;
    box-sizing: border-box;
  }

  .save-project-btn {
    width: 56px;
    max-width: 56px;
    min-width: 56px;
    min-height: 36px;
    margin-left: 0;
    padding: 0 10px;
    border-radius: 10px;
  }

  #mobileAccountBtn {
    display: inline-flex !important;
    grid-area: account;
    width: 40px;
    height: 40px;
    min-width: 40px;
    justify-self: end;
  }

  .workspace-nav.nav-links {
    grid-area: tabs;
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 112px));
    justify-content: center;
    gap: 8px;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    margin: 0;
    padding: 0;
    border-left: 0;
    align-self: auto;
    overflow: hidden;
  }

  .workspace-tab {
    min-width: 0;
    height: 34px;
    padding: 0 12px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.035);
    font-size: 12px;
    box-sizing: border-box;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .workspace-tab.active {
    background: rgba(250, 204, 21, 0.11);
  }

  .workspace-tab.active::after {
    display: none !important;
    content: none !important;
  }

  .site-announcement {
    height: 30px;
    padding: 0 34px 0 10px;
  }

  .site-announcement-text {
    font-size: 11px;
    line-height: 30px;
    padding-right: 48px;
  }

  .viewport-status-card {
    top: 12px;
    left: 12px;
    max-width: min(56vw, 180px);
    padding: 8px 10px;
  }

  .view-axis-widget {
    top: 12px;
    right: 12px;
    transform: scale(0.58);
    transform-origin: top right;
  }

  .gizmo-toolbar {
    right: 10px;
    bottom: calc(var(--mobile-export-bottom) + 72px);
  }

  .bottom-toolbar {
    display: flex !important;
    left: 18px;
    right: auto;
    width: 60px !important;
    height: 60px;
    max-width: 60px !important;
    bottom: var(--mobile-export-bottom);
    min-height: 60px;
    gap: 0;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    box-shadow: none;
    box-sizing: border-box;
    overflow: visible;
    transform: none;
    z-index: 70;
  }

  .bottom-toolbar #btnReset {
    display: none !important;
  }

  #btnExportSolidModel {
    display: none !important;
  }

  #btnMoreExport {
    display: inline-flex !important;
    position: relative;
    width: 60px;
    height: 60px;
    max-width: 60px;
    min-width: 60px;
    min-height: 60px;
    padding: 0;
    border: 1px solid rgba(250, 204, 21, 0.42);
    border-radius: 50%;
    background: radial-gradient(circle at 36% 28%, #ffe78a, #facc15 46%, #b67c08 100%);
    color: #15110a;
    box-shadow: 0 16px 34px rgba(0, 0, 0, 0.42), 0 0 0 8px rgba(250, 204, 21, 0.08);
    justify-content: center;
    align-items: center;
    box-sizing: border-box;
    font-size: 0;
    overflow: visible;
    white-space: nowrap;
  }

  #btnMoreExport::before {
    content: "导出";
    font-size: 13px;
    font-weight: 900;
    line-height: 1;
  }

  #btnMoreExport::after {
    content: "";
    position: absolute;
    inset: -7px;
    border: 1px solid rgba(250, 204, 21, 0.18);
    border-radius: 50%;
    pointer-events: none;
  }

  .left-toolbar {
    left: 14px;
    right: 14px;
    bottom: var(--mobile-nav-bottom);
    grid-template-columns: repeat(5, minmax(0, 1fr));
    min-height: var(--mobile-nav-height);
    padding: 7px;
    gap: 5px;
    border-radius: 20px;
  }

  .tool-item {
    min-height: 50px;
    border-radius: 14px;
  }

  .left-toolbar > .tool-item[data-panel="lightweightMold"] {
    display: flex !important;
  }

  .left-toolbar > .tool-item.tool-more,
  .left-toolbar > #btnToolMore {
    display: none !important;
  }

  .tool-more-popover,
  .tool-more-popover.open {
    display: none !important;
  }

  .tool-more-popover {
    left: 14px;
    right: 14px;
    bottom: calc(var(--mobile-export-bottom) + 76px);
    z-index: 10060;
    grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
    gap: 8px;
    padding: 10px;
    border-radius: 16px;
    background: rgba(17, 17, 22, 0.96);
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.42);
  }

  .tool-more-popover .tool-item {
    min-height: 48px;
  }

  .tool-more-popover .tool-item[data-panel] {
    display: flex !important;
  }

  .mobile-export-sheet {
    z-index: 10040;
  }

  .mobile-export-sheet.open {
    display: flex !important;
  }

  .mobile-export-sheet-panel {
    width: calc(100% - 20px);
    max-width: 430px;
    max-height: min(72dvh, 520px);
    margin: 0 10px;
    gap: 8px;
    padding: 12px 12px calc(14px + env(safe-area-inset-bottom));
    border-radius: 20px 20px 0 0;
    overflow-y: auto;
  }

  .mobile-export-sheet-title {
    padding: 6px 0 8px;
    font-size: 15px;
  }

  .mobile-export-sheet-btn,
  .mobile-export-sheet-cancel {
    min-height: 52px;
    padding: 0 16px;
    border-radius: 14px;
    font-size: 14px;
  }

  .mobile-export-sheet-btn.primary {
    border-color: rgba(250, 204, 21, 0.4);
    background: rgba(250, 204, 21, 0.14);
    color: #facc15;
  }
}

@media (max-width: 420px) {
  #siteNameText {
    max-width: 98px;
  }

  .top-bar {
    grid-template-columns: minmax(0, 1fr) 40px;
    padding-left: 12px;
    padding-right: 12px;
  }

  .save-project-btn {
    min-width: 52px;
  }

  .bottom-toolbar {
    left: 14px;
    right: auto;
  }

  #btnMoreExport {
    width: 58px;
    height: 58px;
    max-width: 58px;
    min-width: 58px;
    min-height: 58px;
  }

  .left-toolbar {
    left: 10px;
    right: 10px;
  }
}

@media (max-width: 380px) {
  :root {
    --header-height: 132px;
    --mobile-nav-height: 64px;
    --mobile-export-bottom: calc(var(--mobile-nav-bottom) + var(--mobile-nav-height) + 10px);
  }

  .top-bar {
    gap: 7px 8px;
    padding-left: 10px;
    padding-right: 10px;
  }

  #siteNameText {
    max-width: 86px;
  }

  .project-name,
  .creative-search-input {
    min-height: 32px;
    font-size: 11px;
  }

  .save-project-btn {
    width: 48px;
    max-width: 48px;
    min-width: 48px;
    min-height: 34px;
    padding: 0 8px;
  }

  .workspace-tab {
    height: 32px;
    padding: 0 10px;
    font-size: 11px;
  }

  .left-toolbar {
    left: 8px;
    right: 8px;
    min-height: var(--mobile-nav-height);
    padding: 6px;
    gap: 3px;
  }

  .tool-item {
    min-height: 48px;
    gap: 3px;
  }

  .tool-item svg {
    width: 19px;
    height: 19px;
  }

  .tool-item span {
    font-size: 10px;
  }

  .bottom-toolbar {
    left: 10px;
  }

  #btnMoreExport {
    width: 54px;
    height: 54px;
    max-width: 54px;
    min-width: 54px;
    min-height: 54px;
  }

  #btnMoreExport::before {
    font-size: 12px;
  }

  .gizmo-toolbar {
    right: 8px;
    bottom: calc(var(--mobile-export-bottom) + 64px);
  }
}

@media (min-width: 861px) and (max-width: 1180px) and (pointer: coarse),
       (min-width: 861px) and (max-width: 1180px) and (hover: none) {
  :root {
    --header-height: 96px;
    --mobile-nav-bottom: max(14px, env(safe-area-inset-bottom));
    --mobile-nav-height: 72px;
    --mobile-export-bottom: calc(var(--mobile-nav-bottom) + var(--mobile-nav-height) + 16px);
  }

  html,
  body,
  .app-shell {
    width: 100%;
    max-width: 100vw;
    min-width: 0;
    overflow-x: hidden;
  }

  body {
    overflow: hidden;
    touch-action: manipulation;
  }

  .app-shell {
    height: 100dvh;
    min-height: 100dvh;
  }

  .top-bar {
    display: grid;
    grid-template-columns: minmax(150px, 0.8fr) minmax(280px, 1.5fr) 44px;
    grid-template-areas:
      "brand project account"
      "tabs tabs tabs";
    height: auto;
    min-height: var(--header-height);
    align-items: center;
    gap: 8px 16px;
    padding: 10px 24px 9px;
    width: 100%;
    max-width: 100vw;
    min-width: 0;
    box-sizing: border-box;
    overflow: hidden;
  }

  .brand {
    grid-area: brand;
    max-width: none;
    min-width: 0;
    gap: 8px;
    font-size: 16px;
  }

  #siteNameText {
    max-width: 150px;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .top-account {
    display: none !important;
  }

  #mobileAccountBtn {
    display: inline-flex !important;
    grid-area: account;
    width: 42px;
    height: 42px;
    min-width: 42px;
    justify-self: end;
  }

  .top-center {
    grid-area: project;
    position: static;
    left: auto;
    top: auto;
    width: 100%;
    max-width: none;
    min-width: 0;
    transform: none;
    pointer-events: auto;
    justify-content: stretch;
  }

  .studio-top-center,
  .creative-top-center {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 64px;
    width: 100%;
    max-width: none;
    min-width: 0;
    gap: 8px;
    box-sizing: border-box;
  }

  .project-name,
  .creative-search-input {
    width: auto;
    max-width: 100%;
    min-width: 0;
    min-height: 38px;
    padding: 0 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 11px;
    background: rgba(255, 255, 255, 0.035);
    text-align: left;
    box-sizing: border-box;
  }

  .save-project-btn {
    width: 64px;
    max-width: 64px;
    min-width: 64px;
    min-height: 38px;
    margin-left: 0;
    padding: 0 10px;
    border-radius: 11px;
  }

  .workspace-nav.nav-links {
    grid-area: tabs;
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 132px));
    justify-content: center;
    gap: 10px;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    margin: 0;
    padding: 0;
    border-left: 0;
    align-self: auto;
    overflow: hidden;
  }

  .workspace-tab {
    min-width: 0;
    height: 36px;
    padding: 0 14px;
    border-radius: 13px;
    background: rgba(255, 255, 255, 0.035);
    font-size: 13px;
    box-sizing: border-box;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .workspace-tab.active {
    background: rgba(250, 204, 21, 0.11);
  }

  .workspace-tab.active::after {
    display: none !important;
    content: none !important;
  }

  .site-announcement {
    height: 32px;
    padding: 0 38px 0 14px;
  }

  .site-announcement-text {
    font-size: 12px;
    line-height: 32px;
    padding-right: 56px;
  }

  .main-container {
    position: relative;
    display: block;
    flex: 1;
    min-width: 0;
    min-height: 0;
    overflow: hidden;
  }

  .viewport {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    max-width: 100vw;
    min-width: 0;
  }

  .right-panel {
    position: absolute;
    left: 50%;
    right: auto;
    bottom: 0;
    z-index: 45;
    width: min(760px, calc(100vw - 32px));
    max-height: min(78dvh, 760px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-bottom: 0;
    border-radius: 22px 22px 0 0;
    background: rgba(32, 32, 34, 0.98);
    box-shadow: 0 -18px 46px rgba(0, 0, 0, 0.52);
    transform: translate(-50%, calc(100% + 18px));
    transition: transform 0.24s ease;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding-bottom: calc(14px + env(safe-area-inset-bottom));
  }

  .main-container.mobile-panel-open .right-panel {
    transform: translate(-50%, 0);
  }

  .mobile-panel-backdrop {
    position: absolute;
    inset: 0;
    z-index: 40;
    display: block;
    background: rgba(0, 0, 0, 0.46);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
  }

  .main-container.mobile-panel-open .mobile-panel-backdrop {
    opacity: 1;
    pointer-events: auto;
  }

  .mobile-panel-grip {
    position: sticky;
    top: 0;
    z-index: 4;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 60px;
    padding: 17px 56px 9px;
    border-bottom: 1px solid var(--border-color);
    background: rgba(24, 24, 28, 0.98);
    color: var(--text-primary);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.22);
    cursor: grab;
    touch-action: none;
    user-select: none;
  }

  .mobile-panel-grip::before {
    content: "";
    position: absolute;
    top: 8px;
    left: 50%;
    width: 84px;
    height: 5px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.38);
    transform: translateX(-50%);
  }

  .mobile-panel-grip.is-dragging {
    cursor: grabbing;
  }

  .mobile-panel-drag-label {
    color: var(--accent-yellow);
    font-size: 13px;
    font-weight: 900;
    line-height: 1.1;
  }

  .mobile-panel-title {
    margin-top: 3px;
    color: rgba(255, 255, 255, 0.58);
    font-size: 11px;
    font-weight: 700;
    line-height: 1.1;
  }

  .mobile-panel-close {
    position: absolute;
    top: 13px;
    right: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.76);
    font-size: 22px;
    line-height: 1;
  }

  .panel-header {
    display: none;
  }

  .viewport-status-card {
    top: 16px;
    left: max(18px, calc((100vw - 760px) / 2 + 18px));
    max-width: min(34vw, 220px);
    padding: 9px 12px;
  }

  .view-axis-widget {
    top: 16px;
    right: max(18px, calc((100vw - 760px) / 2 + 18px));
    transform: scale(0.72);
    transform-origin: top right;
  }

  .gizmo-toolbar {
    right: max(20px, calc((100vw - 760px) / 2 + 20px));
    bottom: calc(var(--mobile-export-bottom) + 88px);
  }

  .left-toolbar {
    position: absolute;
    left: 50%;
    right: auto;
    bottom: var(--mobile-nav-bottom);
    z-index: 32;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    align-items: stretch;
    width: min(720px, calc(100vw - 32px));
    height: auto;
    min-height: var(--mobile-nav-height);
    gap: 8px;
    padding: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 22px;
    background: rgba(20, 20, 22, 0.92);
    box-shadow: var(--shadow-lg);
    backdrop-filter: blur(12px);
    transform: translateX(-50%);
  }

  .tool-item {
    width: auto;
    min-width: 0;
    min-height: 54px;
    padding: 5px 0;
    gap: 4px;
    border-radius: 14px;
  }

  .tool-item svg {
    width: 22px;
    height: 22px;
  }

  .tool-item span {
    font-size: 11px;
  }

  .left-toolbar > .tool-item[data-panel="lightweightMold"] {
    display: flex !important;
  }

  .left-toolbar > .tool-item.tool-more,
  .left-toolbar > #btnToolMore,
  .tool-more-popover,
  .tool-more-popover.open {
    display: none !important;
  }

  .bottom-toolbar {
    display: flex !important;
    left: max(22px, calc((100vw - 720px) / 2 + 22px));
    right: auto;
    width: 66px !important;
    height: 66px;
    max-width: 66px !important;
    bottom: var(--mobile-export-bottom);
    min-height: 66px;
    gap: 0;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    box-shadow: none;
    box-sizing: border-box;
    overflow: visible;
    transform: none;
    z-index: 70;
  }

  .bottom-toolbar #btnReset,
  #btnExportSolidModel,
  .bottom-toolbar .export-btn {
    display: none !important;
  }

  #btnMoreExport {
    display: inline-flex !important;
    position: relative;
    width: 66px;
    height: 66px;
    max-width: 66px;
    min-width: 66px;
    min-height: 66px;
    padding: 0;
    border: 1px solid rgba(250, 204, 21, 0.42);
    border-radius: 50%;
    background: radial-gradient(circle at 36% 28%, #ffe78a, #facc15 46%, #b67c08 100%);
    color: #15110a;
    box-shadow: 0 16px 34px rgba(0, 0, 0, 0.42), 0 0 0 9px rgba(250, 204, 21, 0.08);
    justify-content: center;
    align-items: center;
    box-sizing: border-box;
    font-size: 0;
    overflow: visible;
    white-space: nowrap;
  }

  #btnMoreExport::before {
    content: "导出";
    font-size: 14px;
    font-weight: 900;
    line-height: 1;
  }

  #btnMoreExport::after {
    content: "";
    position: absolute;
    inset: -8px;
    border: 1px solid rgba(250, 204, 21, 0.18);
    border-radius: 50%;
    pointer-events: none;
  }

  .main-container.mobile-panel-open .bottom-toolbar,
  .main-container.mobile-panel-open .gizmo-toolbar,
  .main-container.mobile-panel-open .left-toolbar {
    display: none !important;
  }

  .mobile-stats-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 88;
    background: rgba(0, 0, 0, 0.48);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.22s ease;
  }

  .mobile-stats-backdrop.open {
    opacity: 1;
    pointer-events: auto;
  }

  .stats-panel {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    z-index: 89;
    display: flex;
    width: min(440px, 88vw);
    max-width: 100vw;
    border-left: 1px solid rgba(255, 255, 255, 0.08);
    background: #1a1a1e;
    box-shadow: -8px 0 30px rgba(0, 0, 0, 0.5);
    transform: translateX(100%);
    transition: transform 0.24s ease;
  }

  .stats-panel.mobile-open {
    transform: translateX(0);
  }

  .stats-panel-mobile-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 58px;
    padding: 0 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 18px;
    font-weight: 800;
    flex-shrink: 0;
  }

  .stats-panel .stats-scroll {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .mobile-export-sheet {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 10040;
    align-items: flex-end;
    justify-content: center;
  }

  .mobile-export-sheet.open {
    display: flex !important;
  }

  .mobile-export-sheet-backdrop {
    display: block;
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
  }

  .mobile-export-sheet-panel {
    display: flex;
    position: relative;
    z-index: 1;
    width: min(520px, calc(100% - 28px));
    max-width: 520px;
    max-height: min(70dvh, 560px);
    flex-direction: column;
    gap: 8px;
    margin: 0 14px;
    padding: 14px 14px calc(16px + env(safe-area-inset-bottom));
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-bottom: none;
    border-radius: 22px 22px 0 0;
    background: #1d1d26;
    box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.5);
    overflow-y: auto;
    transform: translateY(100%);
    transition: transform 0.22s ease;
  }

  .mobile-export-sheet.open .mobile-export-sheet-panel {
    transform: translateY(0);
  }

  .mobile-export-sheet-btn,
  .mobile-export-sheet-cancel {
    min-height: 54px;
    padding: 0 18px;
    border-radius: 15px;
    font-size: 15px;
  }

  .mobile-export-sheet-btn.primary {
    border-color: rgba(250, 204, 21, 0.4);
    background: rgba(250, 204, 21, 0.14);
    color: #facc15;
  }
}
