 
    html, body {
      margin: 0;
      width: 100%;
      height: 100%;
      overflow: hidden;
      font-family: "Times New Roman", Times, serif;
      background: radial-gradient(circle at top, #15233b 0%, #08111f 45%, #03070d 100%);
      color: #eef6ff;
    }

    #app {
      position: fixed;
      inset: 0;
    }

    #titleBox {
      position: absolute;
      top: 12px;
      left: 50%;
      transform: translateX(-50%);
      z-index: 20;
      min-width: 300px;
      max-width: min(90vw, 760px);
      text-align: center;
      padding: 14px 22px;
      border-radius: 20px;
      background: rgba(20, 32, 56, 0.82);
      border: 1px solid rgba(255,255,255,0.12);
      box-shadow: 0 10px 28px rgba(0,0,0,0.28);
      backdrop-filter: blur(6px);
    }

    #titleBox h1 {
      margin: 0;
      font-size: 34px;
      line-height: 1.1;
      color: #ffe77a;
      letter-spacing: 0.4px;
    }

    #titleBox .sub {
      margin-top: 6px;
      font-size: 14px;
      color: #d7e6ff;
    }

    .panel {
      position: absolute;
      z-index: 20;
      width: 320px;
      max-height: calc(100vh - 120px);
      overflow-y: auto;
      padding: 16px;
      border-radius: 22px;
      background: rgba(10, 19, 35, 0.78);
      border: 1px solid rgba(255,255,255,0.12);
      box-shadow: 0 14px 36px rgba(0,0,0,0.32);
      backdrop-filter: blur(7px);
    }

    #leftPanel {
      top: 88px;
      left: 18px;
    }

    #rightPanel {
      top: 88px;
      right: 18px;
    }

    .panelTitle {
      font-size: 24px;
      font-weight: bold;
      color: #ffe77a;
      margin-bottom: 12px;
    }

    .section {
      margin-bottom: 14px;
      padding: 14px;
      border-radius: 18px;
      background: rgba(255,255,255,0.055);
      border: 1px solid rgba(255,255,255,0.08);
    }

    .sectionTitle {
      font-size: 18px;
      font-weight: bold;
      color: #ffe77a;
      margin-bottom: 10px;
    }

    .controlRow {
      display: grid;
      grid-template-columns: 1fr 108px 60px;
      gap: 10px;
      align-items: center;
      margin-bottom: 12px;
    }

    .controlRow label {
      font-size: 14px;
      font-weight: bold;
      color: #ffffff;
    }

    .valueBox, select {
      width: 100%;
      box-sizing: border-box;
      height: 38px;
      padding: 6px 10px;
      border-radius: 10px;
      border: 1px solid rgba(255,255,255,0.14);
      background: rgba(255,255,255,0.10);
      color: #ffffff;
      font-size: 14px;
      outline: none;
    }

    select option {
      color: #111;
      background: #fff;
    }

    input[type="range"] {
      width: 100%;
      height: 8px;
      appearance: none;
      -webkit-appearance: none;
      border-radius: 999px;
      background: linear-gradient(90deg, #50b8ff, #00e0ff);
      outline: none;
      margin: 0;
    }

    input[type="range"]::-webkit-slider-thumb {
      -webkit-appearance: none;
      appearance: none;
      width: 18px;
      height: 18px;
      border-radius: 50%;
      background: #ffffff;
      border: 2px solid #0b84ff;
      box-shadow: 0 2px 8px rgba(0,0,0,0.24);
      cursor: pointer;
    }

    input[type="range"]::-moz-range-thumb {
      width: 18px;
      height: 18px;
      border-radius: 50%;
      background: #ffffff;
      border: 2px solid #0b84ff;
      box-shadow: 0 2px 8px rgba(0,0,0,0.24);
      cursor: pointer;
    }

    .btnRow {
      display: flex;
      gap: 10px;
      flex-wrap: wrap;
      margin-top: 10px;
    }

    button {
      appearance: none;
      border: none;
      outline: none;
      cursor: pointer;
      border-radius: 12px;
      padding: 10px 14px;
      font-size: 14px;
      font-family: inherit;
      font-weight: bold;
      color: #fff;
      box-shadow: 0 6px 16px rgba(0,0,0,0.22);
      transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
    }

    button:hover {
      transform: translateY(-1px);
      filter: brightness(1.04);
    }

    button:active {
      transform: translateY(0);
    }

    .btnPrimary { background: #17457d; }
    .btnGreen { background: #1d6e4f; }
    .btnOrange { background: #86551b; }

    .readout {
      margin-top: 10px;
      background: rgba(255,255,255,0.06);
      border-radius: 12px;
      padding: 10px;
      font-size: 13px;
      line-height: 1.5;
      color: #eef6ff;
    }

    .legend {
      display: flex;
      flex-wrap: wrap;
      gap: 10px 14px;
      font-size: 12px;
      margin-top: 12px;
      line-height: 1.5;
    }

    .swatch {
      width: 14px;
      height: 14px;
      border-radius: 50%;
      display: inline-block;
      vertical-align: middle;
      margin-right: 6px;
      box-shadow: 0 0 10px rgba(255,255,255,0.18);
    }

    #hintBox {
      position: absolute;
      left: 50%;
      bottom: 12px;
      transform: translateX(-50%);
      z-index: 20;
      background: rgba(0,0,0,0.36);
      border: 1px solid rgba(255,255,255,0.14);
      border-radius: 12px;
      padding: 8px 12px;
      font-size: 12px;
      line-height: 1.4;
      color: #dde8ff;
      max-width: 720px;
      text-align: center;
    }

    .equationBox {
      margin-top: 10px;
      padding: 12px 14px;
      border-radius: 14px;
      background: rgba(255, 221, 87, 0.10);
      border: 1px solid rgba(255, 221, 87, 0.26);
      color: #ffe88e;
      font-size: 14px;
      line-height: 1.55;
    }
    #resultBox {
      min-height: 150px;
    }
    @media (max-width: 1100px) {
      #leftPanel, #rightPanel {
        width: min(320px, calc(100vw - 24px));
      }
      #rightPanel {
        top: auto;
        bottom: 80px;
      }
    }

    @media (max-width: 860px) {
      #rightPanel {
        display: none;
      }
      #leftPanel {
        width: calc(100vw - 24px);
        max-width: 420px;
      }
      #titleBox h1 {
        font-size: 26px;
      }
    }
  
