:root {
  --blue: #1f56c7;
  --blue-hover: #1846a6;
  --blue-soft: #eef4ff;
  --ink: #222b38;
  --muted: #5a6779;
  --page: #f8f9fb;
  --soft: #f3f6fa;
  --border: #e4e9f0;
  --surface: #ffffff;
  --danger: #dc2626;
  --success: #15803d;
  --warn: #b45309;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 2px rgba(27, 42, 64, .06);
  --shadow-md: 0 6px 20px rgba(27, 42, 64, .08);
  --shadow-lg: 0 24px 60px -16px rgba(27, 42, 64, .16);
}

*, *::before, *::after { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--page);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: 14px;
  line-height: 1.55;
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--blue); text-decoration: none; }
button, input, textarea, select { font-family: inherit; font-size: 14px; }
svg { display: block; flex-shrink: 0; }

/* 基础按钮与控件 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 36px;
  padding: 0 15px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink);
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: background .15s, border-color .15s, color .15s, box-shadow .15s;
}
.btn:hover { background: var(--soft); border-color: #d2dbe8; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-primary { background: var(--blue); border-color: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-hover); border-color: var(--blue-hover); }
.btn-success { background: var(--success); border-color: var(--success); color: #fff; }
.btn-success:hover { opacity: .92; }
.btn-sm { height: 30px; padding: 0 10px; font-size: 12px; border-radius: 7px; }
.btn-lg { height: 44px; padding: 0 24px; font-size: 15px; border-radius: 10px; }

.btn-icon {
  width: 30px;
  height: 30px;
  padding: 0;
  border-radius: 7px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all .15s;
}
.btn-icon:hover { background: var(--soft); color: var(--ink); border-color: var(--border); }
.btn-icon.danger:hover { background: #fef2f2; color: var(--danger); border-color: #fecaca; }

.input {
  height: 38px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--ink);
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(31, 86, 199, .09); }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  background: var(--soft);
  color: var(--muted);
  border: 1px solid var(--border);
  white-space: nowrap;
}
.badge-blue { background: var(--blue-soft); color: var(--blue); border-color: #d6e3ff; }
.badge-green { background: #ecfdf3; color: var(--success); border-color: #bbf7d0; }
.badge-amber { background: #fffbeb; color: var(--warn); border-color: #fde68a; }

.brand-logo {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-weight: 700;
  font-size: 16px;
  letter-spacing: -.02em;
  color: var(--ink);
  cursor: pointer;
  user-select: none;
}
.brand-mark {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  background: var(--blue);
  color: #fff;
  display: grid;
  place-items: center;
}

.tab-pills {
  display: inline-flex;
  gap: 4px;
  background: rgba(228, 233, 240, .55);
  padding: 3px;
  border-radius: var(--radius-sm);
}
.tab-pill {
  border: none;
  background: transparent;
  padding: 5px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  cursor: pointer;
  transition: all .15s;
}
.tab-pill.active { background: var(--surface); color: var(--blue); box-shadow: var(--shadow-sm); }

/* 2. 公共毛玻璃顶栏 */
.public-header {
  height: 72px;
  backdrop-filter: saturate(1.6) blur(12px);
  -webkit-backdrop-filter: saturate(1.6) blur(12px);
  background: rgba(255, 255, 255, .86);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 30;
}
.public-header-inner {
  max-width: 1280px;
  height: 100%;
  margin: 0 auto;
  padding: 0 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.public-nav { display: flex; align-items: center; gap: 28px; font-weight: 500; }
.public-nav a { color: var(--muted); transition: color .15s; }
.public-nav a:hover { color: var(--ink); }

/* 3. 品牌首页 */
.site-home-hero {
  max-width: 1280px;
  margin: 0 auto;
  padding: 80px 40px 64px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.18fr);
  gap: 56px;
  align-items: center;
}
.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--blue);
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 20px;
}
.site-home-hero h1 {
  margin: 0 0 18px;
  font-size: clamp(38px, 4.4vw, 60px);
  letter-spacing: -.035em;
  line-height: 1.14;
  font-weight: 750;
  color: var(--ink);
}
.hero-sub {
  margin: 0 0 32px;
  font-size: 16.5px;
  line-height: 1.68;
  color: var(--muted);
  max-width: 480px;
}
.hero-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.hero-note { margin-top: 18px; font-size: 13px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.hero-note strong { color: var(--blue); }

.hero-cad-stage {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}
.hero-cad-bar {
  height: 46px;
  padding: 0 14px;
  border-bottom: 1px solid var(--border);
  background: var(--soft);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.hero-cad-canvas {
  height: 332px;
  background-color: var(--surface);
  background-image:
    linear-gradient(to right, rgba(31, 86, 199, .055) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(31, 86, 199, .055) 1px, transparent 1px),
    linear-gradient(to right, rgba(31, 86, 199, .11) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(31, 86, 199, .11) 1px, transparent 1px);
  background-size: 20px 20px, 20px 20px, 100px 100px, 100px 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.hero-cad-foot {
  padding: 13px 18px;
  border-top: 1px solid var(--border);
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
}

.landing-band { max-width: 1280px; margin: 0 auto; padding: 24px 40px 84px; }
.cap-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-bottom: 48px; }
.cap-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}
.cap-icon {
  width: 38px;
  height: 38px;
  border-radius: 9px;
  background: var(--blue-soft);
  color: var(--blue);
  display: grid;
  place-items: center;
  margin-bottom: 14px;
}
.cap-card h3 { margin: 0 0 8px; font-size: 16px; }
.cap-card p { margin: 0; font-size: 13px; color: var(--muted); line-height: 1.65; }

.faq-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 6px 24px;
  box-shadow: var(--shadow-sm);
}
.faq-box details { border-bottom: 1px solid var(--border); padding: 16px 0; }
.faq-box details:last-child { border-bottom: none; }
.faq-box summary {
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.faq-box summary::-webkit-details-marker { display: none; }
.faq-box p { margin: 10px 0 0; color: var(--muted); font-size: 13px; }

/* 4. 独立全屏登录/注册页 */
.auth-page {
  min-height: 100dvh;
  background: #fff;
  background-image: radial-gradient(#d8e0ed .9px, transparent .9px);
  background-size: 20px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 84px 20px 32px;
  position: relative;
}
.auth-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 72px;
  padding: 0 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.auth-card {
  width: 100%;
  max-width: 410px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px 32px;
  box-shadow: var(--shadow-lg);
}
.auth-card h1 { margin: 0 0 6px; font-size: 22px; letter-spacing: -.02em; }
.auth-desc { margin: 0 0 20px; color: var(--muted); font-size: 13px; }
.auth-tabs {
  display: flex;
  background: var(--soft);
  padding: 4px;
  border-radius: 9px;
  border: 1px solid var(--border);
  margin-bottom: 18px;
}
.auth-tab {
  flex: 1;
  border: none;
  background: transparent;
  padding: 7px;
  border-radius: 6px;
  font-weight: 500;
  color: var(--muted);
  cursor: pointer;
}
.auth-tab.active { background: var(--surface); color: var(--blue); box-shadow: var(--shadow-sm); }
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 13px; font-weight: 500; margin-bottom: 6px; }
.field .input { width: 100%; height: 40px; }
.auth-bonus {
  background: var(--blue-soft);
  border: 1px solid #d6e3ff;
  color: var(--blue);
  border-radius: var(--radius-sm);
  padding: 9px 12px;
  font-size: 12px;
  font-weight: 500;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.auth-err {
  background: #fef2f2;
  color: var(--danger);
  border: 1px solid #fecaca;
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  font-size: 12px;
  margin-bottom: 14px;
}

/* 5. 控制台 App Shell */
.app-shell { display: flex; min-height: 100dvh; background: var(--page); }
.app-sidebar {
  width: 248px;
  background: #f7f9fb;
  border-right: 1px solid var(--border);
  transition: width .18s ease;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  position: sticky;
  top: 0;
  height: 100dvh;
}
.app-sidebar.collapsed { width: 64px; }
.side-head {
  height: 58px;
  padding: 0 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
}
.app-sidebar.collapsed .side-head { justify-content: center; padding: 0; }
.app-sidebar.collapsed .side-hide { display: none !important; }

.side-cta { padding: 14px 12px 10px; }
.side-cta .btn { width: 100%; height: 38px; }
.app-sidebar.collapsed .side-cta .btn { padding: 0; }

.side-nav { padding: 4px 10px; display: flex; flex-direction: column; gap: 3px; }
.side-nav-item {
  height: 36px;
  padding: 0 10px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  font-weight: 500;
  cursor: pointer;
  transition: background .15s, color .15s;
}
.side-nav-item:hover { background: #edf2f8; color: var(--ink); }
.side-nav-item.active { background: #e8effc; color: var(--blue); font-weight: 600; }
.side-nav-left { display: flex; align-items: center; gap: 10px; min-width: 0; }
.side-nav-count { font-size: 12px; color: var(--muted); }
.side-nav-item.active .side-nav-count { color: var(--blue); }
.app-sidebar.collapsed .side-nav-item { justify-content: center; padding: 0; }

.side-recent-label {
  padding: 14px 16px 6px;
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: .04em;
}
.side-recent-list { flex: 1; overflow-y: auto; padding: 0 10px 10px; }
.side-recent-item {
  padding: 7px 10px;
  border-radius: 7px;
  font-size: 13px;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
  margin-bottom: 2px;
}
.side-recent-item:hover { background: #edf2f8; }
.side-recent-item.active { background: var(--surface); border: 1px solid var(--border); color: var(--blue); font-weight: 500; }

.side-foot {
  border-top: 1px solid var(--border);
  padding: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.app-sidebar.collapsed .side-foot { justify-content: center; padding: 12px 0; }
.user-chip { display: flex; align-items: center; gap: 9px; min-width: 0; }
.user-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #e8effc;
  color: var(--blue);
  font-weight: 700;
  font-size: 13px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.user-name { font-size: 13px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.app-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

/* 6. 我的项目控制台 */
.console-page { padding: 28px 36px 48px; max-width: 1240px; width: 100%; margin: 0 auto; }
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
  flex-wrap: wrap;
}
.page-header h1 { margin: 0; font-size: 22px; letter-spacing: -.02em; }
.toolbar-controls { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.search-wrap { position: relative; }
.search-wrap svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.search-wrap .input { padding-left: 34px; width: 240px; border-radius: 999px; }

.claim-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(268px, 1fr));
  gap: 18px;
}
.project-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: border-color .15s, box-shadow .15s, transform .15s;
  display: flex;
  flex-direction: column;
}
.project-card:hover { border-color: var(--blue); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.project-thumb {
  aspect-ratio: 16 / 10;
  background-color: #f9fbff;
  background-image:
    linear-gradient(to right, rgba(31, 86, 199, .05) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(31, 86, 199, .05) 1px, transparent 1px);
  background-size: 18px 18px;
  border-bottom: 1px solid var(--border);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.project-thumb img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.project-hover-actions {
  position: absolute;
  top: 10px;
  right: 10px;
  display: flex;
  gap: 4px;
  opacity: 0;
  transition: opacity .15s;
}
.project-card:hover .project-hover-actions { opacity: 1; }
.project-hover-actions .btn-icon { background: rgba(255, 255, 255, .94); border-color: var(--border); }
.project-card-body { padding: 16px 18px; display: flex; flex-direction: column; gap: 10px; }
.project-card-title { font-weight: 600; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.project-card-meta { display: flex; align-items: center; justify-content: space-between; font-size: 12px; color: var(--muted); }

/* 7. 图纸工作台 */
.ws-layout { height: 100dvh; display: flex; flex-direction: column; }
.ws-topbar {
  height: 58px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-shrink: 0;
}
.ws-topbar-left { display: flex; align-items: center; gap: 12px; min-width: 0; }
.ws-title { font-weight: 600; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 300px; }
.ws-progress-wrap { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); }
.ws-progress-bar { width: 96px; height: 6px; border-radius: 999px; background: var(--soft); border: 1px solid var(--border); overflow: hidden; }
.ws-progress-fill { height: 100%; background: var(--blue); transition: width .3s; }
.ws-topbar-right { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }

.purge-banner {
  background: #fffbeb;
  border-bottom: 1px solid #fde68a;
  color: var(--warn);
  padding: 6px 16px;
  font-size: 12px;
  text-align: center;
  font-weight: 500;
  flex-shrink: 0;
}
.ws-split { flex: 1; min-height: 0; display: flex; }
.ws-chat {
  flex: 1;
  min-width: 340px;
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--border);
  background: var(--page);
}
.ws-messages { flex: 1; overflow-y: auto; padding: 20px 24px; display: flex; flex-direction: column; gap: 14px; }
.msg-row { display: flex; flex-direction: column; max-width: 84%; }
.msg-row.user { align-self: flex-end; align-items: flex-end; }
.msg-row.advisor { align-self: flex-start; align-items: flex-start; }
.msg-meta { font-size: 11px; color: var(--muted); margin-bottom: 4px; }
.msg-bubble {
  padding: 11px 15px;
  border-radius: var(--radius-md);
  white-space: pre-wrap;
  word-break: break-word;
  box-shadow: var(--shadow-sm);
}
.msg-row.user .msg-bubble { background: var(--blue); color: #fff; border-bottom-right-radius: 4px; }
.msg-row.advisor .msg-bubble { background: var(--surface); border: 1px solid var(--border); color: var(--ink); border-bottom-left-radius: 4px; }
.msg-att-list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.msg-att-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 6px;
  font-size: 12px;
  background: rgba(255, 255, 255, .18);
  border: 1px solid rgba(255, 255, 255, .3);
  color: inherit;
}
.msg-row.advisor .msg-att-chip { background: var(--soft); border-color: var(--border); color: var(--ink); }

.commentary-pill {
  align-self: stretch;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--blue);
  border-radius: var(--radius-sm);
  padding: 9px 13px;
  font-size: 13px;
  color: var(--muted);
}
.commentary-pill strong { color: var(--ink); margin-right: 8px; font-weight: 600; }

.pulse-bar {
  margin: 0 20px 8px;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  background: var(--blue-soft);
  border: 1px solid #d6e3ff;
  color: var(--blue);
  font-size: 12px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
}
.pulse-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--blue); animation: pulse 1.4s infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }

.quote-card {
  background: var(--surface);
  border: 1px solid #c7d7f7;
  border-radius: var(--radius-md);
  padding: 18px;
  box-shadow: var(--shadow-sm);
}
.quote-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 10px; }
.quote-price { text-align: right; }
.quote-price strong { font-size: 22px; color: var(--blue); }
.quote-price span { display: block; font-size: 12px; color: var(--muted); }
.quote-items { margin: 8px 0 12px; padding-left: 18px; color: var(--muted); font-size: 13px; }
.quote-alert {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: #fef2f2;
  color: var(--danger);
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.ws-composer-wrap { padding: 10px 20px 18px; }
.ws-composer {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 10px 12px;
  box-shadow: var(--shadow-sm);
  transition: border-color .15s, box-shadow .15s;
}
.ws-composer:focus-within { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(31, 86, 199, .08); }
.pending-files { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.pending-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  background: var(--soft);
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 12px;
}
.pending-chip button { border: none; background: transparent; color: var(--muted); cursor: pointer; padding: 0; display: inline-flex; }
.composer-row { display: flex; align-items: flex-end; gap: 8px; }
.composer-textarea {
  flex: 1;
  border: none;
  outline: none;
  resize: none;
  min-height: 36px;
  max-height: 120px;
  padding: 6px 4px;
  line-height: 1.5;
  background: transparent;
}

.ws-preview { flex: 1.05; min-width: 320px; background: var(--surface); display: flex; flex-direction: column; }
.preview-toolbar {
  height: 46px;
  padding: 0 16px;
  border-bottom: 1px solid var(--border);
  background: var(--soft);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.version-pills { display: flex; align-items: center; gap: 5px; overflow-x: auto; }
.ver-pill {
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  cursor: pointer;
}
.ver-pill.active { background: var(--blue); border-color: var(--blue); color: #fff; }
.viewer-stage {
  flex: 1;
  position: relative;
  overflow: hidden;
  background-color: var(--surface);
  background-image: radial-gradient(#d8e0ed .85px, transparent .85px);
  background-size: 20px 20px;
  cursor: grab;
  user-select: none;
}
.viewer-stage:active { cursor: grabbing; }
.viewer-stage img { position: absolute; top: 0; left: 0; transform-origin: 0 0; max-width: none; pointer-events: none; }
.preview-empty {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  text-align: center;
  padding: 32px;
  gap: 10px;
}

/* 8. 积分与账单页 */
.wallet-top { display: grid; grid-template-columns: 1fr 1.12fr; gap: 20px; margin-bottom: 24px; }
.wallet-balance {
  background: linear-gradient(125deg, #ffffff 0%, #f3f7ff 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 26px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.wallet-big-num { font-size: 40px; font-weight: 750; letter-spacing: -.03em; color: var(--blue); line-height: 1.1; margin: 8px 0 4px; }
.wallet-sub-row {
  display: flex;
  gap: 24px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  font-size: 13px;
  color: var(--muted);
}
.wallet-sub-row strong { color: var(--ink); font-size: 15px; display: block; margin-top: 2px; }

.wallet-redeem {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 26px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.plan-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 24px; }
.plan-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px 16px;
  text-align: center;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: border-color .15s, box-shadow .15s, transform .15s;
}
.plan-card:hover { border-color: var(--blue); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.plan-pts { font-size: 22px; font-weight: 700; color: var(--blue); }
.plan-cny { font-size: 14px; font-weight: 600; color: var(--ink); margin-top: 6px; }
.plan-tag { font-size: 12px; color: var(--muted); margin-top: 4px; }

.ledger-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 22px 24px; box-shadow: var(--shadow-sm); }
.ledger-table { width: 100%; border-collapse: collapse; margin-top: 14px; }
.ledger-table th, .ledger-table td { padding: 12px; text-align: left; border-bottom: 1px solid var(--border); font-size: 13px; }
.ledger-table th { color: var(--muted); font-weight: 500; background: var(--soft); }

/* 9. 移动端响应式适配 */
.mobile-only-btn, .ws-mobile-tabs, .mobile-backdrop { display: none; }
@media (max-width: 960px) {
  .site-home-hero, .cap-grid, .wallet-top, .plan-grid { grid-template-columns: 1fr; }
  .site-home-hero { padding: 48px 20px; gap: 32px; }
  .public-header-inner, .landing-band, .console-page { padding-left: 16px; padding-right: 16px; }
  .auth-header { padding: 0 16px; }
  .app-sidebar {
    position: fixed; left: 0; top: 0; bottom: 0; z-index: 60;
    width: 256px !important;
    transform: translateX(-100%);
    transition: transform .22s ease;
    box-shadow: var(--shadow-lg);
  }
  .app-sidebar.mobile-open { transform: translateX(0); }
  .app-sidebar.mobile-open .side-hide { display: initial !important; }
  .mobile-backdrop {
    display: block; position: fixed; inset: 0; z-index: 55;
    background: rgba(15, 23, 42, .45);
  }
  .app-main { padding-left: 0; }
  .mobile-only-btn { display: inline-flex; flex-shrink: 0; }
  .ws-topbar { padding: 10px 12px; gap: 8px; }
  .ws-topbar-right { display: none; }
  .ws-progress-wrap { display: none; }
  .ws-mobile-tabs {
    display: flex; border-bottom: 1px solid var(--border); background: var(--surface);
    padding: 6px 12px; gap: 8px; flex-shrink: 0;
  }
  .ws-mobile-tab {
    flex: 1; height: 34px; border: 1px solid var(--border); border-radius: 8px;
    background: var(--soft); color: var(--muted); font-size: 13px; font-weight: 600;
    cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  }
  .ws-mobile-tab.active { background: var(--blue); border-color: var(--blue); color: #fff; }
  .ws-mobile-dot { width: 7px; height: 7px; border-radius: 50%; background: #ef4444; display: inline-block; }
  .ws-split { flex-direction: column; }
  .ws-split[data-mobile-tab="chat"] .ws-progress-panel { display: none; }
  .ws-split[data-mobile-tab="progress"] .ws-chat { display: none; }
  .ws-split[data-mobile-tab="progress"] .ws-progress-panel {
    display: flex; flex: 1; width: 100%; border-left: none; border-top: none; padding: 14px 12px 24px;
  }
  .ws-messages { padding: 14px 12px; }
  .ws-composer-wrap { padding: 8px 12px calc(10px + env(safe-area-inset-bottom)); }
  .composer-textarea, .input, select, textarea { font-size: 16px !important; }
  #wsBtnAttach, #wsBtnSend { min-width: 40px; min-height: 40px; }
  .ws-preview { min-height: 280px; }
}

.btn-rename:hover { color: var(--blue); border-color: var(--blue); }
.btn-delete:hover { color: var(--danger); border-color: var(--danger); }

/* 工作台 66% 对话 + 34% 右侧任务进度面板 + 全屏大图预览 */
.ws-order-hint { font-size: 12px; color: var(--muted); font-family: monospace; }
.ws-split { display: flex; flex: 1; min-height: 0; }
.ws-chat { flex: 1 1 66%; min-width: 0; }
.ws-progress-panel {
  flex: 0 0 34%;
  min-width: 310px;
  max-width: 440px;
  border-left: 1px solid var(--border);
  background: var(--soft);
  overflow-y: auto;
  padding: 16px 18px 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
@media (max-width: 960px) {
  .ws-progress-panel { flex: none; min-width: 0; max-width: none; border-left: none; border-top: 1px solid var(--border); }
}
.ws-panel-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  box-shadow: var(--shadow-sm);
}
.ws-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 10px;
}
.ws-timeline { display: flex; flex-direction: column; gap: 10px; }
.ws-step {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13px;
  color: var(--muted);
}
.ws-step-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-top: 4px;
  flex-shrink: 0;
  background: #d0d7e2;
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px #cbd5e1;
}
.ws-step.done { color: var(--ink); }
.ws-step.done .ws-step-dot { background: #16a34a; box-shadow: 0 0 0 1px #16a34a; }
.ws-step.active { color: var(--blue); font-weight: 600; }
.ws-step.active .ws-step-dot { background: var(--blue); box-shadow: 0 0 0 3px rgba(31,86,199,.18); }
.ws-step-sub { font-size: 11px; color: var(--muted); font-weight: 400; margin-top: 2px; }
.ws-meta-info {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px dashed var(--border);
  font-size: 12px;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
}
.ws-thumb-wrap {
  position: relative;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  background: #f8fafc;
  cursor: pointer;
}
.ws-thumb-wrap img { display: block; width: 100%; max-height: 220px; object-fit: contain; background: #fff; }
.ws-thumb-overlay {
  font-size: 11px;
  color: var(--muted);
  text-align: center;
  padding: 6px 8px;
  border-top: 1px solid var(--border);
  background: var(--soft);
}
.ws-thumb-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 8px;
  padding: 20px 12px;
  border: 1px dashed var(--border);
  border-radius: 10px;
  font-size: 12px;
  color: var(--muted);
  background: #fafcff;
}
.ws-delivery-empty { font-size: 12px; color: var(--muted); line-height: 1.6; }
.ws-delivery-actions { display: flex; flex-direction: column; gap: 8px; }
.ws-delivery-hint { font-size: 11px; color: var(--muted); line-height: 1.5; }

.ws-lightbox {
  position: fixed;
  inset: 0;
  z-index: 95;
  background: rgba(15, 23, 42, .86);
  backdrop-filter: blur(4px);
  display: flex;
  flex-direction: column;
}
.ws-lightbox-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 18px;
  background: rgba(15, 23, 42, .92);
  border-bottom: 1px solid rgba(255,255,255,.12);
  gap: 12px;
  flex-wrap: wrap;
}
.ws-lightbox-stage { flex: 1; background-color: #f8fafc; }
.ws-panel-quote .quote-card { margin: 0; box-shadow: var(--shadow-sm); }
.ws-frozen-notice {
  margin: 0 auto 8px;
  padding: 9px 14px;
  border-radius: 10px;
  background: #f1f5f9;
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}
.ws-composer.frozen { opacity: .68; background: #f8fafc; }

.hidden { display: none !important; }
