:root { color-scheme: light dark; }

html, body {
  height: 100%;
  margin: 0;
}

body {
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial;
  overflow: hidden;
}

.app {
  height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr;
}

.toolbar {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(127,127,127,0.25);
  background: rgba(255,255,255,0.02);
  z-index: 10;
}

.toolbar button {
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid rgba(127,127,127,0.35);
  background: rgba(127,127,127,0.08);
  cursor: pointer;
}

.toolbar button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.toolbar .status {
  margin-left: auto;
  font-size: 13px;
  opacity: 0.8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 50vw;
}

.stage {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

#cadCanvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  background: rgba(127,127,127,0.06);
}

.canvas-container {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
}

.hint {
  position: absolute;
  right: 12px;
  bottom: 12px;
  font-size: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(127,127,127,0.25);
  background: rgba(0,0,0,0.03);
  user-select: none;
  pointer-events: none;
  opacity: 0.85;
  z-index: 5;
}