/* Workspace theme: brings the 3D workspace in line with the home page
 * (home.css) - near-black surfaces, 9% hairlines, pill navigation, the
 * yellow gradient accent and a rounded "stage" for the viewport.
 * Loaded after style.css; removing this file restores the previous look.
 * Layout changes are desktop-only (>= 861px); colors apply everywhere. */

:root {
  --bg-main: #09090b;
  --bg-panel: #111114;
  --bg-panel-soft: #0d0d10;
  --bg-hover: rgba(255, 255, 255, 0.06);
  --border-color: rgba(255, 255, 255, 0.09);
  --ws-line: rgba(255, 255, 255, 0.09);
  --ws-line-strong: rgba(255, 255, 255, 0.16);
  --ws-glass: rgba(14, 14, 16, 0.68);
  --ws-accent-2: #fff2b2;
  --ws-accent-ink: #1a1500;
  --ws-ease: cubic-bezier(0.4, 0, 0.2, 1);
}

body { -webkit-font-smoothing: antialiased; }

/* Calm motion: panels, tabs and buttons no longer hop on hover. */
.panel-section:hover,
.stats-card:hover,
.account-status-card:hover,
.scene-summary-card:hover,
.model-info-card:hover,
.model-source-card:hover,
.workspace-tab:hover,
.tool-item:hover,
.tool-item.active,
.icon-btn:hover,
.export-btn.primary:hover,
.export-btn.secondary:hover,
.export-btn.tertiary:hover,
.upgrade-btn:hover,
.upgrade-btn:focus-visible,
.tutorial-btn:hover,
.tutorial-btn:focus-visible {
  transform: none;
}

/* ---------- Header ---------- */
.top-bar {
  background: var(--bg-main);
  border-bottom-color: var(--ws-line);
}
.brand { font-weight: 700; font-size: 16px; letter-spacing: 0.02em; }

.workspace-nav {
  align-self: center;
  gap: 2px;
  padding-left: 14px;
  border-left-color: var(--ws-line);
}
.workspace-tab {
  text-decoration: none;
  height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  font-weight: 500;
  transition: color 0.2s var(--ws-ease), background 0.2s var(--ws-ease);
}
.workspace-tab:hover { background: rgba(255, 255, 255, 0.06); }
.workspace-tab.active { color: var(--text-primary); background: rgba(255, 255, 255, 0.08); }
.workspace-tab.active::after { display: none; }

.credits {
  height: 32px;
  padding: 0 12px;
  border: 1px solid var(--ws-line);
  border-radius: 999px;
}
.credits::before { width: 7px; height: 7px; box-shadow: 0 0 8px rgba(250, 204, 21, 0.7); }
.credits-count { color: var(--text-primary); font-weight: 600; font-size: 14px; font-variant-numeric: tabular-nums; }

/* Upgrade is the one highlighted header action, styled like the home CTA. */
.upgrade-btn {
  border: 0;
  border-radius: 999px;
  background: linear-gradient(86deg, var(--accent-yellow) 5%, var(--ws-accent-2) 106%);
  color: var(--ws-accent-ink);
  font-weight: 600;
  box-shadow: 0 0 0 1px rgba(250, 204, 21, 0.35), 0 8px 24px rgba(250, 204, 21, 0.16);
}
.upgrade-btn:hover,
.upgrade-btn:focus-visible {
  border: 0;
  background: linear-gradient(86deg, var(--accent-yellow) 5%, var(--ws-accent-2) 106%);
  box-shadow: 0 0 0 1px rgba(250, 204, 21, 0.6), 0 10px 30px rgba(250, 204, 21, 0.26);
}

/* Secondary header actions: quiet outlined pills. */
.tutorial-btn,
.referral-btn {
  height: 32px;
  border: 1px solid var(--ws-line);
  border-radius: 999px;
  background: transparent;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0;
  box-shadow: none;
}
.tutorial-btn:hover,
.tutorial-btn:focus-visible,
.referral-btn:hover,
.referral-btn:focus-visible {
  border-color: var(--ws-line-strong);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  box-shadow: none;
  transform: none;
}
.referral-btn::before,
.referral-btn::after { display: none; }
.cs-btn { width: 32px; min-width: 32px; padding: 0; border-radius: 50%; border: 1px solid var(--ws-line); background: transparent; color: var(--text-secondary); }
.cs-btn svg { width: 17px; height: 17px; }
.cs-btn:hover { color: var(--text-primary); border-color: var(--ws-line-strong); background: rgba(255, 255, 255, 0.05); }
.auth-user-btn { border-color: var(--ws-line); }

/* ---------- Announcement ---------- */
.site-announcement {
  height: 32px;
  border-bottom: 1px solid var(--ws-line);
  background: linear-gradient(90deg, rgba(139, 92, 246, 0.14), rgba(139, 92, 246, 0.04) 45%, transparent 75%), var(--bg-main);
}
.site-announcement-text { font-size: 12.5px; line-height: 32px; color: var(--text-secondary); }

/* ---------- Left tool rail ---------- */
.left-toolbar { background: var(--bg-main); border-right-color: var(--ws-line); }
.tool-item { transition: background 0.2s var(--ws-ease), color 0.2s var(--ws-ease); }
.tool-item:hover { background: rgba(255, 255, 255, 0.05); }
.tool-item.active { color: var(--text-primary); }
.tool-item.active svg { color: var(--accent-yellow); }
.tool-item.active::before {
  inset: 2px;
  border-radius: 12px;
  background: rgba(250, 204, 21, 0.08);
  box-shadow: inset 0 0 0 1px rgba(250, 204, 21, 0.18);
}
.tool-item span { font-size: 11px; }

/* ---------- Side panels ---------- */
.right-panel,
.stats-panel { background: var(--bg-panel); }
.right-panel { border-right-color: var(--ws-line); }
.stats-panel { border-left-color: var(--ws-line); }
.panel-header { font-size: 15px; font-weight: 600; border-bottom-color: var(--ws-line); }
.panel-title { font-weight: 600; }

.panel-section,
.stats-card {
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.022);
}
.stats-card { margin: 12px 12px 0; }
.stats-card:last-child { margin-bottom: 12px; }
.stats-card > .panel-title {
  margin-bottom: 12px;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* Inner cards lose their purple/yellow tint so only actions carry color. */
.model-source-card,
.text-image-tool {
  border-color: rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.025);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}
.model-source-card:hover { border-color: rgba(255, 255, 255, 0.14); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04); }

.stats-projects-toggle { color: var(--text-secondary); }
.stats-projects-toggle:hover { color: var(--text-primary); }
.stats-projects-count { background: rgba(255, 255, 255, 0.06); color: var(--text-secondary); }

/* ---------- Viewport: the "stage" ---------- */
.viewport {
  background:
    radial-gradient(circle at var(--vp-glow-x, 50%) var(--vp-glow-y, 58%), rgba(255, 255, 255, 0.07), transparent 30%),
    linear-gradient(180deg, #141417 0%, #19191c 34%, #222226 68%, #2c2c31 100%);
}
/* Dot grid and soft top light, as on the home page stage. */
.viewport::before {
  background:
    radial-gradient(60% 38% at 50% -6%, rgba(250, 204, 21, 0.07), transparent 70%),
    radial-gradient(40% 30% at 22% 0%, rgba(139, 92, 246, 0.06), transparent 70%),
    radial-gradient(rgba(255, 255, 255, 0.07) 1px, transparent 1.2px) 0 0 / 22px 22px;
  -webkit-mask-image: radial-gradient(120% 85% at 50% 0%, #000 35%, transparent 90%);
  mask-image: radial-gradient(120% 85% at 50% 0%, #000 35%, transparent 90%);
}

.viewport-status-card {
  border-color: var(--ws-line);
  border-radius: 12px;
  background: var(--ws-glass);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transition: opacity 0.3s var(--ws-ease);
}
.viewport:not(.has-model) .viewport-status-card { opacity: 0; }

/* Empty state, shown until a model is loaded. Does not take pointer events,
   so dropping a file and orbiting work through it. */
.viewport-empty {
  position: absolute;
  left: 50%;
  top: 44%;
  z-index: 3;
  width: min(440px, calc(100% - 48px));
  transform: translate(-50%, -50%);
  text-align: center;
  pointer-events: none;
  opacity: 1;
  transition: opacity 0.3s var(--ws-ease);
}
.viewport.has-model .viewport-empty,
.viewport-loading.visible ~ .viewport-empty { opacity: 0; }
.viewport-empty-icon {
  display: grid;
  place-items: center;
  width: 76px;
  height: 76px;
  margin: 0 auto 18px;
  border: 1px solid var(--ws-line-strong);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--accent-yellow);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}
.viewport-empty h2 { margin: 0 0 6px; font-size: 18px; font-weight: 600; color: var(--text-primary); }
.viewport-empty p { margin: 0 0 16px; color: var(--text-secondary); font-size: 13px; line-height: 1.6; }
.viewport-empty-keys { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 16px; color: var(--text-muted); font-size: 12px; }
.viewport-empty kbd {
  margin-right: 4px;
  padding: 1px 6px;
  border: 1px solid var(--ws-line-strong);
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: 11px;
}

.view-axis-widget {
  background: var(--ws-glass);
  box-shadow: inset 0 0 0 1px var(--ws-line), 0 12px 28px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

/* ---------- Right toolbar (view and model controls) ---------- */
.gizmo-toolbar {
  gap: 4px;
  padding: 6px;
  border-color: var(--ws-line);
  background: var(--ws-glass);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
}
.gizmo-btn {
  position: relative;
  transition: background 0.2s var(--ws-ease), color 0.2s var(--ws-ease), box-shadow 0.2s var(--ws-ease);
}
.gizmo-btn:hover { background: rgba(255, 255, 255, 0.07); color: var(--text-primary); }
/* Active mode: a soft yellow fill only (a ring would stack with the
   circular browse icon into a target). */
.gizmo-btn.active {
  background: rgba(250, 204, 21, 0.14);
  color: var(--accent-yellow);
  box-shadow: none;
}
.gizmo-btn-toggle.active {
  background: rgba(250, 204, 21, 0.14);
  color: var(--accent-yellow);
  box-shadow: none;
}
/* Divider between the model modes and the view utilities. */
.gizmo-btn-toggle { margin-top: 9px; }
.gizmo-btn-toggle::before {
  content: "";
  position: absolute;
  top: -7px;
  left: 8px;
  right: 8px;
  height: 1px;
  background: var(--ws-line-strong);
}
/* Labels appear beside the buttons instead of the slow native tooltip. */
.gizmo-btn[aria-label]::after {
  content: attr(aria-label);
  position: absolute;
  right: calc(100% + 12px);
  top: 50%;
  padding: 5px 10px;
  border: 1px solid var(--ws-line);
  border-radius: 8px;
  background: rgba(14, 14, 16, 0.92);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
  opacity: 0;
  transform: translate(4px, -50%);
  transition: opacity 0.16s var(--ws-ease), transform 0.16s var(--ws-ease);
  pointer-events: none;
}
.gizmo-btn[aria-label]:hover::after,
.gizmo-btn[aria-label]:focus-visible::after {
  opacity: 1;
  transform: translate(0, -50%);
}
.gizmo-btn[aria-label=""]::after { display: none; }

/* ---------- Save dock and export bar ---------- */
.studio-save-dock,
.bottom-toolbar {
  border-color: var(--ws-line);
  background: var(--ws-glass);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
}
.bottom-toolbar { box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.04); }
.bottom-toolbar:hover { border-color: var(--ws-line-strong); }
.studio-save-dock { border-radius: 999px; }
.studio-save-dock .project-name { border-radius: 999px; background: transparent; border-color: transparent; font-weight: 500; }
.studio-save-dock .project-name:focus { border-color: var(--ws-line-strong); outline: none; }
.save-project-btn,
.studio-save-dock .save-project-btn {
  border: 0;
  border-radius: 999px;
  background: #f4f4f5;
  color: #111;
  font-weight: 600;
}
.save-project-btn:hover,
.save-project-btn:active { background: #fff; }

/* Exports: one look for every file; "All Files" is the highlighted action. */
.export-btn.primary,
.export-btn.secondary {
  border: 1px solid var(--ws-line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-primary);
}
.export-btn.primary:hover,
.export-btn.secondary:hover {
  border-color: var(--ws-line-strong);
  background: rgba(255, 255, 255, 0.09);
  box-shadow: none;
}
.export-btn.tertiary {
  border: 0;
  background: linear-gradient(86deg, var(--accent-yellow) 5%, var(--ws-accent-2) 106%);
  color: var(--ws-accent-ink);
  font-weight: 600;
  box-shadow: 0 0 0 1px rgba(250, 204, 21, 0.35), 0 8px 24px rgba(250, 204, 21, 0.16);
}
.export-btn.tertiary:hover {
  border: 0;
  background: linear-gradient(86deg, var(--accent-yellow) 5%, var(--ws-accent-2) 106%);
  box-shadow: 0 0 0 1px rgba(250, 204, 21, 0.6), 0 10px 30px rgba(250, 204, 21, 0.26);
}
/* Credit badges on the neutral export buttons: light text on a soft yellow
   pill (style.css still had dark text from when these buttons were yellow). */
.export-btn .credit-badge-inline,
.export-btn.primary .credit-badge-inline,
.export-btn.secondary .credit-badge-inline { background: rgba(250, 204, 21, 0.14); color: #fde68a; font-weight: 600; }
.export-btn.tertiary .credit-badge-inline { background: rgba(26, 21, 0, 0.12); color: var(--ws-accent-ink); }

.site-footer { background: var(--bg-main); border-top-color: var(--ws-line); }

/* style.css also uses --border-color as a fill; keep those visible. */
.right-panel::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.14); }
.toolbar-divider { background: var(--ws-line-strong); }

/* ---------- Right panel: account, model, scene, library ---------- */
.stats-user-info { margin-bottom: 10px; }
.stats-user-avatar {
  background: radial-gradient(circle at 35% 30%, #3f3f48, #1b1b20);
  box-shadow: inset 0 0 0 1px var(--ws-line-strong);
  font-size: 14px;
  font-weight: 700;
}
.stats-user-name { font-weight: 600; }
#statsLoginBtn {
  min-height: 36px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(86deg, var(--accent-yellow) 5%, var(--ws-accent-2) 106%);
  color: var(--ws-accent-ink);
  font-weight: 600;
  box-shadow: 0 0 0 1px rgba(250, 204, 21, 0.35), 0 8px 24px rgba(250, 204, 21, 0.14);
}
#statsLoginBtn:hover { color: var(--ws-accent-ink); box-shadow: 0 0 0 1px rgba(250, 204, 21, 0.6), 0 10px 30px rgba(250, 204, 21, 0.24); }
#statsEditProfileBtn,
#statsLogoutBtn {
  min-height: 30px;
  margin: 0;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
}
.stats-quota-header strong { color: var(--text-primary); font-variant-numeric: tabular-nums; }
.quota-bar { height: 4px; background: rgba(255, 255, 255, 0.08); }
.key-input-group input {
  border-color: var(--ws-line);
  background: rgba(255, 255, 255, 0.035);
  font-family: var(--font-mono);
  letter-spacing: 0.04em;
}
.key-input-group input:focus { border-color: rgba(250, 204, 21, 0.6); }
.key-input-group button,
#activate-btn {
  border-radius: 999px;
  background: linear-gradient(86deg, var(--accent-yellow) 5%, var(--ws-accent-2) 106%);
  color: var(--ws-accent-ink);
  font-weight: 600;
}
.key-input-group button:hover { background: linear-gradient(86deg, var(--accent-yellow) 5%, var(--ws-accent-2) 106%); filter: brightness(1.05); }

/* Model info as tiles: file name, vertices | triangles, X | Y | Z, overall size. */
#modelInfo {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 6px;
}
#modelInfo .info-item {
  grid-column: span 6;
  padding: 0 0 8px;
  border-bottom: 1px solid var(--ws-line);
}
#modelInfo .info-item:nth-child(2),
#modelInfo .info-item:nth-child(3) { grid-column: span 3; }
#modelInfo .info-item:nth-child(4),
#modelInfo .info-item:nth-child(5),
#modelInfo .info-item:nth-child(6) { grid-column: span 2; }
#modelInfo .info-item:nth-child(n+2):nth-child(-n+6) {
  flex-direction: column;
  gap: 2px;
  padding: 8px 10px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.025);
}
#modelInfo .info-item:nth-child(n+2):nth-child(-n+6) .info-label { font-size: 11px; color: var(--text-muted); }
#modelInfo .info-item:nth-child(n+2):nth-child(-n+6) .info-value { text-align: left; font-size: 14px; }
#modelInfo .info-item:last-child { padding: 8px 0 0; border-bottom: 0; }
.info-value { font-weight: 600; font-variant-numeric: tabular-nums; }
.summary-badge { border-radius: 999px; }

/* Library: only for signed-in users; list rows instead of stacked dividers. */
.stats-library-card { display: none; }
.stats-panel.is-signed-in .stats-library-card { display: block; }
.stats-library-card .stats-projects {
  margin-top: 0 !important;
  padding-top: 0 !important;
  border-top: 0 !important;
}
.stats-library-card .stats-projects + .stats-projects { border-top: 1px solid var(--ws-line) !important; }
.stats-library-card .stats-projects-toggle {
  min-height: 40px;
  padding: 0;
  color: var(--text-secondary);
  font-size: 13px;
}
.stats-library-card .stats-projects-toggle:hover { color: var(--text-primary); }
.stats-library-card .stats-projects-count { margin-left: auto; }
.stats-library-card .stats-projects-arrow { margin-left: 4px; }
.stats-library-card .stats-projects-hints { margin: 0 0 10px; }
.stats-library-card .stats-projects-arrow { color: var(--text-muted); transition: transform 0.2s var(--ws-ease), color 0.2s var(--ws-ease); }
.stats-library-card .stats-projects-arrow.open { color: var(--text-primary); }
.stats-projects-hint { border-radius: 999px; font-size: 11px; font-weight: 600; }

/* Expanded lists: one flat item style for projects, submissions and custom
   orders; a thin scrollbar instead of the native one. */
.stats-library-card .stats-projects-list {
  max-height: 380px;
  margin: 0 0 12px;
  padding-right: 4px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.16) transparent;
}
.stats-library-card .stats-projects-list::-webkit-scrollbar { width: 4px; }
.stats-library-card .stats-projects-list::-webkit-scrollbar-thumb { border: 0; border-radius: 4px; background: rgba(255, 255, 255, 0.16); box-shadow: none; }
.stats-library-card .stats-projects-list::-webkit-scrollbar-track { background: transparent; }
.stats-library-card .project-grid,
.stats-library-card .creative-submission-side-list,
.stats-library-card .fc-order-list { display: grid; grid-template-columns: 1fr; gap: 8px; }

.stats-library-card .project-card,
.stats-library-card .creative-submission-side-card,
.stats-library-card .co-side-card {
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.025);
  box-shadow: none;
  transition: border-color 0.2s var(--ws-ease), background 0.2s var(--ws-ease);
}
.stats-library-card .project-card:hover,
.stats-library-card .creative-submission-side-card:hover,
.stats-library-card .co-side-card:hover,
.stats-library-card .co-side-card:focus-visible {
  border-color: var(--ws-line-strong);
  background: rgba(255, 255, 255, 0.04);
  box-shadow: none;
  transform: none;
}
.stats-library-card .project-card::before,
.stats-library-card .project-card::after,
.stats-library-card .co-side-card::before,
.stats-library-card .co-side-card::after { display: none; }

/* Small pill actions shared by all three lists. */
.stats-library-card .project-item-btn,
.stats-library-card .co-side-btn {
  width: auto;
  min-height: 28px;
  padding: 0 11px;
  border: 1px solid var(--ws-line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-primary);
  font-size: 12px;
  font-weight: 500;
  transform: none;
}
.stats-library-card .project-item-btn:hover,
.stats-library-card .co-side-btn:hover,
.stats-library-card .co-side-btn:focus-visible {
  border-color: var(--ws-line-strong);
  background: rgba(255, 255, 255, 0.09);
  transform: none;
}
.stats-library-card .project-item-btn.danger,
.stats-library-card .co-side-btn.fc-del-btn { border-color: transparent; background: transparent; color: #f87171; }
.stats-library-card .project-item-btn.danger:hover,
.stats-library-card .co-side-btn.fc-del-btn:hover { border-color: rgba(248, 113, 113, 0.3); background: rgba(248, 113, 113, 0.08); }
.stats-library-card .co-side-btn.co-side-reject { border-color: transparent; background: transparent; color: #f87171; }
.stats-library-card .co-side-btn.co-side-reject:hover { border-color: rgba(248, 113, 113, 0.3); background: rgba(248, 113, 113, 0.08); }
/* The next step in an order (accept the quote, download the result) is the one yellow action. */
.stats-library-card .co-side-btn.co-side-confirm,
.stats-library-card .co-side-btn.co-side-dl {
  border-color: transparent;
  background: linear-gradient(86deg, var(--accent-yellow) 5%, var(--ws-accent-2) 106%);
  color: var(--ws-accent-ink);
  font-weight: 600;
}
.stats-library-card .co-side-btn.co-side-confirm:hover,
.stats-library-card .co-side-btn.co-side-dl:hover { border-color: transparent; background: linear-gradient(86deg, var(--accent-yellow) 5%, var(--ws-accent-2) 106%); filter: brightness(1.05); }
.stats-library-card .co-side-footer { flex-wrap: wrap; gap: 4px 12px; }
.stats-library-card .co-side-time { color: var(--text-muted); }
.stats-library-card .project-card-actions,
.stats-library-card .co-side-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
  padding-top: 0;
  border-top: 0;
}

/* Projects: thumbnail left, details right. */
.stats-library-card .project-card { display: grid; grid-template-columns: 64px minmax(0, 1fr); column-gap: 12px; row-gap: 0; align-content: start; padding: 10px; overflow: hidden; }
/* The body's children join the card grid so the actions can span the full width under the thumbnail. */
.stats-library-card .project-card-body { display: contents; }
.stats-library-card .project-card-thumb { grid-row: 1 / span 3; }
.stats-library-card .project-card-name,
.stats-library-card .project-card-statusline,
.stats-library-card .project-card-meta { grid-column: 2; }
.stats-library-card .project-card .project-card-actions { grid-column: 1 / -1; }
.stats-library-card .project-card-thumb { width: 64px; height: 64px; border-radius: 8px; background: rgba(255, 255, 255, 0.04); }
.stats-library-card .project-card-noimg { font-size: 13px; font-weight: 700; color: var(--text-muted); }
.stats-library-card .project-card-name {
  display: block;
  min-height: 0;
  margin: 2px 0 4px;
  overflow: hidden;
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.stats-library-card .project-card-statusline { margin-bottom: 4px; }
.stats-library-card .project-card-meta { display: flex; flex-wrap: wrap; gap: 2px 12px; margin: 0; }
.stats-library-card .project-card-meta-item,
.stats-library-card .project-card-meta-item--expiry {
  min-height: 0;
  padding: 0;
  gap: 4px;
  border: 0;
  border-radius: 0;
  background: none;
}
.stats-library-card .project-card.project-card-warning .project-card-meta-item--expiry,
.stats-library-card .project-card.project-card-expired .project-card-meta-item--expiry { border: 0; background: none; }
.stats-library-card .project-card-meta-label { color: var(--text-muted); font-size: 11px; font-weight: 500; letter-spacing: 0; }
.stats-library-card .project-card-meta-value { color: var(--text-secondary); font-size: 11px; font-weight: 600; }
.stats-library-card .project-card-meta-value.project-expiry { color: var(--text-secondary); }
.stats-library-card .project-card-warning .project-expiry { color: #fbbf24; }
.stats-library-card .project-card-expired .project-expiry { color: #f87171; }
.stats-library-card .project-card-warning { border-color: rgba(251, 191, 36, 0.25); }
.stats-library-card .project-card-expired { border-color: rgba(248, 113, 113, 0.25); }

/* Submissions: title, then status / date / size on one line, then actions. */
.stats-library-card .creative-submission-side-card { display: flex; flex-wrap: wrap; align-items: center; column-gap: 10px; padding: 12px; }
.stats-library-card .creative-submission-side-title {
  flex: 0 0 100%;
  display: -webkit-box;
  overflow: hidden;
  margin-bottom: 8px;
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.stats-library-card .creative-submission-side-meta { margin: 0; gap: 10px; color: var(--text-muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.stats-library-card .creative-submission-status { min-height: 20px; padding: 0 8px; font-size: 11px; font-weight: 600; }
.stats-library-card .creative-submission-side-note { flex: 0 0 100%; }
.stats-library-card .creative-submission-card-actions { flex: 0 0 100%; }
.stats-library-card .creative-submission-card-actions .project-item-btn { width: auto; }

/* Custom orders */
.stats-library-card .co-side-card { padding: 12px; }
.stats-library-card .co-side-top { margin-bottom: 8px; }
.stats-library-card .co-side-type,
.stats-library-card .co-side-status { min-height: 22px; padding: 0 9px; font-size: 11px; font-weight: 600; letter-spacing: 0; box-shadow: none; }
.stats-library-card .co-side-name { font-size: 13px; font-weight: 600; }
.stats-library-card .co-side-chip { border-radius: 999px; font-size: 11px; font-weight: 500; }
.stats-library-card .co-side-desc { color: var(--text-secondary); font-size: 12px; }
.stats-library-card .co-side-footer { border-top: 1px solid var(--ws-line); }

/* Empty states: a short centered message, not a promo card. */
.stats-library-card .project-empty,
.stats-library-card .fc-order-empty {
  padding: 16px 12px 18px;
  border: 1px dashed rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  background: none;
  box-shadow: none;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
  text-align: center;
}
.stats-library-card .project-empty::before { display: none; }
.stats-library-card .project-empty-badge { display: none; }
.stats-library-card .project-empty-title { margin: 0 0 4px; color: var(--text-primary); font-size: 13px; font-weight: 600; }
.stats-library-card .project-empty-desc,
.stats-library-card .fc-order-empty span { margin: 4px 0 0; color: var(--text-muted); font-size: 12px; font-weight: 400; line-height: 1.55; }
.stats-library-card .project-empty-btn {
  min-width: 0;
  min-height: 30px;
  margin-top: 12px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  background: #f4f4f5;
  color: #111;
  font-size: 12px;
  font-weight: 600;
  box-shadow: none;
}
.stats-library-card .project-empty-btn:hover { background: #fff; }

/* ---------- Tool panels ---------- */
.panel-title { font-size: 14px; }
.param-label { color: var(--text-secondary); }

/* Selected tabs and modes: a neutral raised surface, not a color. */
.model-source-tab:hover { transform: none; }
.model-source-tab.active {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.1);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08), 0 4px 14px rgba(0, 0, 0, 0.25);
  transform: none;
}
.model-source-tab.active .model-source-icon { background: rgba(250, 204, 21, 0.14); color: var(--accent-yellow); }
.lwm-mode-tab.active,
.text-image-workflow-tab.active,
.image-source-tab.active,
.image-input-mode-btn.active,
.mode-btn.active {
  border-color: rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 4px 14px rgba(0, 0, 0, 0.22);
}
.mode-btn:hover { border-color: var(--ws-line-strong); }

/* Upload zones */
.upload-zone {
  border: 1.5px dashed rgba(255, 255, 255, 0.14);
  border-radius: 14px;
  background: radial-gradient(120% 90% at 50% 0%, rgba(250, 204, 21, 0.05), transparent 60%), rgba(255, 255, 255, 0.015);
}
.upload-zone:hover { border-color: rgba(250, 204, 21, 0.45); background: radial-gradient(120% 90% at 50% 0%, rgba(250, 204, 21, 0.08), transparent 60%), rgba(255, 255, 255, 0.02); }
.upload-zone svg { color: var(--accent-yellow); }
.upload-btn {
  border-color: var(--ws-line-strong);
  color: var(--text-primary);
  font-weight: 600;
}
.upload-btn:hover { background: #f4f4f5; color: #111; box-shadow: none; transform: none; }

/* Buttons inside panels: neutral; hover stays neutral too. */
.inline-action {
  border-color: var(--ws-line);
  background: rgba(255, 255, 255, 0.03);
  font-weight: 600;
}
.inline-action:hover {
  border-color: var(--ws-line-strong);
  background: rgba(255, 255, 255, 0.07);
  color: var(--text-primary);
  transform: none;
}
.inline-action.accent {
  border-color: rgba(250, 204, 21, 0.35);
  background: rgba(250, 204, 21, 0.06);
  color: #fde68a;
}
.inline-action.accent:hover { border-color: rgba(250, 204, 21, 0.6); background: rgba(250, 204, 21, 0.12); color: #fef3c7; }
.text-image-btn { border-color: var(--ws-line); font-weight: 600; }
.text-image-btn:hover { border-color: var(--ws-line-strong); background: rgba(255, 255, 255, 0.07); color: var(--text-primary); transform: none; }
/* Generate: the panel's primary action, styled like the home CTA. */
.text-image-btn-primary,
.text-image-btn-primary:hover {
  border: 0;
  border-radius: 999px;
  background: linear-gradient(86deg, var(--accent-yellow) 5%, var(--ws-accent-2) 106%);
  color: var(--ws-accent-ink);
  box-shadow: 0 0 0 1px rgba(250, 204, 21, 0.35), 0 8px 24px rgba(250, 204, 21, 0.14);
}
.text-image-btn-primary:hover { box-shadow: 0 0 0 1px rgba(250, 204, 21, 0.6), 0 10px 30px rgba(250, 204, 21, 0.24); }
.text-image-btn-primary .credit-badge-inline,
.text-image-btn-primary:hover .credit-badge-inline { background: rgba(26, 21, 0, 0.12); color: var(--ws-accent-ink); }

/* Inputs */
.param-number,
.param-select,
.dimension-input,
.stepper-input {
  border-color: var(--ws-line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
  font-variant-numeric: tabular-nums;
  transition: border-color 0.16s var(--ws-ease), box-shadow 0.16s var(--ws-ease);
}
.param-number:focus,
.param-select:focus,
.dimension-input:focus,
.stepper-input:focus {
  border-color: rgba(250, 204, 21, 0.6);
  box-shadow: 0 0 0 3px rgba(250, 204, 21, 0.1);
  outline: none;
}
.stepper-input { font-family: var(--font-mono); font-size: 12px; }
.stepper-btn { border-color: var(--ws-line); border-radius: 8px; background: rgba(255, 255, 255, 0.035); }
.stepper-btn:hover { background: rgba(255, 255, 255, 0.08); }
.quick-btn { border-color: var(--ws-line); border-radius: 6px; }
select, select option { background: #16161a; }

input[type="range"] { height: 4px; background: rgba(255, 255, 255, 0.14); }
input[type="range"]::-webkit-slider-thumb {
  width: 14px;
  height: 14px;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(250, 204, 21, 0.45), 0 2px 6px rgba(0, 0, 0, 0.4);
}
input[type="range"]::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border: 0;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(250, 204, 21, 0.45), 0 2px 6px rgba(0, 0, 0, 0.4);
}

.param-check input[type="checkbox"] { background: rgba(255, 255, 255, 0.16); }
.param-check input[type="checkbox"]:checked { background: var(--accent-yellow); }
.param-check input[type="checkbox"]:checked::after { background: var(--ws-accent-ink); }

.param-subpanel { border-color: rgba(255, 255, 255, 0.06); border-radius: 12px; background: rgba(255, 255, 255, 0.02); }
input[type="checkbox"] { accent-color: var(--accent-yellow); }

/* Submit buttons (Generate directly, Submit request, sign-in forms):
   the home CTA instead of red. */
.auth-submit-btn {
  border-radius: 999px;
  background: linear-gradient(86deg, var(--accent-yellow) 5%, var(--ws-accent-2) 106%);
  color: var(--ws-accent-ink);
  letter-spacing: 0;
  box-shadow: 0 0 0 1px rgba(250, 204, 21, 0.35), 0 8px 24px rgba(250, 204, 21, 0.14);
}
.auth-submit-btn:hover {
  transform: none;
  box-shadow: 0 0 0 1px rgba(250, 204, 21, 0.6), 0 10px 30px rgba(250, 204, 21, 0.26);
}
.auth-submit-btn.custom-request-submit { border-radius: 16px; }
.custom-submit-cost { opacity: 0.72; font-weight: 500; }

/* ---------- Generation overlay (queue / progress) ---------- */
.viewport-loading { gap: 10px; padding: 24px; background: rgba(5, 5, 6, 0.66); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
.viewport-loading .loading-title { font-size: 18px; font-weight: 600; }
.viewport-loading .loading-desc { max-width: 360px; color: var(--text-secondary); }
.loading-wait-ring { width: 92px; height: 92px; }
.loading-wait-ring svg { width: 92px; height: 92px; }
/* With progress: a filling arc plus a short segment that keeps turning. */
.loading-wait-ring { order: -1; }
.loading-status-icon:empty { display: none; }
.loading-wait-ring.has-progress .wait-ring-arc { stroke-dasharray: 30 184; opacity: 0.5; animation-duration: 1.4s; }
/* Queue (no percentage yet): a single turning segment around the position. */
.loading-wait-ring.is-spin:not(.has-progress) .wait-ring-arc { stroke-dasharray: 46 168; animation-duration: 1.6s; }
.wait-ring-progress { transition: stroke-dashoffset 0.6s var(--ws-ease); filter: drop-shadow(0 0 6px rgba(250, 204, 21, 0.45)); }
.loading-wait-ring:not(.has-progress) .wait-ring-progress { display: none; }
.wait-elapsed { color: var(--text-primary); font-family: var(--font-sans); font-size: 20px; font-weight: 700; font-variant-numeric: tabular-nums; }
.loading-steps {
  display: grid;
  gap: 6px;
  width: min(320px, 100%);
  margin: 4px 0 0;
  padding: 12px 14px;
  border: 1px solid var(--ws-line);
  border-radius: 12px;
  background: rgba(14, 14, 16, 0.6);
  list-style: none;
}
.loading-step { position: relative; padding-left: 24px; color: var(--text-muted); font-size: 13px; line-height: 1.5; }
.loading-step::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.45em;
  width: 10px;
  height: 10px;
  border: 1.5px solid currentColor;
  border-radius: 50%;
  box-sizing: border-box;
}
.loading-step.is-done { color: var(--text-secondary); }
.loading-step.is-done::before { width: 10px; height: 6px; top: 0.4em; border: 0; border-left: 2px solid #4ade80; border-bottom: 2px solid #4ade80; border-radius: 0; transform: rotate(-45deg); }
.loading-step.is-active { color: var(--text-primary); font-weight: 600; }
.loading-step.is-active::before { border-color: var(--accent-yellow); border-top-color: transparent; animation: ring-spin 0.9s linear infinite; }
.loading-note {
  max-width: 360px;
  margin: 2px 0 0;
  padding: 8px 12px;
  border: 1px solid rgba(250, 204, 21, 0.25);
  border-radius: 10px;
  background: rgba(250, 204, 21, 0.07);
  color: #fde68a;
  font-size: 12.5px;
  line-height: 1.55;
  text-align: center;
}
.loading-tip { max-width: 360px; margin: 0; color: var(--text-muted); font-size: 12px; line-height: 1.55; text-align: center; }
.loading-tip a { color: var(--accent-yellow); font-weight: 600; text-decoration: none; }
.loading-tip a:hover { text-decoration: underline; }
.loading-steps[hidden],
.loading-note[hidden],
.loading-tip[hidden] { display: none; }
.loading-close-btn { border-radius: 999px; border-color: var(--ws-line-strong); font-weight: 600; box-shadow: none; }
.loading-close-btn:hover { border-color: var(--ws-line-strong); background: rgba(255, 255, 255, 0.12); color: var(--text-primary); }

/* ---------- Lite Mold preview controls ---------- */
.lite-mold-preview-controls {
  top: 150px;
  bottom: auto;
  left: 14px;
  width: 210px;
  min-height: 0;
  align-items: stretch;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--ws-line);
  border-radius: 16px;
  background: var(--ws-glass);
  color: var(--text-secondary);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  transform: none;
}
.lite-mold-preview-title {
  max-width: none;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-align: left;
  text-transform: uppercase;
}
.lite-mold-preview-row { display: flex; align-items: center; justify-content: space-between; }
/* Mold kit / Original switch: both stay loaded, this only changes what is shown. */
.lite-mold-preview-switch { display: grid; grid-template-columns: 1fr 1fr; gap: 3px; padding: 3px; border: 1px solid var(--ws-line); border-radius: 999px; background: rgba(255, 255, 255, 0.03); }
.lite-mold-preview-controls .lite-mold-preview-switch button { min-height: 28px; border: 0; background: transparent; color: var(--text-secondary); }
.lite-mold-preview-controls .lite-mold-preview-switch button:hover:not(.is-active) { background: rgba(255, 255, 255, 0.05); color: var(--text-primary); }
.lite-mold-preview-controls .lite-mold-preview-switch button.is-active {
  background: rgba(255, 255, 255, 0.12);
  color: var(--text-primary);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 2px 8px rgba(0, 0, 0, 0.3);
}
.lite-mold-preview-controls input:disabled { opacity: 0.35; }
.lite-mold-preview-controls label { color: var(--text-primary); font-size: 13px; font-weight: 500; }
.lite-mold-preview-controls output { color: var(--accent-yellow); font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; }
.lite-mold-preview-controls input {
  width: 100%;
  height: 4px;
  margin: 4px 0;
  writing-mode: horizontal-tb;
  direction: ltr;
}
.lite-mold-preview-actions { display: flex; gap: 6px; }
.lite-mold-preview-controls button {
  flex: 1;
  min-height: 30px;
  padding: 0 8px;
  white-space: nowrap;
  border-color: var(--ws-line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  font-size: 12px;
  font-weight: 600;
}
.lite-mold-preview-controls button:hover:not(:disabled) { border-color: var(--ws-line-strong); background: rgba(255, 255, 255, 0.1); }
.lite-mold-preview-controls button:disabled { opacity: 0.4; cursor: default; }
.lite-mold-preview-controls button.is-quiet { border-color: transparent; background: transparent; color: var(--text-muted); }
.lite-mold-preview-controls button.is-quiet:hover { color: var(--text-primary); background: rgba(255, 255, 255, 0.06); }
/* style.css 在小屏上把旧的竖条改成居中的横条；这里让卡片保持竖排，
   宽度留出右侧工具栏的位置。 */
@media (max-width: 860px), (max-height: 680px) {
  .lite-mold-preview-controls {
    top: 132px;
    bottom: auto;
    left: 12px;
    flex-direction: column;
    width: min(200px, calc(100% - 92px));
    gap: 8px;
    padding: 12px;
    border-radius: 14px;
    transform: none;
  }
  .lite-mold-preview-title { white-space: normal; }
  .lite-mold-preview-controls input { width: 100%; }
}

/* ---------- Image to 3D panel ---------- */
/* Upload areas: the same dashed card as the Model upload, no purple. */
#panelImageTo3D .image-upload-zone,
.multiview-card {
  border: 1.5px dashed rgba(255, 255, 255, 0.14);
  border-radius: 14px;
  background: radial-gradient(120% 90% at 50% 0%, rgba(250, 204, 21, 0.05), transparent 60%), rgba(255, 255, 255, 0.015);
  box-shadow: none;
}
#panelImageTo3D .image-upload-zone:hover,
.multiview-card:hover { border-color: rgba(250, 204, 21, 0.45); background: radial-gradient(120% 90% at 50% 0%, rgba(250, 204, 21, 0.08), transparent 60%), rgba(255, 255, 255, 0.02); }
#panelImageTo3D .image-upload-zone svg { color: var(--accent-yellow); }
#panelImageTo3D .image-upload-zone p { font-size: 14px; font-weight: 600; }
#panelImageTo3D .image-upload-zone small { color: var(--text-muted); }
#panelImageTo3D .upload-btn { border-color: var(--ws-line-strong); color: var(--text-primary); font-weight: 600; }
#panelImageTo3D .upload-btn:hover,
#panelImageTo3D .upload-btn:focus-visible,
#panelImageTo3D .upload-btn:active { background: #f4f4f5; color: #111; }
#panelImageTo3D .image-upload-zone:hover .upload-btn:not(:hover):not(:focus-visible):not(:active) { background: transparent; color: var(--text-primary); }

/* Multi-view: one front slot plus three side slots, labelled with small pills. */
.multiview-card { min-height: 0; }
.multiview-slot-main,
.mv-slot-front { min-height: 150px; gap: 8px; }
.multiview-slot-row { min-height: 88px; border-top: 1px dashed rgba(255, 255, 255, 0.1); }
.multiview-slot + .multiview-slot { border-left: 1px dashed rgba(255, 255, 255, 0.1); }
.multiview-slot:hover,
.mv-slot.drag-over { background: rgba(250, 204, 21, 0.05); box-shadow: inset 0 0 0 1px rgba(250, 204, 21, 0.35); }
.mv-slot-front::before {
  content: "";
  width: 24px;
  height: 24px;
  background: var(--accent-yellow);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 15V4M7 9l5-5 5 5M4 15v3a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-3'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 15V4M7 9l5-5 5 5M4 15v3a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-3'/%3E%3C/svg%3E") center / contain no-repeat;
}
.mv-slot.filled::before { display: none; }
.mv-slot-label,
.mv-slot-front .mv-slot-label {
  width: auto;
  height: 24px;
  padding: 0 10px;
  border: 1px solid var(--ws-line-strong);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0;
}
.mv-slot-front .mv-slot-label { height: 26px; padding: 0 14px; border-color: rgba(250, 204, 21, 0.45); background: rgba(250, 204, 21, 0.1); color: #fde68a; font-size: 13px; }
.mv-slot-hint { color: var(--text-muted); font-size: 11px; font-weight: 400; }
.mv-slot.filled .mv-slot-label { width: auto; height: 22px; padding: 0 8px; border-radius: 999px; border-color: rgba(255, 255, 255, 0.2); background: rgba(0, 0, 0, 0.6); font-size: 11px; }
/* style.css sizes the labels again inside the model card (ID-level selectors). */
.model-source-card #panelImageTo3D .mv-slot-label { width: auto; height: 24px; padding: 0 10px; font-size: 12px; }
.model-source-card #panelImageTo3D .mv-slot-front .mv-slot-label { width: auto; height: 26px; padding: 0 14px; font-size: 13px; }
.model-source-card #panelImageTo3D .mv-slot.filled .mv-slot-label { height: 22px; padding: 0 8px; font-size: 11px; }
.model-source-card #panelImageTo3D .mv-slot-hint { font-size: 10.5px; }
.model-source-card #panelImageTo3D .mv-slot-front::before { width: 20px; height: 20px; }
.mv-slot.missing { box-shadow: inset 0 0 0 1px rgba(248, 113, 113, 0.7); }
.multiview-cost-note { color: var(--text-muted); }
.multiview-cost-note strong,
.multiview-cost-value { color: var(--accent-yellow); }
.preview-switch-btn { border-radius: 999px; color: var(--text-secondary); }
.preview-switch-btn:hover { background: rgba(255, 255, 255, 0.07); color: var(--text-primary); }

/* Generation settings: a neutral list; the chosen model gets a yellow edge. */
#panelImageTo3D .image-mode-header > span { color: var(--text-primary); font-weight: 600; }
#panelImageTo3D .image-mode-more { color: var(--text-secondary); font-weight: 500; }
#panelImageTo3D .image-mode-more:hover { color: var(--text-primary); }
#panelImageTo3D .image-mode-options { border-color: var(--ws-line); border-radius: 12px; background: rgba(255, 255, 255, 0.02); }
#panelImageTo3D .image-mode-option + .image-mode-option { border-top-color: var(--ws-line); }
#panelImageTo3D .image-mode-option { min-height: 56px; }
#panelImageTo3D .image-mode-option:hover { background: rgba(255, 255, 255, 0.04); }
#panelImageTo3D .image-mode-option.active { background: rgba(250, 204, 21, 0.06); box-shadow: inset 2px 0 0 var(--accent-yellow); }
#panelImageTo3D .image-mode-selected { min-height: 60px; border-color: var(--ws-line); border-radius: 12px; background: rgba(255, 255, 255, 0.025); }
#panelImageTo3D .image-mode-selected:hover { border-color: var(--ws-line-strong); background: rgba(255, 255, 255, 0.045); }
#panelImageTo3D .image-mode-icon,
#panelImageTo3D .image-mode-icon-good,
#panelImageTo3D .image-mode-icon-balance,
#panelImageTo3D .image-mode-icon-fast {
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-secondary);
  font-size: 15px;
  font-weight: 600;
}
#panelImageTo3D .image-mode-option.active .image-mode-icon,
#panelImageTo3D .image-mode-selected .image-mode-icon { background: rgba(250, 204, 21, 0.14); color: var(--accent-yellow); }
#panelImageTo3D .image-mode-title { font-weight: 600; }
#panelImageTo3D .image-mode-desc { color: var(--text-muted); font-weight: 500; }
#panelImageTo3D .image-mode-option.active .image-mode-desc,
#panelImageTo3D .image-mode-selected .image-mode-desc { color: #fde68a; }
#panelImageTo3D .image-mode-selected-arrow { color: var(--text-muted); }

/* Status, confirmation, generate. */
#image3DStatus { margin: 0 0 10px; padding: 10px 12px; border: 1px solid rgba(96, 165, 250, 0.25); border-radius: 10px; background: rgba(59, 130, 246, 0.1); color: #bfdbfe; font-size: 12.5px; text-align: center; }
#image3DStatus[data-tone="done"] { border-color: rgba(74, 222, 128, 0.25); background: rgba(34, 197, 94, 0.1); color: #bbf7d0; }
#image3DStatus[data-tone="fail"] { border-color: rgba(248, 113, 113, 0.3); background: rgba(239, 68, 68, 0.1); color: #fecaca; }
#image3DConfirm { margin: 0 0 10px; padding: 12px; border: 1px solid var(--ws-line); border-radius: 12px; background: rgba(255, 255, 255, 0.03); text-align: center; }
#image3DConfirm p { margin: 0 0 10px; color: var(--text-secondary); font-size: 13px; }
#image3DConfirm .inline-action { width: auto; min-height: 32px; padding: 0 16px; border-radius: 999px; }
#panelImageTo3D #btnGenerateFromImage {
  min-height: 40px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(86deg, var(--accent-yellow) 5%, var(--ws-accent-2) 106%);
  color: var(--ws-accent-ink);
  font-weight: 600;
  box-shadow: 0 0 0 1px rgba(250, 204, 21, 0.35), 0 8px 24px rgba(250, 204, 21, 0.14);
}
#panelImageTo3D #btnGenerateFromImage:hover { color: var(--ws-accent-ink); box-shadow: 0 0 0 1px rgba(250, 204, 21, 0.6), 0 10px 30px rgba(250, 204, 21, 0.24); }
#panelImageTo3D #btnGenerateFromImage:disabled { opacity: 0.55; }
#panelImageTo3D #btnDownloadImage3D { border-radius: 999px; }
.image3d-footnote { margin: 10px 0 0; color: var(--text-muted); font-size: 11px; text-align: center; }

/* Sign-in, profile and pricing dialogs: brand accent instead of red.
   Errors, "required" marks and a full quota bar stay red on purpose. */
.auth-modal,
.auth-user-dropdown,
.pricing-overlay .pricing-modal {
  background: linear-gradient(180deg, #18181c, #111114);
  border-color: var(--ws-line-strong);
  border-radius: 20px;
}
.auth-tab.active,
.profile-tab.active {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 4px 14px rgba(0, 0, 0, 0.25);
}
.auth-form-group input:focus,
.pricing-redeem-input:focus {
  border-color: rgba(250, 204, 21, 0.6);
  box-shadow: 0 0 0 3px rgba(250, 204, 21, 0.1);
}
.profile-avatar-upload-btn,
.profile-avatar-upload-btn:hover,
.btn.btn-sm.btn-primary,
.btn.btn-sm.btn-primary:hover,
.pricing-contact-btn.popular-btn,
.pricing-contact-btn.popular-btn:hover,
.pricing-redeem-btn,
.pricing-redeem-btn:hover {
  border-color: transparent;
  background: linear-gradient(86deg, var(--accent-yellow) 5%, var(--ws-accent-2) 106%);
  color: var(--ws-accent-ink);
  box-shadow: 0 0 0 1px rgba(250, 204, 21, 0.35);
}
.pricing-card.popular,
.pricing-card.popular:hover { border-color: rgba(250, 204, 21, 0.5); background: rgba(250, 204, 21, 0.06); }
.pricing-badge { background: var(--accent-yellow); color: var(--ws-accent-ink); }
.pricing-link-btn { color: var(--accent-yellow); }

/* AI Image quality and size pickers */
.text-image-model-option { font-weight: 600; }
.text-image-model-option.active {
  border-color: rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
}
.text-image-size-trigger {
  border-color: var(--ws-line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.035);
  font-weight: 600;
}
.text-image-size-trigger:hover,
.text-image-size-trigger[aria-expanded="true"] { border-color: var(--ws-line-strong); }

/* ---------- Desktop layout ---------- */
@media (min-width: 861px) {
  /* The viewport sits inset with rounded corners, like the home stage. */
  .viewport {
    margin: 8px;
    border: 1px solid var(--ws-line);
    border-radius: 18px;
  }
  /* Export bar stays a centered pill (style.css stretches it below 1460px)
     and keeps still on hover. */
  .bottom-toolbar,
  .bottom-toolbar:hover {
    left: 50%;
    right: auto;
    width: max-content;
    max-width: calc(100% - 28px);
    gap: 6px;
    padding: 6px 8px;
    border-radius: 26px;
    transform: translateX(-50%);
  }
  .bottom-toolbar .export-btn { padding: 0 12px; }
  .bottom-toolbar .credit-badge-inline { margin-left: 3px; }
}

/* Phones: keep the hint clear of the right toolbar; no mouse hints on touch. */
@media (max-width: 860px) {
  .viewport-empty { top: 36%; width: calc(100% - 132px); }
  .viewport-empty-icon { width: 60px; height: 60px; border-radius: 18px; }
  .viewport-empty h2 { font-size: 16px; }
  .viewport-empty-keys { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .viewport-empty,
  .viewport-status-card,
  .gizmo-btn[aria-label]::after { transition: none; }
}
