:root {
      --bezier-bg: #f7f7f7;
      --bezier-card: #ffffff;
      --bezier-border: #d8d8d8;
      --bezier-muted: #666666;
      --bezier-ink: #111111;
    }

    body {
      margin: 0;
      background: var(--bezier-bg);
      color: var(--bezier-ink);
      font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    }

    .bezier-wrap {
      max-width: 1100px;
      margin: 0 auto;
      padding: 24px;
      text-align: left;
    }

    .bezier-header {
      margin-bottom: 18px;
    }

    .bezier-header h1 {
      margin: 0 0 8px;
      font-size: clamp(1.8rem, 4vw, 2.8rem);
      line-height: 1.1;
      letter-spacing: -0.03em;
      color: #111111;
    }

    .bezier-lead {
      max-width: 780px;
      margin: 0;
      color: var(--bezier-muted);
      font-size: 0.98rem;
      line-height: 1.6;
    }

    .bezier-wrap h2 {
      margin-top: 28px;
      margin-bottom: 10px;
      font-size: 1.3rem;
      color: #111111;
    }

    .bezier-wrap p,
    .bezier-wrap li {
      line-height: 1.65;
      color: #333333;
    }

    .bezier-wrap ul {
      padding-left: 1.2rem;
    }

    .bezier-math {
      overflow-x: auto;
      padding: 8px 0;
      margin: 12px 0;
    }

    .bezier-app {
      margin-top: 28px;
      text-align: center;
    }

    .bezier-controls {
      display: flex;
      flex-wrap: wrap;
      justify-content: center;
      gap: 8px;
      margin: 16px 0;
    }

    .bezier-btn {
      padding: 10px 16px;
      border: none;
      border-radius: 10px;
      background: #222222;
      color: #ffffff;
      cursor: pointer;
      font: inherit;
      font-weight: 600;
      transition:
        background 0.2s ease,
        transform 0.2s ease,
        opacity 0.2s ease;
    }

    .bezier-btn:hover {
      background: #444444;
      transform: translateY(-1px);
    }

    .bezier-btn:disabled {
      opacity: 0.4;
      cursor: not-allowed;
      transform: none;
    }

    #canvasBezier {
      width: 100%;
      max-width: 900px;
      height: auto;

      background: var(--bezier-card);
      border: 1px solid var(--bezier-border);
      border-radius: 14px;

      cursor: crosshair;
      touch-action: none;
      user-select: none;
      -webkit-user-select: none;
    }

    .bezier-back-wrap {
      display: flex;
      justify-content: center;
      margin: 24px 0 8px;
      width: 100%;
    }

    @media (max-width: 640px) {
      .bezier-wrap {
        padding: 18px;
      }

      .bezier-controls {
        align-items: stretch;
        flex-direction: column;
      }

      .bezier-btn {
        width: 100%;
      }
    }
