:root {
  --estage-blue: #005EFF;
  --estage-ink: #12110F;
  --estage-sand: #FFF8EA;
  --estage-charcoal: #1F2421;
  --estage-green: #1F5A3B;
  --estage-clay: #8D4F2F;
  --estage-paper: #FFFDF4;
}
.estage-page {
  background: linear-gradient(180deg, var(--estage-sand), #f7ead2);
}
.estage-hero {
  padding-block: clamp(2rem, 7vw, 5rem);
}
.estage-badge,
.estage-chip {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  width: fit-content;
  border-radius: 999px;
  padding: .36rem .72rem;
  font-weight: 800;
  font-size: .78rem;
  letter-spacing: .02em;
}
.estage-badge {
  color: var(--estage-paper);
  background: var(--estage-blue);
}
.estage-chip {
  color: var(--estage-ink);
  background: rgba(0, 94, 255, .12);
  border: 1px solid rgba(0, 94, 255, .35);
}
.estage-viewer-shell,
.estage-panel,
.estage-card,
.estage-scanner-shell {
  background: rgba(255, 253, 244, .94);
  border: 1px solid rgba(18, 17, 15, .16);
  border-radius: 1.25rem;
  box-shadow: 0 18px 46px rgba(18, 17, 15, .10);
}
.estage-viewer-shell {
  overflow: hidden;
  min-height: 70vh;
}
.estage-model-viewer {
  width: 100%;
  height: 70vh;
  min-height: 460px;
  background: radial-gradient(circle at 50% 18%, rgba(0, 94, 255, .12), transparent 40%), var(--estage-paper);
}
@media (min-width: 900px) {
  .estage-model-viewer { height: 75vh; }
}
.estage-toolbar,
.estage-cluster {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  align-items: center;
}
.estage-toolbar {
  padding: 1rem;
  border-top: 1px solid rgba(18, 17, 15, .12);
  background: rgba(255, 248, 234, .8);
}
.estage-panel,
.estage-card,
.estage-scanner-shell {
  padding: clamp(1rem, 3vw, 1.5rem);
}
.estage-notice {
  border-left: 5px solid var(--estage-blue);
  background: rgba(0, 94, 255, .08);
  color: var(--estage-ink);
  padding: 1rem;
  border-radius: .85rem;
}
.estage-notice.warning {
  border-left-color: var(--estage-clay);
  background: rgba(141, 79, 47, .10);
}
.estage-notice.success {
  border-left-color: var(--estage-green);
  background: rgba(31, 90, 59, .10);
}
.estage-status-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: .75rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.estage-status-list li {
  background: rgba(255, 255, 255, .72);
  border: 1px solid rgba(18,17,15,.11);
  border-radius: .75rem;
  padding: .8rem;
}
.estage-debug summary {
  cursor: pointer;
  font-weight: 800;
}
.estage-debug pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  background: #12110f;
  color: #fff8ea;
  border-radius: .75rem;
  padding: 1rem;
}
.estage-scanner-video-wrap {
  position: relative;
  overflow: hidden;
  border-radius: 1rem;
  border: 2px solid rgba(18, 17, 15, .18);
  background: #12110f;
  aspect-ratio: 4 / 3;
}
.estage-scanner-video-wrap video,
.estage-scanner-video-wrap canvas {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.estage-scanner-frame {
  position: absolute;
  inset: 16%;
  border: 4px solid var(--estage-blue);
  border-radius: 1rem;
  box-shadow: 0 0 0 999px rgba(18, 17, 15, .38);
  pointer-events: none;
}
.estage-print-page {
  background: #f2e5cf;
}
.estage-print-artwork {
  display: block;
  width: min(100%, 1188px);
  margin-inline: auto;
  border: 1px solid rgba(18,17,15,.2);
  box-shadow: 0 18px 50px rgba(18,17,15,.16);
  background: white;
}
.estage-print-controls {
  padding: 1rem;
  margin-block: 1rem;
}
.estage-checklist {
  columns: 2 280px;
}
.estage-checklist li {
  break-inside: avoid;
  margin-block: .35rem;
}
[hidden] { display: none !important; }
@media (prefers-reduced-motion: reduce) {
  .estage-model-viewer { --poster-color: var(--estage-paper); }
}
@media print {
  @page { size: A2 landscape; margin: 0; }
  html, body { margin: 0 !important; padding: 0 !important; background: white !important; }
  body > *:not(.print-only-artwork) { display: none !important; }
  .print-only-artwork { display: block !important; }
  .print-only-artwork img { display: block; width: 594mm; height: 420mm; }
}
