:root {
  --le-coral: #f18478;
  --le-coral-dark: #d9685e;
  --le-coral-soft: #fff2ef;
  --le-ink: #20262d;
  --le-muted: #5e6a78;
  --le-line: rgba(32, 38, 45, 0.14);
  --le-teal: #167c73;
  --le-teal-soft: #e8f6f3;
  --le-purple: #7654a8;
  --le-purple-soft: #f3eef9;
  color-scheme: light;
}

html {
  min-width: 0;
  background: transparent;
}

body.le-math-embed {
  min-width: 0;
  margin: 0;
  padding: clamp(10px, 2.5vw, 24px);
  overflow-x: hidden;
  background: transparent;
  color: var(--le-ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

.le-math-embed *,
.le-math-embed *::before,
.le-math-embed *::after {
  box-sizing: border-box;
  letter-spacing: 0;
}

.le-math-embed button,
.le-math-embed input,
.le-math-embed select,
.le-math-embed textarea {
  font: inherit;
}

.le-math-embed button {
  min-height: 44px;
}

.le-math-embed button:focus-visible,
.le-math-embed input:focus-visible,
.le-math-embed select:focus-visible {
  outline: 3px solid rgba(22, 124, 115, 0.28) !important;
  outline-offset: 2px;
}

.le-math-embed .quiz-container,
.le-math-embed .panel,
.le-math-embed .kalk-shell {
  border-color: rgba(241, 132, 120, 0.48) !important;
  border-radius: 8px !important;
  background: rgba(255, 255, 255, 0.96) !important;
  box-shadow: 0 16px 38px rgba(32, 38, 45, 0.08) !important;
}

.le-math-embed .header,
.le-math-embed .hero,
.le-math-embed .kalk-hero {
  border-radius: 8px !important;
  background: var(--le-coral) !important;
}

.le-math-embed .header h1,
.le-math-embed .hero h1,
.le-math-embed .hero h2,
.le-math-embed .kalk-hero h2 {
  color: #fff !important;
  letter-spacing: 0 !important;
}

.le-math-embed .hidden {
  display: none !important;
}

.le-math-embed .correct {
  color: #146b4b !important;
}

.le-math-embed .incorrect {
  color: #b53c35 !important;
}

.le-math-embed--fractions .quiz-container,
.le-math-embed--percentages .quiz-container,
.le-math-embed--pythagoras .quiz-container,
.le-math-embed--flat-shapes .quiz-container {
  width: min(860px, 100%);
  max-width: none;
  margin: 0 auto;
  padding: clamp(16px, 3vw, 28px);
}

.le-math-embed--fractions #startButton,
.le-math-embed--fractions .buttons button,
.le-math-embed--percentages .start-container button,
.le-math-embed--percentages .buttons button,
.le-math-embed--pythagoras .level-buttons button,
.le-math-embed--pythagoras .buttons button,
.le-math-embed--flat-shapes .level-buttons button,
.le-math-embed--flat-shapes .buttons button {
  border-color: var(--le-coral-dark) !important;
  border-radius: 6px !important;
  background: var(--le-coral) !important;
  color: #fff !important;
  font-weight: 800 !important;
}

.le-math-embed--fractions input,
.le-math-embed--percentages input,
.le-math-embed--pythagoras input,
.le-math-embed--flat-shapes input {
  min-height: 44px;
  border: 1px solid var(--le-line) !important;
  border-radius: 6px !important;
  background: #fff !important;
  color: var(--le-ink) !important;
}

.le-math-embed--fractions li,
.le-math-embed--pythagoras li,
.le-math-embed--flat-shapes li {
  border-radius: 8px !important;
}

.le-math-embed--geometry .header {
  margin-bottom: 12px;
}

.le-math-embed--geometry .wrap,
.le-math-embed--visualizer .container {
  width: min(1180px, 100%);
  max-width: none;
}

.le-math-embed--geometry .card,
.le-math-embed--geometry .question-card,
.le-math-embed--geometry .result-card {
  border-radius: 8px !important;
}

.le-math-embed--visualizer .hero {
  margin-bottom: 14px;
}

.le-math-embed--visualizer .panel {
  padding: clamp(12px, 2.5vw, 20px);
}

.le-math-embed--calculator .kalk-wrap {
  padding-top: 0;
}

.le-math-embed--calculator .kalk-shell {
  width: min(560px, 100%);
  max-width: none;
}

.le-math-embed--calculator .kalk-hero {
  width: min(560px, 100%);
  max-width: none;
}

@media (max-width: 560px) {
  body.le-math-embed {
    padding: 8px;
  }

  .le-math-embed .quiz-container,
  .le-math-embed .panel,
  .le-math-embed .kalk-shell {
    box-shadow: none !important;
  }

  .le-math-embed--fractions .quiz-container,
  .le-math-embed--percentages .quiz-container,
  .le-math-embed--pythagoras .quiz-container,
  .le-math-embed--flat-shapes .quiz-container {
    padding: 14px;
  }
}
