:root {
  --page-bg: #eef2f6;
  --panel-bg: #f7f9fc;
  --line: #dfe5ee;
  --line-soft: #ebf0f6;
  --text-main: #263548;
  --text-sub: #6f7f92;
  --brand: #5a74ef;
  --brand-deep: #4d67df;
  --danger: #ff5d63;
  --shadow: 0 1px 2px rgba(24, 37, 56, 0.04), 0 6px 16px rgba(24, 37, 56, 0.06);
  --secondary-col-1: 18px;
  --secondary-col-2: 104px;
  --secondary-col-3: 265px;
  --secondary-col-4: 92px;
  --secondary-col-5: 71px;
  --secondary-col-6: 92px;
  --secondary-col-7: 40px;
  --secondary-col-8: 71px;
  --secondary-col-9: 81px;
  --secondary-col-10: 81px;
  --secondary-col-11: 81px;
  --secondary-col-12: 104px;
  --secondary-rule-grid: var(--secondary-col-1) var(--secondary-col-2) var(--secondary-col-3) var(--secondary-col-4) var(--secondary-col-5) var(--secondary-col-6) var(--secondary-col-7) var(--secondary-col-8) var(--secondary-col-9) var(--secondary-col-10) var(--secondary-col-11) var(--secondary-col-12);
}

* {
      box-sizing: border-box;
      scrollbar-width: thin;
      scrollbar-color: #a5b2c2 transparent;
    }

    *::-webkit-scrollbar {
      width: 6px;
      height: 6px;
    }

    *::-webkit-scrollbar-track {
      background: transparent;
    }

    *::-webkit-scrollbar-thumb {
      background: #a5b2c2;
      border-radius: 999px;
    }

    body {
      margin: 0;
      font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
      background: var(--page-bg);
      color: var(--text-main);
    }

    .app-shell {
      min-width: 1280px;
      min-height: 100vh;
      display: flex;
    }

    .side-bar {
      width: 82px;
      background: linear-gradient(180deg, #203746 0%, #203746 72%, #1c3240 100%);
      color: #fff;
      display: flex;
      flex-direction: column;
      align-items: center;
      border-right: 1px solid rgba(255, 255, 255, 0.06);
      box-shadow: inset -1px 0 0 rgba(255, 255, 255, 0.03);
    }

    .logo-box {
      width: 100%;
      height: 72px;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 16px;
      font-weight: 700;
      letter-spacing: 0.3px;
      border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    }

    .nav-item {
      width: 100%;
      padding: 16px 0 14px;
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 8px;
      color: rgba(255, 255, 255, 0.86);
      cursor: pointer;
      transition: background 0.2s ease, color 0.2s ease;
      position: relative;
      user-select: none;
    }

    .nav-item:hover {
      background: rgba(255, 255, 255, 0.07);
      color: #fff;
    }

    .nav-item.active {
      background: rgba(90, 116, 239, 0.18);
      color: #fff;
    }

    .nav-item.active::before {
      content: "";
      position: absolute;
      left: 0;
      top: 18px;
      bottom: 18px;
      width: 3px;
      border-radius: 0 2px 2px 0;
      background: #84a2ff;
    }

    .nav-item svg {
      width: 20px;
      height: 20px;
      opacity: 0.95;
    }

    .nav-item span {
      font-size: 12px;
      line-height: 1;
      font-weight: 600;
    }

    .side-version {
      margin-top: auto;
      margin-bottom: 10px;
      font-size: 12px;
      font-weight: 700;
      opacity: 0.92;
    }

    .page-shell {
      flex: 1;
      min-width: 0;
      display: flex;
      flex-direction: column;
      background: var(--page-bg);
    }

    .content-wrap {
      overflow-y: auto;
      overflow-x: hidden;
    }

    .page-card {
      height: auto;
      flex: none;
      min-height: calc(100vh - 65px);
      border: 1px solid var(--line);
      background: #fff;
      box-shadow: var(--shadow);
      overflow: visible;
    }

    .page-card-head {
      height: 48px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 0 18px 0 32px;
      border-bottom: 1px solid var(--line);
      background: #fff;
    }

    .page-title {
      font-size: 18px;
      line-height: 1;
      color: #244b87;
      font-weight: 700;
      letter-spacing: 0.1px;
    }

    .page-actions {
      display: flex;
      gap: 12px;
    }

    .btn {
      height: 28px;
      min-width: 74px;
      padding: 0 16px;
      border-radius: 3px;
      border: 1px solid transparent;
      font-size: 12px;
      font-weight: 600;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
      cursor: pointer;
      transition: all 0.2s ease;
      user-select: none;
    }

    .btn:active {
      transform: translateY(1px);
    }

    .btn:disabled {
      cursor: not-allowed;
      opacity: 0.68;
    }

    .btn-outline {
      color: #273b8f;
      background: #fff;
      border-color: #b8c7ef;
    }

    .btn-outline:hover:not(:disabled) {
      background: #f6f9ff;
      border-color: #92aaf0;
    }

    .btn-primary {
      color: #fff;
      background: var(--brand);
      border-color: var(--brand);
      box-shadow: 0 5px 10px rgba(90, 116, 239, 0.18);
    }

    .btn-primary:hover:not(:disabled) {
      background: var(--brand-deep);
      border-color: var(--brand-deep);
    }

    .btn-mini {
      height: 20px;
      min-width: 56px;
      padding: 0 12px;
      font-size: 12px;
      border-radius: 3px;
      background: var(--brand);
      color: #fff;
      border: 0;
      cursor: pointer;
      transition: background 0.2s ease;
    }

    .btn-mini:hover:not(:disabled) {
      background: var(--brand-deep);
    }

    .btn-mini:disabled {
      background: #b8c7ef;
    }

    .btn-spinner {
      width: 12px;
      height: 12px;
      border: 2px solid rgba(255, 255, 255, 0.35);
      border-top-color: currentColor;
      border-radius: 50%;
      display: inline-block;
      animation: spin 0.8s linear infinite;
    }

    .btn-outline .btn-spinner {
      border-color: rgba(39, 59, 143, 0.2);
      border-top-color: currentColor;
    }

    @keyframes spin {
      from { transform: rotate(0deg); }
      to { transform: rotate(360deg); }
    }

    .page-body {
      padding: 12px;
      background: var(--panel-bg);
    }

    .form-panel {
      background: #f4f6f9;
      border: 1px solid var(--line-soft);
      padding: 22px 24px;
    }

    .section-title {
      display: flex;
      align-items: center;
      gap: 10px;
      margin-bottom: 14px;
      color: #2b457f;
      font-size: 16px;
      font-weight: 700;
    }

    .section-title::before {
      content: "";
      width: 7px;
      height: 19px;
      border-radius: 1px;
      background: linear-gradient(180deg, #7092ff 0%, #5470f0 100%);
      box-shadow: 0 0 0 2px rgba(90, 116, 239, 0.12);
    }

    .section-title.rule::before {
      height: 18px;
    }

    .prd-module-head {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
    }

    .prd-module-head-gap {
      margin-top: 2px;
    }

    .prd-module-head-inline {
      padding: 10px 18px 8px;
      border-bottom: 1px solid #e7edf6;
      background: #f9fbfe;
    }

    .prd-module-name {
      color: #436199;
      font-size: 12px;
      font-weight: 700;
      line-height: 1;
      letter-spacing: 0.2px;
    }

    .section-row {
      display: grid;
      grid-template-columns: repeat(5, minmax(0, 1fr));
      gap: 14px 60px;
      margin-bottom: 12px;
    }

    .field-group {
      min-width: 0;
    }

    .field-group.span-2 {
      grid-column: span 2 / span 2;
    }

    .field-label {
      min-height: 20px;
      display: flex;
      align-items: center;
      gap: 6px;
      margin-bottom: 6px;
      font-size: 12px;
      color: #4f6176;
      line-height: 1;
    }

    .required-star {
      color: #ff5a5f;
      font-weight: 700;
      transform: translateY(1px);
    }

    .field-control,
    .field-select,
    .tag-select-trigger {
      width: 100%;
      min-width: 0;
      height: 30px;
      padding: 0 11px;
      border: 1px solid #cfd8e3;
      border-radius: 2px;
      background: #fff;
      color: #223247;
      font-size: 13px;
      transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
    }

    .field-control:hover,
    .field-select:hover,
    .tag-select-trigger:hover {
      border-color: #93acee;
    }

    .field-control:focus,
    .field-select:focus,
    .tag-select-trigger.focused {
      outline: none;
      border-color: #7896ef;
      box-shadow: 0 0 0 3px rgba(90, 116, 239, 0.12);
    }

    .field-control::placeholder {
      color: #b0bcc9;
    }

    .field-error {
      border-color: #ea5b5b !important;
      box-shadow: 0 0 0 3px rgba(234, 91, 91, 0.08) !important;
    }

    .field-tip {
      min-height: 17px;
      padding-top: 4px;
      font-size: 12px;
      color: var(--danger);
      line-height: 1.1;
    }

    .select-wrap {
      position: relative;
    }

    .field-select {
      appearance: none;
      padding-right: 34px;
      cursor: pointer;
    }

    .select-wrap svg {
      position: absolute;
      right: 10px;
      top: 50%;
      width: 12px;
      height: 12px;
      transform: translateY(-50%);
      color: #8594a8;
      pointer-events: none;
    }

    .tag-select {
      position: relative;
    }

    .tag-select-trigger {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      cursor: pointer;
    }

    .tag-value {
      min-width: 0;
      display: flex;
      align-items: center;
      gap: 4px;
      padding: 0 6px;
      height: 20px;
      border-radius: 10px;
      background: #eff3fb;
      border: 1px solid #d4ddec;
      color: #55657a;
      font-size: 12px;
      white-space: nowrap;
    }

    .tag-value .tag-close {
      width: 12px;
      height: 12px;
      border-radius: 999px;
      background: #d8e1ee;
      color: #74849a;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      font-size: 10px;
      line-height: 1;
    }

    .tag-select-menu {
      position: absolute;
      top: calc(100% + 4px);
      left: 0;
      right: 0;
      z-index: 20;
      background: #fff;
      border: 1px solid #cfd8e3;
      border-radius: 2px;
      box-shadow: 0 8px 20px rgba(42, 58, 80, 0.14);
      overflow: hidden;
      display: none;
    }

    .tag-select.open .tag-select-menu {
      display: block;
    }

    .tag-option {
      height: 34px;
      display: flex;
      align-items: center;
      padding: 0 12px;
      font-size: 13px;
      color: #2d3f52;
      cursor: pointer;
      transition: background 0.2s ease;
    }

    .tag-option:hover {
      background: #eef3ff;
    }

    .rules-head {
      display: flex;
      align-items: center;
      justify-content: space-between;
      margin: 12px 0 10px;
    }

    .rules-card {
      background: #fff;
      border: 1px solid #dbe3ef;
    }

    .rules-table-head {
      height: 44px;
      display: grid;
      grid-template-columns: 1fr 96px;
      align-items: center;
      padding: 0 0 0 8px;
      background: #f4f7fd;
      border-bottom: 1px solid #e4ebf5;
      color: #8a9ab2;
      font-size: 12px;
    }

    .rules-table-head div:last-child {
      text-align: center;
    }

    .rule-group-head,
    .rule-item {
      display: grid;
      grid-template-columns: 42px 1fr 96px;
      align-items: center;
      min-height: 34px;
      border-bottom: 1px solid #e8eef7;
      background: #fff;
    }

    .rule-group-head {
      min-height: 36px;
    }

    .rule-group-head:hover,
    .rule-item:hover {
      background: #fafcff;
    }

    .rule-index {
      font-size: 13px;
      color: #506177;
      text-align: center;
    }

    .rule-desc {
      padding: 8px 0;
      font-size: 13px;
      line-height: 1.55;
      color: #2c3c51;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    .rule-group-head .rule-desc {
      display: flex;
      align-items: center;
      gap: 8px;
      color: #3d4f69;
    }

    .rule-badge {
      flex: 0 0 auto;
      height: 18px;
      padding: 0 6px;
      border-radius: 3px;
      border: 1px solid #cadeff;
      background: #f0f5ff;
      color: #6a90ee;
      font-size: 11px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
    }

    .rule-action-cell {
      display: flex;
      align-items: center;
      justify-content: center;
      height: 100%;
      gap: 12px;
    }

    .rule-link {
      border: 0;
      background: transparent;
      color: #ff6066;
      font-size: 13px;
      cursor: pointer;
      padding: 0;
    }

    .rule-link:hover {
      color: #ef3f46;
    }

    .rule-link.edit {
      color: #5a74ef;
    }

    .rule-link.edit:hover {
      color: #4d67df;
    }

    .rule-conflict-badge {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      width: 18px;
      height: 18px;
      border-radius: 50%;
      background: #ff5d63;
      color: #fff;
      font-size: 13px;
      font-weight: 700;
      margin-left: 8px;
      cursor: help;
      position: relative;
    }

    .rule-conflict-badge::after {
      content: attr(data-tooltip);
      position: absolute;
      bottom: calc(100% + 8px);
      left: 50%;
      transform: translateX(-50%);
      padding: 8px 12px;
      background: rgba(35, 45, 58, 0.95);
      color: #fff;
      font-size: 12px;
      font-weight: 400;
      white-space: normal;
      min-width: 200px;
      max-width: 320px;
      border-radius: 4px;
      box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
      opacity: 0;
      pointer-events: none;
      transition: opacity 0.2s ease;
      z-index: 10;
    }

    .rule-conflict-badge:hover::after {
      opacity: 1;
      pointer-events: auto;
    }

    .rule-conflict-badge svg {
      width: 12px;
      height: 12px;
    }

    .empty-box {
      height: 72px;
      display: flex;
      align-items: center;
      justify-content: center;
      color: #9caabd;
      font-size: 13px;
    }

    .toast-stack {
      position: fixed;
      right: 18px;
      top: 14px;
      z-index: 50;
      display: flex;
      flex-direction: column;
      gap: 10px;
      pointer-events: none;
    }

    .toast {
      min-width: 240px;
      max-width: 360px;
      padding: 12px 14px;
      border-radius: 8px;
      border: 1px solid rgba(255, 255, 255, 0.12);
      box-shadow: 0 10px 28px rgba(17, 28, 45, 0.18);
      background: rgba(33, 41, 54, 0.95);
      color: #fff;
      display: flex;
      gap: 10px;
      align-items: flex-start;
      transform: translateY(-8px);
      opacity: 0;
      animation: toast-in 0.25s ease forwards;
    }

    .toast.success .toast-icon {
      color: #58d58f;
    }

    .toast.error .toast-icon {
      color: #ff8d92;
    }

    .toast.info .toast-icon {
      color: #8db2ff;
    }

    .toast-icon {
      width: 18px;
      height: 18px;
      flex: 0 0 auto;
      margin-top: 1px;
    }

    .toast-title {
      font-size: 13px;
      font-weight: 700;
      margin-bottom: 2px;
      line-height: 1.3;
    }

    .toast-text {
      font-size: 12px;
      line-height: 1.5;
      color: rgba(255, 255, 255, 0.82);
    }

    .trial-mask {
      position: fixed;
      inset: 0;
      display: none;
      align-items: flex-start;
      justify-content: center;
      padding: 51px 24px 24px;
      background: rgba(33, 41, 54, 0.36);
      backdrop-filter: blur(1.5px);
      z-index: 82;
    }

    .trial-mask.open {
      display: flex;
    }

    .trial-dialog {
      width: min(1076px, calc(100vw - 48px));
      max-height: calc(100vh - 74px);
      background: #fff;
      border: 1px solid #dfe6f1;
      box-shadow: 0 24px 48px rgba(28, 39, 56, 0.18);
      display: flex;
      flex-direction: column;
      overflow: hidden;
    }

    .trial-header {
      height: 37px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 0 18px 0 16px;
      background: #f4f6fb;
      border-bottom: 1px solid #ebf0f6;
    }

    .trial-title {
      font-size: 14px;
      font-weight: 700;
      color: #8f9cb2;
      letter-spacing: 0.1px;
    }

    .trial-close {
      width: 24px;
      height: 24px;
      border: 0;
      background: transparent;
      color: #8d9dc4;
      font-size: 25px;
      line-height: 1;
      cursor: pointer;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      padding: 0;
    }

    .trial-close:hover {
      color: #6f83b6;
    }

    .trial-body {
      padding: 18px 16px 14px;
      display: flex;
      flex-direction: column;
      gap: 16px;
      min-height: 0;
    }

    .trial-toolbar {
      display: flex;
      flex-direction: column;
      gap: 14px;
    }

    .trial-form-row {
      display: flex;
      align-items: flex-start;
      gap: 12px;
    }

    .trial-form-field {
      display: flex;
      flex-direction: column;
      gap: 7px;
    }

    .trial-form-label {
      display: flex;
      align-items: center;
      gap: 4px;
      font-size: 12px;
      line-height: 1;
      color: #47576a;
    }

    .trial-form-label .required-star {
      margin-top: 1px;
    }

    .trial-form-inline {
      display: inline-flex;
      align-items: stretch;
    }

    .trial-input {
      width: 184px;
      height: 30px;
      border: 1px solid #d6dfea;
      border-right: 0;
      padding: 0 10px;
      font-size: 12px;
      font-weight: 600;
      color: #2f3d4f;
      outline: none;
      background: #fff;
    }

    .trial-input:focus {
      border-color: #6c84f1;
      box-shadow: inset 0 0 0 1px rgba(92, 116, 239, 0.12);
    }

    .trial-input.error {
      border-color: #ef6b73;
    }

    .trial-run-btn {
      width: 64px;
      height: 30px;
      border: 0;
      border-radius: 0 3px 3px 0;
      background: #5875ef;
      color: #fff;
      font-size: 12px;
      font-weight: 600;
      cursor: pointer;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
      transition: background 0.2s ease;
    }

    .trial-run-btn:hover {
      background: #4967e8;
    }

    .trial-run-btn:disabled {
      cursor: not-allowed;
      background: #93a6f2;
    }

    .trial-inline-status {
      min-height: 16px;
      font-size: 12px;
      line-height: 16px;
      color: #8e9bb1;
    }

    .trial-inline-status.error {
      color: #ef5d66;
    }

    .trial-inline-status.loading {
      color: #5a74ef;
    }

    .trial-summary {
      display: flex;
      flex-wrap: wrap;
      column-gap: 22px;
      row-gap: 12px;
      padding: 0 2px;
    }

    .trial-summary-item {
      display: flex;
      align-items: center;
      gap: 4px;
      min-width: 100px;
      font-size: 12px;
      line-height: 18px;
      color: #5d6d81;
      white-space: nowrap;
    }

    .trial-summary-item.compact {
      min-width: 92px;
    }

    .trial-summary-item.wide {
      min-width: 204px;
      max-width: 214px;
      overflow: hidden;
    }

    .trial-summary-item.break {
      flex-basis: 100%;
      min-width: 100%;
      margin-top: -2px;
    }

    .trial-summary-label {
      color: #445368;
    }

    .trial-summary-label.strong {
      font-weight: 700;
      color: #27364a;
    }

    .trial-summary-value {
      color: #2f3d4f;
      min-width: 0;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    .trial-board {
      border: 1px solid #dbe4f3;
      display: flex;
      flex-direction: column;
      min-height: 0;
      background: #fff;
    }

    .trial-board-head {
      height: 46px;
      display: grid;
      grid-template-columns: 1fr 138px;
      align-items: center;
      padding: 0 11px 0 28px;
      background: #f6f8fc;
      border-bottom: 1px solid #dbe4f3;
      font-size: 12px;
      color: #8694ae;
    }

    .trial-board-head .align-right {
      text-align: right;
      padding-right: 6px;
    }

    .trial-board-scroll {
      max-height: min(554px, calc(100vh - 286px));
      overflow: auto;
    }

    .trial-group {
      border-bottom: 1px solid #edf1f7;
    }

    .trial-group:last-child {
      border-bottom: 0;
    }

    .trial-group-head {
      min-height: 34px;
      display: grid;
      grid-template-columns: 1fr 138px;
      align-items: center;
      padding: 0 11px 0 7px;
      border-bottom: 1px solid #edf1f7;
      background: #fff;
      font-size: 12px;
      color: #364559;
    }

    .trial-group-label {
      display: flex;
      align-items: center;
      gap: 10px;
      min-width: 0;
      padding: 8px 0;
    }

    .trial-badge {
      height: 18px;
      padding: 0 5px;
      border: 1px solid #bed3ff;
      border-radius: 4px;
      background: #f1f6ff;
      color: #76a0ff;
      font-size: 11px;
      line-height: 16px;
      flex: 0 0 auto;
    }

    .trial-group-condition {
      min-width: 0;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
      color: #334255;
    }

    .trial-group-placeholder {
      color: #9aa7b9;
    }

    .trial-row {
      min-height: 35px;
      display: grid;
      grid-template-columns: 42px 1fr 138px;
      align-items: center;
      padding: 0 11px 0 10px;
      border-bottom: 1px solid #edf1f7;
      font-size: 12px;
      color: #344357;
      background: #fff;
    }

    .trial-row:last-child {
      border-bottom: 0;
    }

    .trial-row.miss .trial-row-amount {
      color: #92a0b3;
    }

    .trial-row-index {
      text-align: center;
      color: #7e8ca0;
    }

    .trial-row-text {
      padding-right: 16px;
      color: #2e3b4d;
    }

    .trial-row-amount {
      text-align: right;
      font-weight: 600;
      color: #37465a;
      padding-right: 6px;
    }

    .trial-board-status {
      height: 250px;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      gap: 12px;
      color: #7d8da2;
      font-size: 13px;
      background: #fff;
    }

    .trial-board-status.error {
      color: #df5c64;
    }

    .trial-board-spinner {
      width: 26px;
      height: 26px;
      border-radius: 999px;
      border: 2px solid #d8e2fb;
      border-top-color: #5a74ef;
      animation: spin 0.9s linear infinite;
    }

    .trial-total {
      height: 48px;
      display: grid;
      grid-template-columns: 1fr 138px;
      align-items: center;
      padding: 0 11px 0 28px;
      border-top: 1px solid #dbe4f3;
      background: #fff;
    }

    .trial-total-label {
      text-align: center;
      font-size: 13px;
      color: #334255;
    }

    .trial-total-value {
      text-align: right;
      padding-right: 6px;
      font-size: 17px;
      line-height: 1;
      font-weight: 700;
      color: #23b5cb;
      letter-spacing: 0.2px;
    }

    .editor-mask {
      position: fixed;
      inset: 0;
      background: rgba(21, 31, 46, 0.34);
      display: none;
      align-items: center;
      justify-content: center;
      z-index: 80;
      padding: 8px;
      backdrop-filter: blur(1.5px);
    }

    .editor-mask.open {
      display: flex;
    }

    .editor-dialog {
      width: min(1218px, calc(100vw - 16px));
      height: min(772px, calc(100vh - 16px));
      background: #fff;
      border: 1px solid #dfe6f1;
      box-shadow: 0 24px 48px rgba(28, 39, 56, 0.18);
      display: flex;
      flex-direction: column;
      overflow: hidden;
    }

    .editor-header {
      height: 42px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 0 16px 0 18px;
      background: #f5f7fb;
      border-bottom: 1px solid #e5ebf3;
    }

    .editor-title {
      font-size: 14px;
      font-weight: 700;
      color: #6b7990;
    }

    .trial-title-wrap,
    .editor-title-wrap {
      display: flex;
      align-items: center;
      gap: 8px;
      min-width: 0;
    }

    .editor-close {
      width: 24px;
      height: 24px;
      border: 0;
      background: transparent;
      color: #91a0b2;
      font-size: 24px;
      line-height: 1;
      cursor: pointer;
      display: inline-flex;
      align-items: center;
      justify-content: center;
    }

    .editor-close:hover {
      color: #70819a;
    }

    .editor-tabs {
      height: 38px;
      display: flex;
      align-items: flex-end;
      gap: 30px;
      padding: 0 18px;
      background: #fff;
    }

    .editor-tab {
      height: 38px;
      padding: 0 2px;
      border: 0;
      border-bottom: 2px solid transparent;
      background: transparent;
      color: #616f84;
      font-size: 12px;
      font-weight: 600;
      cursor: pointer;
    }

    .editor-tab.active {
      color: #4f6ff0;
      border-bottom-color: #4f6ff0;
    }

    .editor-tab-add {
      height: 38px;
      border: 0;
      background: transparent;
      color: #4f6ff0;
      font-size: 24px;
      line-height: 1;
      cursor: pointer;
      padding: 0;
      margin-left: -8px;
    }

    .editor-body {
      flex: 1;
      padding: 10px 14px 0;
      overflow: auto;
      background: #fff;
    }

    .editor-section {
      margin-bottom: 16px;
    }

    .editor-section-title {
      height: 28px;
      display: flex;
      align-items: center;
      gap: 8px;
      margin-bottom: 8px;
      color: #2c4e8e;
      font-size: 14px;
      font-weight: 700;
    }

    .editor-section-title::before {
      content: "";
      width: 5px;
      height: 20px;
      background: #5874ef;
    }

    .editor-panel {
      border: 1px solid #e1e8f2;
      background: #fff;
    }

    .editor-panel-head {
      display: grid;
      align-items: center;
      min-height: 48px;
      padding: 0 14px;
      color: #8d9cb2;
      font-size: 12px;
      background: #f5f7fc;
      border-bottom: 1px solid #e4ebf5;
    }

    .editor-primary-head,
    .editor-primary-row {
      grid-template-columns: 360px 424px 88px;
      column-gap: 28px;
    }

    .editor-primary-row {
      display: grid;
      align-items: center;
      min-height: 37px;
      padding: 0 14px;
      border-bottom: 1px solid #e7edf6;
    }
    .editor-secondary-head,
    .editor-secondary-rule {
      column-gap: 6px;
    }

    .editor-secondary-head {
      display: flex;
      align-items: center;
      padding: 0 10px;
    }

    .editor-secondary-head > div {
      display: flex;
      align-items: center;
      flex: 0 0 auto;
      min-width: 0;
      white-space: nowrap;
    }

    .editor-secondary-head > div:nth-child(1) {
      width: var(--secondary-col-1);
    }

    .editor-secondary-head > div:nth-child(2) {
      width: var(--secondary-col-2);
    }

    .editor-secondary-head > div:nth-child(3) {
      width: var(--secondary-col-3);
    }

    .editor-secondary-head > div:nth-child(4) {
      width: var(--secondary-col-4);
      justify-content: center;
    }

    .editor-secondary-head > div:nth-child(5) {
      width: var(--secondary-col-5);
      justify-content: center;
    }

    .editor-secondary-head > div:nth-child(6) {
      width: var(--secondary-col-6);
      justify-content: center;
    }

    .editor-secondary-head > div:nth-child(7) {
      width: var(--secondary-col-7);
      justify-content: center;
    }

    .editor-secondary-head > div:nth-child(8) {
      width: var(--secondary-col-8);
      justify-content: center;
    }

    .editor-secondary-head > div:nth-child(9) {
      width: var(--secondary-col-9);
      justify-content: center;
    }

    .editor-secondary-head > div:nth-child(10) {
      width: var(--secondary-col-10);
      justify-content: center;
    }

    .editor-secondary-head > div:nth-child(11) {
      width: var(--secondary-col-11);
      justify-content: center;
    }

    .editor-secondary-head > div:nth-child(12) {
      width: var(--secondary-col-12);
      justify-content: center;
    }

    .editor-secondary-rule {
      display: grid;
      grid-template-columns: var(--secondary-rule-grid);
      grid-auto-rows: minmax(46px, auto);
      padding: 0 10px;
      border-bottom: 1px solid #e7edf6;
      background: #fff;
    }

    .editor-secondary-rule:last-child {
      border-bottom: 0;
    }

    .editor-secondary-cell {
      display: flex;
      align-items: center;
      min-height: 46px;
      padding: 8px 0;
      min-width: 0;
      position: relative;
    }

    .editor-secondary-cell.is-split {
      border-top: 1px solid #edf1f7;
    }

    .editor-secondary-cell--handle,
    .editor-secondary-cell--round {
      justify-content: center;
    }

    .editor-secondary-cell--shared {
      align-self: stretch;
    }

    .editor-secondary-cell--shared > * {
      width: 100%;
    }

    .editor-secondary-cell--operation {
      justify-content: flex-start;
      white-space: nowrap;
    }

    .editor-secondary-cell--operation .editor-action-links {
      gap: 4px;
    }

    .editor-cell-center {
      text-align: center;
    }

    .editor-control,
    .editor-input,
    .editor-select {
      width: 100%;
      height: 30px;
      border: 1px solid #cfd9eb;
      border-radius: 2px;
      background: #fff;
      color: #32455d;
      font-size: 12px;
      padding: 0 10px;
      transition: border-color 0.2s ease, box-shadow 0.2s ease;
    }

    .editor-input::placeholder {
      color: #b3bfd0;
    }

    .editor-control:hover,
    .editor-input:hover,
    .editor-select:hover {
      border-color: #9cb2ee;
    }

    .editor-control:focus,
    .editor-input:focus,
    .editor-select:focus {
      outline: none;
      border-color: #5d79ef;
      box-shadow: 0 0 0 3px rgba(93, 121, 239, 0.1);
    }

    .editor-select {
      appearance: none;
      background-image: linear-gradient(45deg, transparent 50%, #8695ab 50%), linear-gradient(135deg, #8695ab 50%, transparent 50%);
      background-position: calc(100% - 14px) calc(50% - 1px), calc(100% - 9px) calc(50% - 1px);
      background-size: 5px 5px, 5px 5px;
      background-repeat: no-repeat;
      padding-right: 24px;
    }

    .editor-trigger-group {
      display: grid;
      grid-template-columns: 56px minmax(0, 1fr);
      column-gap: 6px;
      align-items: center;
      width: 100%;
    }

    .editor-trigger-group.is-range {
      grid-template-columns: 56px minmax(0, 1fr) 12px minmax(0, 1fr);
    }

    .editor-range-separator {
      display: flex;
      align-items: center;
      justify-content: center;
      color: #8b97a8;
      font-size: 12px;
      line-height: 1;
      user-select: none;
    }

    .editor-error {
      border-color: #ea5b5b !important;
      box-shadow: 0 0 0 3px rgba(234, 91, 91, 0.08) !important;
    }

    .editor-handle {
      width: 12px;
      height: 18px;
      position: relative;
      opacity: 0.72;
      cursor: grab;
    }

    .editor-handle:active {
      cursor: grabbing;
    }

    .editor-handle::before {
      content: "";
      position: absolute;
      left: 2px;
      top: 2px;
      width: 2px;
      height: 2px;
      border-radius: 50%;
      background: #9babbd;
      box-shadow:
        0 4px 0 #9babbd,
        0 8px 0 #9babbd,
        5px 0 0 #9babbd,
        5px 4px 0 #9babbd,
        5px 8px 0 #9babbd;
    }

    .editor-checkbox-wrap {
      display: flex;
      align-items: center;
      justify-content: center;
    }

    .editor-checkbox {
      width: 14px;
      height: 14px;
      accent-color: #5a74ef;
      cursor: pointer;
    }

    .editor-action-links {
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 10px;
      white-space: nowrap;
    }

    .editor-secondary-cell.is-drop-target {
      background: rgba(90, 116, 239, 0.08);
    }

    .editor-secondary-cell.is-drop-target::after {
      content: "";
      position: absolute;
      left: 0;
      right: 0;
      top: -1px;
      height: 2px;
      background: #5a74ef;
    }

    .editor-action-link {
      border: 0;
      background: transparent;
      font-size: 12px;
      cursor: pointer;
      padding: 0;
      color: #4f6ff0;
    }

    .editor-action-link:hover {
      color: #3958de;
    }

    .editor-action-link.danger {
      color: #ff6066;
    }

    .editor-action-link.danger:hover {
      color: #f14349;
    }

    .editor-add-inline {
      width: 100%;
      height: 36px;
      border: 0;
      background: #fff;
      color: #5673ef;
      font-size: 12px;
      font-weight: 600;
      cursor: pointer;
    }

    .editor-add-inline:hover {
      background: #f7f9ff;
    }

    .editor-required {
      color: #ff5d63;
      margin-right: 2px;
      font-weight: 700;
    }

    .editor-footer {
      height: 68px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      padding: 0 20px;
      background: #fff;
    }

    .editor-footer-note {
      display: inline-flex;
      align-items: center;
      gap: 8px;
    }

    .editor-footer-actions {
      display: inline-flex;
      align-items: center;
      gap: 12px;
    }

    .prd-note {
      position: relative;
      display: inline-flex;
      align-items: center;
      flex-shrink: 0;
    }

    .prd-note-trigger {
      padding: 0;
      border: 0;
      background: transparent;
      cursor: pointer;
      line-height: 1;
    }

    .prd-note-trigger:focus-visible .prd-note-badge,
    .prd-note-trigger:hover .prd-note-badge,
    .prd-note-trigger[aria-expanded="true"] .prd-note-badge {
      background: #3f66e8;
      box-shadow: 0 0 0 3px rgba(77, 119, 234, 0.14);
      transform: translateY(-1px);
    }

    .prd-note-badge {
      width: 24px;
      height: 24px;
      border-radius: 999px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      background: #4d77ea;
      color: #fff;
      font-size: 10px;
      font-weight: 800;
      letter-spacing: 0.2px;
      box-shadow: 0 6px 12px rgba(77, 119, 234, 0.18);
      transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
      user-select: none;
    }

    .prd-note-panel {
      position: absolute;
      top: calc(100% + 10px);
      right: 0;
      width: 296px;
      padding: 14px 14px 12px;
      border-radius: 8px;
      border: 1px solid #d9e4fb;
      background: #fff;
      box-shadow: 0 16px 36px rgba(29, 45, 83, 0.16);
      z-index: 30;
    }

    .prd-note-panel.is-wide {
      width: 360px;
      max-height: min(460px, calc(100vh - 120px));
      overflow: auto;
    }

    .prd-note-panel::before {
      content: "";
      position: absolute;
      top: -6px;
      right: 10px;
      width: 10px;
      height: 10px;
      border-left: 1px solid #d9e4fb;
      border-top: 1px solid #d9e4fb;
      background: #fff;
      transform: rotate(45deg);
    }

    .prd-note.is-left .prd-note-panel {
      left: 0;
      right: auto;
    }

    .prd-note.is-left .prd-note-panel::before {
      left: 10px;
      right: auto;
    }

    .prd-note-title {
      margin-bottom: 8px;
      color: #23407d;
      font-size: 13px;
      font-weight: 700;
      line-height: 1.4;
    }

    .prd-note-list {
      margin: 0;
      padding-left: 16px;
      color: #5f7089;
      font-size: 12px;
      line-height: 1.6;
    }

    .prd-note-list li + li {
      margin-top: 4px;
    }

    .prd-note-guide {
      position: fixed;
      right: 22px;
      bottom: 18px;
      display: inline-flex;
      align-items: center;
      gap: 8px;
      padding: 8px 12px 8px 10px;
      border: 1px solid #d9e4fb;
      border-radius: 999px;
      background: rgba(255, 255, 255, 0.94);
      box-shadow: 0 10px 24px rgba(31, 47, 86, 0.12);
      color: #5f7089;
      font-size: 12px;
      font-weight: 600;
      z-index: 18;
      backdrop-filter: blur(8px);
    }

    .prd-drawer-mask {
      position: fixed;
      inset: 0;
      display: none;
      justify-content: flex-end;
      background: rgba(18, 28, 45, 0.26);
      backdrop-filter: blur(2px);
      z-index: 96;
    }

    .prd-drawer-mask.open {
      display: flex;
    }

    .prd-drawer {
      width: min(480px, calc(100vw - 32px));
      height: 100vh;
      background: #fff;
      box-shadow: -16px 0 36px rgba(20, 33, 58, 0.18);
      display: flex;
      flex-direction: column;
      border-left: 1px solid #dbe4f2;
    }

    .prd-drawer-head {
      min-height: 72px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 16px;
      padding: 14px 18px;
      border-bottom: 1px solid #e7edf6;
      background: linear-gradient(180deg, #f8fbff 0%, #f3f7fd 100%);
    }

    .prd-drawer-head-main {
      display: flex;
      align-items: center;
      gap: 12px;
      min-width: 0;
    }

    .prd-drawer-head-copy {
      min-width: 0;
    }

    .prd-drawer-kicker {
      color: #6d7f97;
      font-size: 12px;
      font-weight: 600;
      line-height: 1.2;
    }

    .prd-drawer-title {
      margin-top: 4px;
      color: #223a70;
      font-size: 18px;
      font-weight: 700;
      line-height: 1.35;
    }

    .prd-drawer-close {
      width: 28px;
      height: 28px;
      border: 0;
      border-radius: 6px;
      background: transparent;
      color: #8190a6;
      font-size: 26px;
      line-height: 1;
      cursor: pointer;
      transition: background 0.2s ease, color 0.2s ease;
    }

    .prd-drawer-close:hover {
      background: #eef3fb;
      color: #556781;
    }

    .prd-drawer-body {
      flex: 1;
      min-height: 0;
      overflow: auto;
      padding: 18px;
      background: #f7f9fc;
    }

    .prd-drawer-intro {
      padding: 12px 14px;
      border: 1px solid #dde6f4;
      border-radius: 8px;
      background: #fff;
      color: #62748a;
      font-size: 12px;
      line-height: 1.7;
      box-shadow: 0 8px 18px rgba(25, 38, 62, 0.05);
    }

    .prd-drawer-content {
      margin-top: 14px;
      padding: 16px;
      border: 1px solid #dde6f4;
      border-radius: 10px;
      background: #fff;
      box-shadow: 0 10px 24px rgba(25, 38, 62, 0.06);
    }

    .prd-drawer-content .prd-note-title {
      margin-bottom: 10px;
      color: #1f3970;
      font-size: 15px;
      font-weight: 700;
    }

    .prd-drawer-content .prd-note-list {
      padding-left: 18px;
      color: #53657d;
      font-size: 13px;
      line-height: 1.75;
    }

    .prd-drawer-content .prd-note-list li + li {
      margin-top: 8px;
    }

    @keyframes toast-in {
      to {
        transform: translateY(0);
        opacity: 1;
      }
    }

    @media (max-width: 1500px) {
      .section-row {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 14px 30px;
      }
    }

    @media (max-width: 1320px) {
      .section-row {
        grid-template-columns: repeat(3, minmax(0, 1fr));
      }
    }

