.chart-workspace-prompt[hidden],
.chart-analysis-loader[hidden] {
  display: none !important;
}

input.waypoint-screenshot-file-input {
  position: fixed;
  left: 12px;
  top: 12px;
  width: 44px;
  height: 44px;
  margin: 0;
  padding: 0;
  opacity: 0.01;
  border: 0;
  overflow: hidden;
  z-index: 0;
  pointer-events: none;
}

.chart-prompt-error {
  margin: 0 0 12px;
  color: #f0a060;
  font-size: 0.88rem;
  line-height: 1.4;
}

.chart-prompt-error[hidden] {
  display: none !important;
}

label.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}

.chart-workspace.chart-analysis-active .chart-workspace-prompt {
  display: none !important;
}

.chart-workspace.chart-prompt-active #screenPreview,
.chart-workspace.chart-prompt-active #screenPreview.active,
.chart-workspace.chart-prompt-active #screenPreview.screen-capture-pipeline,
.chart-workspace:has(#chartWorkspacePrompt:not([hidden])) #screenPreview,
.chart-workspace:has(#chartWorkspacePrompt:not([hidden])) #screenPreview.active,
.chart-workspace:has(#chartWorkspacePrompt:not([hidden])) #screenPreview.screen-capture-pipeline {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.saved-chart-workspace-preview {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #0a1018;
}

.saved-chart-workspace-preview[hidden],
.chart-workspace.chart-prompt-active .saved-chart-workspace-preview,
.chart-workspace.screen-share-active .saved-chart-workspace-preview,
.chart-workspace.screenshot-upload-active .saved-chart-workspace-preview,
.chart-workspace.chart-analysis-active .saved-chart-workspace-preview {
  display: none !important;
}

.chart-workspace.chart-analysis-active #screenPreview,
.helm-screen-preview-wrap.chart-analysis-active .helm-screen-preview {
  filter: brightness(0.35) saturate(0.6);
}

.helm-chart-analysis-loader {
  z-index: 14;
}

.helm-chart-analysis-loader .helm-wood-ring {
  fill: url(#helmWoodGradHelm);
}

.helm-screen-preview-wrap.chart-analysis-active .helm-screen-preview-placeholder {
  opacity: 0;
  pointer-events: none;
}

.chart-workspace-prompt {
  position: absolute;
  inset: 0;
  z-index: 11;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(10, 16, 28, 0.98);
  text-align: center;
}

.chart-prompt-card {
  max-width: min(640px, 100%);
  width: 100%;
  padding: 28px 32px;
  border-radius: 14px;
  border: 1px solid rgba(197, 160, 89, 0.28);
  background: rgba(12, 20, 34, 0.96);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.45);
}

.chart-prompt-card h3 {
  margin: 8px 0 10px;
  font-family: Cinzel, serif;
  font-size: 1.35rem;
  font-weight: 600;
  color: #f4ecd8;
  letter-spacing: 0.04em;
}

.chart-prompt-card p.muted {
  margin: 0 0 18px;
  font-size: 0.92rem;
  line-height: 1.55;
  color: var(--text-muted, #9aa3b2);
}

.chart-prompt-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.chart-workspace.chart-prompt-active .screenshot-preview-strip,
.chart-workspace.chart-analysis-active .screenshot-preview-strip[hidden] {
  display: none !important;
}

.chart-analysis-loader.is-analyzing {
  background: rgba(5, 7, 13, 0.97);
}

.chart-analysis-loader {
  position: absolute;
  inset: 0;
  z-index: 12;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(5, 7, 13, 0.97);
  pointer-events: none;
}

.chart-analysis-loader:not(.is-analyzing) .helm-wheel-wrap {
  animation: none;
}

.helm-loader {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
  padding: 8px 16px;
}

.helm-loader-visual {
  position: relative;
  width: 108px;
  height: 108px;
}

.helm-progress-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.helm-progress-ring {
  fill: none;
  stroke: var(--gold, #c9a227);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-dasharray: 238.76;
  stroke-dashoffset: 238.76;
  filter: drop-shadow(0 0 4px rgba(201, 162, 39, 0.35));
  transition: stroke-dashoffset 0.25s ease-out;
}

.helm-wheel-wrap {
  position: absolute;
  inset: 16px;
  animation: none;
}

.chart-analysis-loader.is-analyzing .helm-wheel-wrap {
  animation: helmWheelSpin 3.2s linear infinite;
}

.helm-wheel-svg {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 3px 10px rgba(0, 0, 0, 0.5));
}

.helm-wood-ring {
  fill: url(#helmWoodGrad);
  stroke: #5c3d14;
  stroke-width: 1.2;
}

.helm-wood-inner {
  fill: none;
  stroke: #8b5a2b;
  stroke-width: 0.8;
  opacity: 0.7;
}

.helm-spoke {
  stroke: #4a3010;
  stroke-width: 2.8;
  stroke-linecap: round;
}

.helm-spoke-highlight {
  stroke: #9a6530;
  stroke-width: 1;
  stroke-linecap: round;
  opacity: 0.55;
}

.helm-peg {
  fill: #2a1808;
  stroke: #7a5428;
  stroke-width: 0.8;
}

.helm-hub-outer {
  fill: #8b6914;
  stroke: #5c4510;
  stroke-width: 1;
}

.helm-hub-inner {
  fill: #c9a227;
  stroke: #6b5018;
  stroke-width: 0.8;
}

.helm-stage-label {
  margin: 2px 0 0;
  font-family: Cinzel, serif;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  color: var(--gold, #c9a227);
  text-transform: uppercase;
}

.helm-progress-pct {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 600;
  color: #f4ecd8;
  font-variant-numeric: tabular-nums;
}

.helm-eta-label {
  margin: 0;
  font-size: 0.72rem;
  color: var(--text-muted, #9aa3b2);
}

@keyframes helmWheelSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
