  html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    min-height: 100%;
    color: #111;
    font-family: Arial, sans-serif;
    background: #f3f7fb;
  }

  body {
    overflow-x: hidden;
  }

  #simulationArea {
    position: relative;
    width: 100%;
    height: 100vh;
    min-height: 640px;
    overflow: hidden;
    background: radial-gradient(circle at center, #ffffff 0%, #eaf4ff 55%, #c7dff5 100%);
  }

  #viewport {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
  }

  #sceneTitle {
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 40px);
    text-align: center;
    z-index: 5;
    pointer-events: none;
  }

  #sceneTitle h1 {
    margin: 0;
    color: #7b1b1b;
    font-family: "Times New Roman", serif;
    font-size: clamp(24px, 2.8vw, 36px);
    font-weight: bold;
    letter-spacing: 1.2px;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.20);
  }

  #controlsOverlay,
  #resultsOverlay {
    position: absolute;
    top: 78px;
    z-index: 6;
    pointer-events: none;
  }

  #controlsOverlay {
    left: 18px;
  }

  #resultsOverlay {
    right: 18px;
  }

  .control-panel,
  .results-panel {
    pointer-events: auto;
    background-color: rgba(238, 238, 238, 0.95);
    border: 2px solid #333;
    border-radius: 10px;
    padding: 14px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.25);
  }

  .control-panel {
    width: 260px;
    text-align: center;
  }

  .results-panel {
    width: 295px;
    text-align: left;
  }

  .control-panel h2,
  .results-panel h2 {
    margin-top: 0;
    margin-bottom: 12px;
    text-align: center;
    font-family: "Times New Roman", serif;
    color: #7b1b1b;
    font-size: 22px;
    font-weight: bold;
  }

  .control-group {
    margin-bottom: 13px;
    font-weight: bold;
  }

  .slider-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    margin-top: 5px;
  }

  input[type="range"] {
    width: 145px;
    accent-color: blue;
  }

  input[type="text"], select {
    font-weight: bold;
    text-align: center;
    color: blue;
    background-color: lightyellow;
    border: 1px solid #888;
    border-radius: 4px;
    padding: 4px;
  }

  input[type="text"] {
    width: 82px;
  }

  select {
    width: 100%;
    color: #7b1b1b;
  }

  .minmax {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    margin-top: 4px;
    color: #333;
    padding: 0 4px;
    font-weight: normal;
  }

  .value-box {
    background: white;
    border: 1px solid #888;
    border-radius: 6px;
    padding: 7px;
    margin: 6px 0;
    font-size: 14px;
    color: #111;
  }

  .value-box b {
    color: #7b1b1b;
  }

  .btn {
    margin: 4px 2px;
    font-weight: bold;
  }

  #seoContent {
    max-width: 1050px;
    margin: 0 auto;
    padding: 28px 20px 36px 20px;
    background: white;
    line-height: 1.6;
  }

  #seoContent h2 {
    color: #7b1b1b;
    font-family: "Times New Roman", serif;
    font-weight: bold;
  }

  #seoContent h3 {
    color: #003366;
    font-weight: bold;
  }

  .formula-box {
    display: inline-block;
    background: #eef6ff;
    border: 2px solid #99bfe8;
    border-radius: 8px;
    padding: 10px 16px;
    margin: 8px 0;
    font-size: 20px;
    font-weight: bold;
    color: #003366;
  }

  .related-links a {
    font-weight: bold;
  }

  footer {
    background: #1f1f1f;
    color: white;
    text-align: center;
    padding: 18px 10px;
  }

  footer a {
    color: #ffd24d;
  }

  @media (max-width: 1050px) {
    #controlsOverlay { left: 10px; }
    #resultsOverlay { right: 10px; }
    .control-panel { width: 235px; }
    .results-panel { width: 255px; font-size: 12px; }
    .value-box { padding: 5px; margin: 4px 0; font-size: 12px; }
    input[type="range"] { width: 120px; }
  }

  @media (max-width: 760px) {
    #simulationArea {
      min-height: 760px;
    }

    #controlsOverlay,
    #resultsOverlay {
      top: auto;
      left: 10px;
      right: 10px;
      width: auto;
    }

    #controlsOverlay {
      bottom: 230px;
    }

    #resultsOverlay {
      bottom: 10px;
    }

    .control-panel,
    .results-panel {
      width: auto;
    }
  }
