*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: system-ui, -apple-system, sans-serif;
  background: #f8f8f8;
  color: #1a1a1a;
  height: 100vh;
  overflow: hidden;
}

#app { display: flex; height: 100vh; }

#canvas-container { flex: 1; position: relative; }

#canvas { width: 100%; height: 100%; display: block; }

#panel {
  width: 400px;
  min-width: 320px;
  background: #ffffff;
  border-left: 1px solid #e0e0e0;
  padding: 32px 24px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

#back { color: #999; text-decoration: none; font-size: 13px; }
#back:hover { color: #555; }

#subject {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: #aaa;
}

#step-title { font-size: 22px; font-weight: 600; color: #111; line-height: 1.3; }

#step-description { font-size: 14px; line-height: 1.7; color: #555; }

#equation {
  background: #f5f5f5;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 16px;
  overflow-x: auto;
  color: #111;
}

#step-notes { font-size: 13px; color: #888; line-height: 1.6; white-space: pre-line; }

#nav {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: auto;
  padding-top: 24px;
  border-top: 1px solid #e8e8e8;
}

#nav button {
  background: #f0f0f0;
  border: 1px solid #ddd;
  color: #333;
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  transition: background 0.15s;
}
#nav button:hover:not(:disabled) { background: #e4e4e4; }
#nav button:disabled { opacity: 0.3; cursor: default; }

#counter { flex: 1; text-align: center; font-size: 13px; color: #aaa; }

/* Shared vector label style used by CSS2D labels in all lessons */
.vec-label {
  font-family: Georgia, 'Times New Roman', serif;
  font-style: italic;
  font-size: 16px;
  font-weight: bold;
  pointer-events: none;
  user-select: none;
  text-shadow: 0 0 6px #fff, 0 0 6px #fff;
}
.vec-label.sm { font-size: 13px; }
