* { box-sizing: border-box; }
html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: var(--bg-deep);
  color: var(--text-main);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  overflow: hidden;
}

.app-container {
  display: flex;
  height: 100vh;
  width: 100vw;
}

.preview-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(circle at top right, rgba(99,102,241,0.08), transparent 60%),
    var(--bg-deep);
  overflow: hidden;
  padding: 1rem;
}

.bed-wrapper {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
}

#bed-svg {
  width: 100%;
  height: 100%;
  max-height: 100%;
}

.status-bar {
  padding: 0.5rem 1rem;
  border-top: 1px solid var(--border-glass);
  color: var(--text-muted);
  font-size: 0.8rem;
  font-family: ui-monospace, SF Mono, Menlo, monospace;
}

.toast-container {
  position: fixed;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  z-index: 100;
  pointer-events: none;
}
.toast {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  color: var(--text-main);
  padding: 0.6rem 1rem;
  border-radius: 0.5rem;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
  font-size: 0.85rem;
}

/* --- Print-only loading sheet ------------------------------------------- */
/* Hidden on screen; printLoadingSheet() fills it and calls window.print(). */
#print-sheet { display: none; }
@media print {
  html, body { overflow: visible; background: #fff; }
  body > * { display: none !important; }
  #print-sheet {
    display: block !important;
    color: #000;
    background: #fff;
    font-family: -apple-system, system-ui, sans-serif;
    padding: 1rem;
  }
  #print-sheet h1 { font-size: 16px; margin: 0 0 0.5rem 0; }
  #print-sheet p { font-size: 12px; margin: 0 0 0.8rem 0; }
  #print-sheet table { width: 100%; border-collapse: collapse; font-size: 12px; }
  #print-sheet th, #print-sheet td { border: 1px solid #333; padding: 4px 6px; text-align: left; }
  #print-sheet .chip {
    display: inline-block; width: 10px; height: 10px;
    border-radius: 50%; border: 1px solid #333; vertical-align: middle;
    -webkit-print-color-adjust: exact; print-color-adjust: exact;
  }
}
