:root {
      --ink: #16202d;
      --sub: #546170;
      --line: rgba(22, 32, 45, 0.12);
      --card: rgba(255, 251, 245, 0.92);
      --card-strong: #fffdfa;
      --accent: #245e9d;
      --accent2: #b25733;
      --shadow: 0 24px 60px rgba(22, 58, 100, 0.12);
      --radius: 24px;
    }

    * { box-sizing: border-box; }

    body {
      margin: 0;
      color: var(--ink);
      font-family: "Source Han Sans SC", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
      background:
        radial-gradient(circle at top right, rgba(92, 150, 210, 0.18), transparent 24%),
        radial-gradient(circle at left top, rgba(36, 94, 157, 0.12), transparent 20%),
        linear-gradient(180deg, #eef4fb 0%, #e4edf8 100%);
      min-height: 100vh;
    }

    .shell {
      width: min(1400px, calc(100vw - 32px));
      margin: 0 auto;
      padding: 20px 0 32px;
    }

    .topbar {
      display: flex;
      align-items: center;
      padding: 12px 22px;
      border-radius: 999px;
      border: 1px solid rgba(255, 255, 255, 0.6);
      background: rgba(240, 248, 255, 0.85);
      backdrop-filter: blur(10px);
      box-shadow: 0 12px 32px rgba(22, 58, 100, 0.08);
    }
    .topbar a {
      text-decoration: none;
      color: var(--accent);
      font-size: 16px;
      font-weight: 800;
    }

    .panel {
      margin-top: 14px;
      padding: 24px 28px;
      border-radius: var(--radius);
      border: 1px solid rgba(255, 255, 255, 0.55);
      background: var(--card);
      box-shadow: var(--shadow);
      backdrop-filter: blur(10px);
    }

    .hero {
      text-align: center;
      padding: 6px 0 16px;
    }
    .hero h1 {
      margin: 0;
      font-size: clamp(30px, 4vw, 46px);
      letter-spacing: 0.06em;
      color: var(--accent);
    }

    .controls-row {
      display: flex;
      flex-wrap: wrap;
      gap: 14px;
      align-items: flex-end;
      padding: 18px 0 10px;
      border-top: 1px solid var(--line);
      border-bottom: 1px solid var(--line);
    }

    .trial-selector {
      display: flex;
      flex-direction: column;
      gap: 8px;
      flex: 1 1 760px;
    }
    .trial-selector label {
      font-size: 18px;
      font-weight: 900;
      color: var(--ink);
    }
    .trial-btns {
      display: flex;
      gap: 4px;
      flex-wrap: nowrap;
    }
    .trial-btn {
      height: 46px;
      flex: 0 0 64px;
      border: 1.5px solid rgba(36, 94, 157, 0.3);
      border-radius: 12px;
      background: #f0f6ff;
      color: var(--accent);
      font-size: 14px;
      font-weight: 900;
      cursor: pointer;
      transition: all 0.15s;
      white-space: nowrap;
      padding: 0;
    }
    .trial-btn:hover { background: #ddeeff; }
    .trial-btn.active {
      background: var(--accent);
      color: #fff;
      border-color: var(--accent);
      box-shadow: 0 8px 20px rgba(36, 94, 157, 0.28);
    }

    .run-btn {
      height: 46px;
      padding: 0 22px;
      border: none;
      border-radius: 12px;
      background: linear-gradient(135deg, #245e9d 0%, #3a7fc1 100%);
      color: #fff;
      font-size: 17px;
      font-weight: 900;
      letter-spacing: 0.04em;
      cursor: pointer;
      box-shadow: 0 14px 32px rgba(36, 94, 157, 0.28);
      transition: transform 0.1s, box-shadow 0.1s;
    }
    .run-btn:hover {
      transform: translateY(-2px);
      box-shadow: 0 18px 40px rgba(36, 94, 157, 0.36);
    }

    .actions {
      display: flex;
      gap: 8px;
      align-self: flex-end;
      flex-wrap: nowrap;
      flex: 0 0 auto;
    }

    .curve-btn {
      height: 46px;
      padding: 0 14px;
      border: 2px solid rgba(178, 87, 51, 0.35);
      border-radius: 12px;
      background: #fff8f4;
      color: #b25733;
      font-size: 15px;
      font-weight: 900;
      cursor: pointer;
      white-space: nowrap;
      transition: all 0.15s;
    }
    .curve-btn.active {
      background: linear-gradient(135deg, #b25733 0%, #d4805a 100%);
      color: #fff;
      border-color: #b25733;
      box-shadow: 0 8px 20px rgba(178, 87, 51, 0.25);
    }

    .stats-bar {
      display: flex;
      gap: 14px;
      flex-wrap: wrap;
      margin-top: 14px;
    }
    .stat-box {
      flex: 1 1 160px;
      padding: 12px 16px;
      border-radius: 16px;
      border: 1.5px solid rgba(36, 94, 157, 0.2);
      background: linear-gradient(160deg, #f0f7ff 0%, #e4edf9 100%);
      box-shadow: 0 8px 20px rgba(36, 94, 157, 0.1);
    }
    .stat-label {
      font-size: 14px;
      font-weight: 800;
      color: var(--sub);
      margin-bottom: 4px;
    }
    .stat-value {
      font-size: 28px;
      font-weight: 900;
      color: var(--accent);
      line-height: 1.1;
    }

    .chart-wrap {
      margin-top: 18px;
      padding: 18px;
      border-radius: 20px;
      border: 1px solid var(--line);
      background: var(--card-strong);
      position: relative;
      min-height: 560px;
    }
    .chart-wrap canvas {
      width: 100% !important;
      display: block;
    }

    .empty-state {
      position: absolute;
      inset: 0;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      gap: 12px;
      color: var(--sub);
      pointer-events: none;
    }
    .empty-state .icon {
      font-size: 56px;
      opacity: 0.4;
    }
    .empty-state p {
      font-size: 20px;
      font-weight: 800;
      margin: 0;
      opacity: 0.6;
    }

    .insight {
      margin-top: 14px;
      padding: 14px 20px;
      border-radius: 16px;
      background: linear-gradient(135deg, rgba(36, 94, 157, 0.08) 0%, rgba(92, 150, 210, 0.1) 100%);
      border: 1.5px solid rgba(36, 94, 157, 0.2);
      font-size: 20px;
      font-weight: 800;
      color: var(--ink);
      text-align: center;
      line-height: 1.5;
    }
    .insight .hl { color: var(--accent); }
    .insight .hl2 { color: var(--accent2); }
