/* === Script Tokens & Token Usage === */
.script-token-page {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

.script-token-page__scroll {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
}

.script-token-hero {
  margin-bottom: 24px;
}

.script-token-hero h1 {
  margin: 8px 0 6px;
  font-size: 22px;
  font-weight: 700;
  color: var(--fg-body);
}

.script-token-hero p {
  margin: 0;
  font-size: 14px;
  color: var(--fg-muted);
  line-height: 1.5;
}

.script-token-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(var(--accent-rgb), 0.1);
  color: var(--accent);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.script-token-badge--soft {
  background: rgba(var(--accent-rgb), 0.06);
}

.script-token-section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 16px;
}

.script-token-section-head h2 {
  margin: 6px 0 0;
  font-size: 18px;
  font-weight: 600;
  color: var(--fg-body);
}

.script-score-count {
  font-size: 12px;
  color: var(--fg-soft);
}

.script-score-panel {
  max-width: 820px;
}

.script-input-card {
  border: 1px solid var(--border-weak);
  border-radius: var(--radius-sm);
  background: var(--bg-elevated);
  overflow: hidden;
}

.script-input-card__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border-weak);
  font-size: 13px;
  color: var(--fg-muted);
}

.script-input-card__bar strong {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--fg-body);
}

.script-input-card textarea {
  width: 100%;
  min-height: 140px;
  padding: 14px;
  border: none;
  background: transparent;
  color: var(--fg-body);
  font-size: 14px;
  line-height: 1.6;
  resize: vertical;
  outline: none;
}

.script-input-card__footer {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-top: 1px solid var(--border-weak);
}

.script-input-card__footer input[type="file"] {
  display: none;
}

.script-input-card__footer button {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xs);
  background: transparent;
  color: var(--fg-muted);
  font-size: 13px;
  cursor: pointer;
}

.script-input-card__footer button:hover {
  background: var(--bg-hover);
  color: var(--fg-body);
}

.script-action-row {
  display: flex;
  gap: 10px;
  margin: 16px 0;
}

.script-action-row button {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--fg-muted);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.15s;
}

.script-action-row button:hover {
  background: var(--bg-hover);
  color: var(--fg-body);
}

.script-action-primary {
  border-color: var(--accent) !important;
  background: rgba(var(--accent-rgb), 0.1) !important;
  color: var(--accent) !important;
}

.script-action-primary:hover {
  background: rgba(var(--accent-rgb), 0.18) !important;
}

.script-action-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.script-loading-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 32px;
  border: 1px solid var(--border-weak);
  border-radius: var(--radius-sm);
  background: var(--bg-elevated);
  text-align: center;
}

.script-loading-card__pixels {
  display: flex;
  gap: 6px;
}

.script-loading-card__pixels span {
  width: 10px;
  height: 10px;
  border-radius: 2px;
  background: var(--accent);
  animation: script-pulse 0.8s ease-in-out infinite alternate;
}

.script-loading-card__pixels span:nth-child(2) { animation-delay: 0.1s; }
.script-loading-card__pixels span:nth-child(3) { animation-delay: 0.2s; }
.script-loading-card__pixels span:nth-child(4) { animation-delay: 0.3s; }
.script-loading-card__pixels span:nth-child(5) { animation-delay: 0.4s; }

@keyframes script-pulse {
  from { opacity: 0.3; }
  to { opacity: 1; }
}

.script-loading-card strong {
  color: var(--fg-body);
}

.script-loading-card p {
  margin: 0;
  font-size: 13px;
  color: var(--fg-muted);
}

.script-result-stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.script-score-summary {
  display: flex;
  gap: 20px;
  padding: 20px;
  border: 1px solid var(--border-weak);
  border-radius: var(--radius-sm);
  background: var(--bg-elevated);
}

.script-score-ring {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 80px;
}

.script-score-ring strong {
  font-size: 32px;
  font-weight: 700;
  color: var(--accent);
}

.script-score-ring span {
  font-size: 12px;
  color: var(--fg-soft);
}

.script-score-ring em {
  font-style: normal;
  font-size: 14px;
  font-weight: 600;
  color: var(--fg-body);
}

.script-score-summary h3 {
  margin: 0 0 6px;
  font-size: 15px;
  color: var(--fg-body);
}

.script-score-summary p {
  margin: 0 0 10px;
  font-size: 13px;
  color: var(--fg-muted);
  line-height: 1.5;
}

.script-score-meta {
  display: flex;
  gap: 16px;
  font-size: 12px;
  color: var(--fg-soft);
}

.script-card {
  padding: 16px;
  border: 1px solid var(--border-weak);
  border-radius: var(--radius-sm);
  background: var(--bg-elevated);
}

.script-card h3 {
  margin: 0 0 12px;
  font-size: 14px;
  font-weight: 600;
  color: var(--fg-body);
}

.score-dimension-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}

.score-dimension-card {
  padding: 12px;
  border: 1px solid var(--border-weak);
  border-radius: var(--radius-xs);
  background: var(--bg-inset);
}

.score-dimension-card > div:first-child {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.score-dimension-card strong {
  font-size: 13px;
  color: var(--fg-body);
}

.score-dimension-card p {
  margin: 6px 0 0;
  font-size: 11px;
  color: var(--fg-soft);
}

.score-bar {
  height: 6px;
  border-radius: 3px;
  background: var(--bg-inset);
  overflow: hidden;
}

.score-bar span,
.score-bar i {
  display: block;
  height: 100%;
  border-radius: 3px;
  transition: width 0.3s;
}

.tone-good { color: var(--success); }
.tone-warn { color: var(--warning); }
.tone-orange { color: #e67e22; }
.tone-bad { color: var(--error); }
.tone-bg-good { background: var(--success); }
.tone-bg-warn { background: var(--warning); }
.tone-bg-orange { background: #e67e22; }
.tone-bg-bad { background: var(--error); }

.script-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.script-accordion {
  border: 1px solid var(--border-weak);
  border-radius: var(--radius-xs);
  background: var(--bg-inset);
  overflow: hidden;
}

.script-accordion button {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 10px 14px;
  border: none;
  background: transparent;
  color: var(--fg-body);
  font-size: 13px;
  cursor: pointer;
  text-align: left;
}

.script-accordion button em {
  margin-left: auto;
  font-style: normal;
  color: var(--error);
  font-size: 12px;
}

.script-accordion p {
  margin: 0;
  padding: 0 14px 10px;
  font-size: 12px;
  color: var(--fg-muted);
}

.script-accordion > div {
  padding: 0 14px 12px;
  font-size: 12px;
  color: var(--success);
}

.script-empty-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 40px;
  border: 1px solid var(--border-weak);
  border-radius: var(--radius-sm);
  background: var(--bg-elevated);
  text-align: center;
  color: var(--fg-dim);
}

.script-empty-card .anticon {
  font-size: 28px;
  opacity: 0.5;
}

.script-empty-card strong {
  color: var(--fg-body);
}

.script-empty-card p {
  margin: 0;
  font-size: 13px;
  color: var(--fg-muted);
}

/* === Token Usage Page === */
.token-usage-topbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 20px;
  border-bottom: 1px solid var(--border-weak);
  background: var(--bg-panel);
}

.token-usage-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--fg-body);
}

.token-usage-tool-strip {
  display: flex;
  gap: 4px;
  overflow-x: auto;
}

.token-usage-tool-strip button {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border: none;
  border-radius: var(--radius-xs);
  background: transparent;
  color: var(--fg-muted);
  font-size: 13px;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.token-usage-tool-strip button:hover {
  background: var(--bg-hover);
  color: var(--fg-body);
}

.token-usage-tool-strip button.is-active {
  background: rgba(var(--accent-rgb), 0.12);
  color: var(--accent);
}

.token-panel {
  max-width: 820px;
}

.token-range-tabs {
  display: flex;
  gap: 4px;
}

.token-range-tabs button {
  padding: 5px 12px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xs);
  background: transparent;
  color: var(--fg-muted);
  font-size: 12px;
  cursor: pointer;
}

.token-range-tabs button.is-active {
  border-color: var(--accent);
  background: rgba(var(--accent-rgb), 0.08);
  color: var(--accent);
}

.token-stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.token-stat-grid article {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px;
  border: 1px solid var(--border-weak);
  border-radius: var(--radius-sm);
  background: var(--bg-elevated);
}

.token-stat-grid article .anticon {
  font-size: 16px;
  color: var(--accent);
}

.token-stat-grid article span {
  font-size: 12px;
  color: var(--fg-muted);
}

.token-stat-grid article strong {
  font-size: 22px;
  font-weight: 700;
  color: var(--fg-body);
}

.token-stat-grid article em {
  font-style: normal;
  font-size: 11px;
  color: var(--fg-soft);
}

.token-distribution-card {
  padding: 16px;
  border: 1px solid var(--border-weak);
  border-radius: var(--radius-sm);
  background: var(--bg-elevated);
  margin-bottom: 16px;
}

.token-distribution-card > div:first-child {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.token-distribution-card > div:first-child strong {
  font-size: 14px;
  color: var(--fg-body);
}

.token-distribution-card > div:first-child span {
  font-size: 12px;
  color: var(--fg-soft);
}

.token-distribution-bar {
  display: flex;
  height: 10px;
  border-radius: 5px;
  overflow: hidden;
  background: var(--bg-inset);
  margin-bottom: 10px;
}

.token-distribution-bar span {
  height: 100%;
  transition: width 0.3s;
}

.token-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 12px;
  color: var(--fg-muted);
}

.token-legend b {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  margin-right: 4px;
  border-radius: 4px;
  background: var(--bg-inset);
  font-size: 9px;
  font-weight: 600;
  color: var(--fg-soft);
}

.token-member-stack {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.token-member-stack h3 {
  margin: 0 0 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--fg-body);
}

.token-member-card {
  border: 1px solid var(--border-weak);
  border-radius: var(--radius-sm);
  background: var(--bg-elevated);
  overflow: hidden;
}

.token-member-card__head {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 12px 14px;
  border: none;
  background: transparent;
  cursor: pointer;
  text-align: left;
}

.token-avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  background: rgba(var(--accent-rgb), 0.1);
  color: var(--accent);
  font-size: 11px;
  font-weight: 600;
}

.token-member-info {
  flex: 1;
  min-width: 0;
}

.token-member-info strong {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--fg-body);
}

.token-member-info em {
  font-style: normal;
  font-size: 11px;
  color: var(--fg-soft);
}

.token-member-info .score-bar {
  margin-top: 6px;
}

.token-usage-page.script-token-page {
  display: grid;
  grid-template-rows: 46px 52px minmax(0, 1fr);
  width: 100%;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  padding: 0 0 0 82px;
  background: #06090b;
}

.token-usage-page .script-token-page__scroll {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 34px;
  width: 100%;
  min-width: 0;
  margin: 0;
  overflow: auto;
  padding: 24px 24px 72px;
  background: #0b0f11;
  background-size: 100% 100%;
  scrollbar-color: rgba(var(--accent-rgb), 0.72) transparent;
}

.token-usage-page .script-token-page__scroll::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: transparent;
}

.token-usage-page .script-token-hero,
.token-usage-page .token-panel {
  position: relative;
  z-index: 1;
  width: min(100%, 820px);
}

.token-usage-page .script-token-hero,
.token-usage-page .token-panel,
.token-usage-page .token-stat-grid article,
.token-usage-page .token-distribution-card,
.token-usage-page .token-member-card {
  background: var(--bg-panel);
  box-shadow: none;
}

.token-usage-page .script-token-hero {
  background: var(--bg-panel);
}

.token-member-usage {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  font-size: 13px;
  font-weight: 600;
}

.token-member-usage small {
  font-size: 11px;
  font-weight: 400;
}

.token-member-card__body {
  padding: 0 14px 14px;
  border-top: 1px solid var(--border-weak);
}

.token-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 12px 0;
}

.token-detail-grid span {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--fg-muted);
}

.token-detail-grid strong {
  color: var(--fg-body);
  margin: 0 4px;
}

.token-detail-grid em {
  font-style: normal;
  font-size: 11px;
  color: var(--fg-soft);
}

.token-limit-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 0 0;
  border-top: 1px solid var(--border-weak);
  font-size: 12px;
  color: var(--fg-muted);
}

.token-limit-row strong {
  color: var(--fg-body);
}

.token-limit-row input {
  width: 80px;
  padding: 4px 8px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xs);
  background: var(--bg-inset);
  color: var(--fg-body);
  font-size: 12px;
}

.token-limit-row button {
  padding: 4px 10px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xs);
  background: transparent;
  color: var(--fg-muted);
  font-size: 12px;
  cursor: pointer;
}

.token-limit-row button:hover {
  background: var(--bg-hover);
  color: var(--fg-body);
}

/* === Script Eval Redesign === */
.script-eval-page {
  --script-bg: #0d0f10;
  --script-panel: #15191b;
  --script-panel-2: #101315;
  --script-panel-soft: #1b2022;
  --script-ink: #f3f5f2;
  --script-muted: #aeb8b1;
  --script-soft: #77827c;
  --script-line: #2a3032;
  --script-accent: #00ff88;
  --script-accent-dim: #183527;
  --script-gold: #f3aa26;
  --script-green: #26d06e;
  --script-red: #ff5a5f;
  background: var(--script-bg);
  color: var(--script-ink);
}

.script-eval-shell {
  width: min(100%, 1480px);
  min-height: 100%;
  margin: 0 auto;
  padding: 24px clamp(18px, 3vw, 42px) 56px;
}

.script-eval-page .script-token-badge {
  border: 1px solid rgba(0, 255, 136, 0.22);
  background: rgba(0, 255, 136, 0.08);
  color: var(--script-accent);
  font-weight: 800;
}

.script-eval-workbench {
  display: grid;
  grid-template-columns: minmax(480px, 0.95fr) minmax(520px, 1.05fr);
  gap: 18px;
  align-items: start;
}

.script-eval-left,
.script-eval-right {
  display: grid;
  gap: 16px;
  min-width: 0;
}

.script-eval-card,
.script-eval-scoreboard {
  border: 1px solid var(--script-line);
  border-radius: 18px;
  background: var(--script-panel);
  box-shadow: none;
}

.script-eval-card {
  padding: 18px;
}

.script-eval-card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.script-eval-card__head span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--script-accent);
  font-size: 12px;
  font-weight: 800;
}

.script-eval-card__head h2 {
  margin: 5px 0 0;
  color: var(--script-ink);
  font-size: 20px;
  font-weight: 800;
}

.script-eval-card__head em {
  flex: 0 0 auto;
  font-style: normal;
  color: var(--script-soft);
  font-size: 12px;
  font-weight: 700;
}

.script-eval-card__head h2,
.script-eval-scoreboard h2,
.script-eval-total-score strong,
.script-eval-empty strong,
.script-eval-preview strong,
.script-eval-loading strong,
.script-eval-insight-grid strong,
.script-eval-criteria strong,
.script-eval-page .score-dimension-card strong,
.script-eval-page .script-accordion button {
  color: var(--script-ink);
}

.script-eval-loading p,
.script-eval-empty p,
.script-eval-preview p,
.script-eval-diagnosis > p,
.script-eval-scoreboard p,
.script-eval-page .score-dimension-card p,
.script-eval-page .script-accordion p,
.script-eval-criteria p {
  color: var(--script-muted);
}

.script-eval-import-strip {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  margin-bottom: 12px;
  padding: 12px;
  border: 1px solid var(--script-line);
  border-radius: 14px;
  background: var(--script-panel-2);
}

.script-eval-import-strip > div {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 2px 10px;
  align-items: center;
  min-width: 0;
}

.script-eval-import-strip .anticon {
  grid-row: span 2;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--script-accent-dim);
  color: var(--script-accent);
}

.script-eval-import-strip strong {
  overflow: hidden;
  color: var(--script-ink);
  font-size: 14px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.script-eval-import-strip span {
  color: var(--script-soft);
  font-size: 12px;
  font-weight: 600;
}

.script-eval-import-strip input {
  display: none;
}

.script-eval-page button {
  border-radius: 12px;
}

.script-eval-import-strip button,
.script-eval-actions button,
.script-accordion button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 38px;
  border: 1px solid var(--script-line);
  background: var(--script-panel-soft);
  color: var(--script-ink);
  padding: 0 13px;
  font-size: 13px;
  font-weight: 750;
  cursor: pointer;
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    background 160ms ease;
}

.script-eval-import-strip button:hover,
.script-eval-actions button:hover,
.script-accordion button:hover {
  transform: translateY(-1px);
  border-color: rgba(0, 255, 136, 0.38);
  background: #202527;
}

.script-eval-input-card textarea {
  width: 100%;
  min-height: 430px;
  padding: 16px;
  border: 1px solid var(--script-line);
  border-radius: 16px;
  outline: none;
  resize: vertical;
  background: var(--script-panel-2);
  color: var(--script-ink);
  font-size: 15px;
  font-weight: 500;
  line-height: 1.75;
}

.script-eval-input-card textarea:focus {
  border-color: rgba(0, 255, 136, 0.45);
  box-shadow: 0 0 0 3px rgba(0, 255, 136, 0.08);
}

.script-eval-input-card textarea::placeholder {
  color: #6f7b74;
}

.script-eval-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.script-eval-actions .script-eval-primary {
  border-color: var(--script-accent);
  background: var(--script-accent);
  color: #061014;
  box-shadow: none;
}

.script-eval-actions .script-eval-primary:hover:not(:disabled) {
  background: #58ffac;
}

.script-eval-actions .script-eval-primary:disabled {
  cursor: not-allowed;
  opacity: 0.45;
  transform: none;
  box-shadow: none;
}

.script-eval-loading {
  display: grid;
  justify-items: center;
  gap: 10px;
  padding: 28px;
  text-align: center;
}

.script-eval-loading strong,
.script-eval-empty strong,
.script-eval-preview strong {
  color: var(--script-ink);
  font-size: 15px;
  font-weight: 800;
}

.script-eval-loading p,
.script-eval-empty p,
.script-eval-preview p,
.script-eval-diagnosis > p,
.script-eval-scoreboard p {
  margin: 0;
  color: var(--script-muted);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.65;
}

.script-eval-empty,
.script-eval-preview {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 13px;
  align-items: center;
}

.script-eval-empty > .anticon,
.script-eval-preview > .anticon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--script-accent-dim);
  color: var(--script-accent);
  font-size: 20px;
}

.script-eval-scoreboard {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  padding: 18px;
  background: var(--script-panel);
  color: var(--script-ink);
}

.script-eval-score-ring {
  --score: 0;
  display: grid;
  place-items: center;
  align-content: center;
  width: 124px;
  height: 124px;
  border-radius: 50%;
  background:
    radial-gradient(circle at center, var(--script-panel) 0 58%, transparent 59%),
    conic-gradient(var(--script-accent) calc(var(--score) * 1%), rgba(255, 255, 255, 0.1) 0);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}

.script-eval-score-ring strong {
  color: var(--script-ink);
  font-size: 36px;
  font-weight: 850;
  line-height: 1;
}

.script-eval-score-ring span {
  color: var(--script-soft);
  font-size: 12px;
  font-weight: 700;
}

.script-eval-score-ring em {
  margin-top: 5px;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--script-accent-dim);
  color: var(--script-accent);
  font-style: normal;
  font-size: 12px;
  font-weight: 800;
}

.script-eval-scoreboard h2 {
  margin: 10px 0 8px;
  color: var(--script-ink);
  font-size: 24px;
  font-weight: 850;
}

.script-eval-scoreboard p {
  color: var(--script-muted);
}

.script-eval-diagnosis {
  display: grid;
  gap: 14px;
}

.script-eval-insight-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.script-eval-insight-grid article {
  display: grid;
  gap: 4px;
  min-height: 66px;
  padding: 12px;
  border: 1px solid var(--script-line);
  border-radius: 14px;
  background: var(--script-panel-soft);
}

.script-eval-insight-grid strong {
  color: var(--script-ink);
  font-size: 15px;
  font-weight: 800;
}

.script-eval-insight-grid span {
  color: var(--script-muted);
  font-size: 12px;
  font-weight: 650;
}

.script-eval-dimensions .score-dimension-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.script-eval-page .score-dimension-card {
  border-color: var(--script-line);
  border-radius: 14px;
  background: var(--script-panel-2);
}

.script-eval-page .score-dimension-card strong,
.script-eval-page .script-accordion button {
  color: var(--script-ink);
}

.script-eval-page .score-dimension-card p,
.script-eval-page .script-accordion p {
  color: var(--script-muted);
}

.script-eval-page .score-bar {
  background: rgba(255, 255, 255, 0.08);
}

.script-eval-criteria {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.script-eval-criteria article {
  min-height: 96px;
  padding: 13px;
  border: 1px solid var(--script-line);
  border-radius: 14px;
  background: var(--script-panel-2);
}

.script-eval-criteria div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.script-eval-criteria strong {
  color: var(--script-ink);
  font-size: 14px;
  font-weight: 800;
}

.script-eval-criteria span {
  color: var(--script-accent);
  font-size: 12px;
  font-weight: 800;
}

.script-eval-criteria p {
  margin: 0;
  color: var(--script-muted);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.6;
}

.script-eval-page .script-list {
  gap: 10px;
}

.script-eval-page .script-accordion {
  border-color: var(--script-line);
  border-radius: 14px;
  background: var(--script-panel-2);
}

.script-eval-page .script-accordion button {
  justify-content: flex-start;
  min-height: 44px;
  background: transparent;
}

.script-eval-page .script-accordion button span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.script-eval-page .script-accordion button em {
  margin-left: auto;
  color: var(--script-accent);
  font-weight: 800;
}

.script-eval-page .script-accordion > div {
  margin: 0 12px 12px;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--script-accent-dim);
  color: var(--script-green);
  font-weight: 650;
  line-height: 1.55;
}

.script-eval-scope-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.script-eval-scope-list span {
  padding: 7px 10px;
  border: 1px solid var(--script-line);
  border-radius: 999px;
  background: var(--script-panel-2);
  color: var(--script-muted);
  font-size: 12px;
  font-weight: 700;
}

.script-eval-page .tone-good { color: var(--script-green); }
.script-eval-page .tone-warn { color: var(--script-gold); }
.script-eval-page .tone-orange { color: #da7b20; }
.script-eval-page .tone-bad { color: var(--script-accent); }
.script-eval-page .tone-bg-good { background: var(--script-green); }
.script-eval-page .tone-bg-warn { background: var(--script-gold); }
.script-eval-page .tone-bg-orange { background: #da7b20; }
.script-eval-page .tone-bg-bad { background: var(--script-accent); }

/* === Radar Chart System === */
.radar-chart-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 260px;
}

.radar-chart-svg {
  width: 100%;
  height: auto;
}

.radar-grid-line {
  fill: none;
  stroke: var(--script-line);
  stroke-width: 0.8;
}

.radar-axis-line {
  stroke: var(--script-line);
  stroke-width: 0.5;
  stroke-dasharray: 3 3;
}

.radar-data-area {
  fill: url(#radarFill);
  transition: all 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.radar-data-stroke {
  fill: none;
  stroke: #2dd4bf;
  stroke-width: 2;
  stroke-linejoin: round;
  filter: url(#radarGlow);
  transition: all 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.radar-data-dot {
  fill: #2dd4bf;
  stroke: var(--script-panel);
  stroke-width: 2;
  filter: url(#radarGlow);
  transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.radar-label {
  fill: var(--script-muted);
  font-size: 11px;
  font-weight: 700;
  text-anchor: middle;
  dominant-baseline: middle;
}

.script-eval-scoreboard--radar {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  padding: 22px;
  background: var(--script-panel);
}

.script-eval-scoreboard__info {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.script-eval-total-score {
  display: flex;
  align-items: baseline;
  gap: 4px;
  margin: 4px 0;
}

.script-eval-total-score strong {
  font-size: 42px;
  font-weight: 850;
  color: var(--script-ink);
  line-height: 1;
}

.script-eval-total-score span {
  font-size: 14px;
  font-weight: 700;
  color: var(--script-soft);
}

.script-eval-total-score em {
  font-style: normal;
  margin-left: 8px;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(45, 212, 191, 0.12);
  border: 1px solid rgba(45, 212, 191, 0.25);
  color: #2dd4bf;
  font-size: 13px;
  font-weight: 800;
}

@media (max-width: 1180px) {
  .script-eval-workbench {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .script-eval-shell {
    padding: 18px 14px 38px;
  }

  .script-eval-insight-grid,
  .script-eval-dimensions .score-dimension-grid,
  .script-eval-criteria,
  .script-eval-scoreboard--radar {
    grid-template-columns: 1fr;
  }

  .radar-chart-wrap {
    max-width: 220px;
    margin: 0 auto;
  }

  .script-eval-workbench {
    grid-template-columns: minmax(0, 1fr);
  }

  .script-eval-input-card textarea {
    min-height: 300px;
  }
}

@media (max-width: 520px) {
  .script-eval-import-strip,
  .script-eval-empty,
  .script-eval-preview {
    grid-template-columns: 1fr;
  }

  .script-eval-actions,
  .script-eval-actions button,
  .script-eval-import-strip button {
    width: 100%;
  }

  .script-eval-actions button,
  .script-eval-import-strip button {
    justify-content: center;
  }
}

/* === Script Evaluation V2: glass review console === */
.script-eval-page {
  --eval-bg-primary: #050508;
  --eval-bg-layer-1: rgba(20, 22, 35, 0.4);
  --eval-bg-layer-2: rgba(30, 33, 48, 0.3);
  --eval-glass-border: rgba(100, 116, 139, 0.12);
  --eval-glass-highlight: rgba(255, 255, 255, 0.06);
  --eval-backdrop-blur: blur(20px);
  --eval-text-white: #fff;
  --eval-text-primary: #e2e8f0;
  --eval-text-secondary: #94a3b8;
  --eval-text-tertiary: #64748b;
  --eval-text-placeholder: #475569;
  --eval-accent-start: #00ff88;
  --eval-accent-mid: #10b981;
  --eval-accent-end: #059669;
  --eval-accent-glow: rgba(16, 185, 129, 0.3);
  --eval-accent-subtle: rgba(16, 185, 129, 0.08);
  --eval-glow-gradient: none;
  background: var(--eval-bg-primary);
  color: var(--eval-text-primary);
}

.script-eval-page .script-token-page__scroll.script-eval-stage {
  position: relative;
  min-height: 100%;
  padding: 0;
  overflow-x: hidden;
  background: var(--eval-bg-primary);
}

.script-eval-stage::before,
.script-eval-stage::after {
  position: fixed;
  z-index: 0;
  border-radius: 50%;
  content: "";
  pointer-events: none;
}

.script-eval-stage::before {
  top: -120px;
  left: -120px;
  width: 420px;
  height: 420px;
  background: var(--eval-accent-glow);
}

.script-eval-stage::after {
  right: -160px;
  bottom: -170px;
  width: 520px;
  height: 520px;
  background: rgba(59, 130, 246, 0.15);
}

.script-eval-app {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 48px;
  width: min(100%, 1600px);
  min-height: 100%;
  margin: 0 auto;
  padding: 32px;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", "PingFang SC", sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.script-eval-sidebar-icons {
  display: flex;
  flex: 0 0 auto;
  flex-direction: column;
  gap: 24px;
  padding-top: 16px;
}

.script-eval-sidebar-icons .anticon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 6px;
  color: var(--eval-text-tertiary);
  cursor: pointer;
  transition:
    background 0.3s cubic-bezier(0.4, 0, 0.2, 1),
    box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1),
    color 0.3s cubic-bezier(0.4, 0, 0.2, 1),
    transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.script-eval-sidebar-icons .anticon svg {
  width: 20px;
  height: 20px;
}

.script-eval-sidebar-icons .anticon:hover {
  background: var(--eval-accent-subtle);
  color: var(--eval-text-white);
  transform: scale(1.05);
}

.script-eval-sidebar-icons .anticon.active {
  background: var(--eval-accent-subtle);
  color: var(--eval-accent-mid);
  box-shadow: 0 0 20px var(--eval-accent-glow);
}

.script-eval-sidebar-icons .spacer {
  flex: 1;
}

.script-eval-panel-left,
.script-eval-panel-right {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.script-eval-panel-left {
  flex: 1.2;
}

.script-eval-panel-right {
  flex: 1;
  gap: 24px;
}

.script-eval-panel-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 24px;
}

.script-eval-panel-title .label {
  background: var(--eval-accent-start);
  background-clip: text;
  color: transparent;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

.script-eval-panel-title .divider {
  width: 1px;
  height: 12px;
  background: var(--eval-glass-border);
}

.script-eval-panel-title .text {
  color: var(--eval-text-secondary);
  font-size: 14px;
  font-weight: 500;
}

.script-eval-glass-card {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  background: var(--eval-bg-layer-1);
  backdrop-filter: var(--eval-backdrop-blur);
  -webkit-backdrop-filter: var(--eval-backdrop-blur);
}

.script-eval-glass-card::before {
  position: absolute;
  inset: 0;
  padding: 1px;
  border-radius: 16px;
  background: var(--eval-glow-gradient);
  content: "";
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask-composite: exclude;
  pointer-events: none;
}

.script-eval-glass-card::after {
  position: absolute;
  top: 0;
  right: 15%;
  left: 15%;
  height: 1px;
  background: rgba(255, 255, 255, 0.15);
  content: "";
  pointer-events: none;
}

.script-eval-input-card-v2,
.script-eval-score-card-v2,
.script-eval-details-card-v2 {
  transition:
    box-shadow 0.3s ease,
    transform 0.3s ease;
}

.script-eval-input-card-v2:hover,
.script-eval-score-card-v2:hover,
.script-eval-details-card-v2:hover {
  box-shadow: none;
  transform: translateY(-2px);
}

.script-eval-input-card-v2 {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 24px;
  padding: 24px;
}

.script-eval-upload-area {
  position: relative;
  display: flex;
  align-items: center;
  gap: 16px;
  overflow: hidden;
  padding: 16px 24px;
  border: 1px dashed var(--eval-glass-border);
  border-radius: 12px;
  background: var(--eval-bg-layer-2);
  cursor: pointer;
  transition:
    border-color 0.3s cubic-bezier(0.4, 0, 0.2, 1),
    transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.script-eval-upload-area::before {
  position: absolute;
  inset: 0;
  background: var(--eval-accent-subtle);
  content: "";
  opacity: 0;
  transition: opacity 0.3s;
}

.script-eval-upload-area:hover {
  border-color: rgba(16, 185, 129, 0.4);
  transform: translateY(-1px);
}

.script-eval-upload-area:hover::before {
  opacity: 1;
}

.script-eval-upload-area > .anticon,
.script-eval-upload-area .upload-text,
.script-eval-upload-area .script-eval-upload-btn {
  position: relative;
  z-index: 1;
}

.script-eval-upload-area > .anticon {
  flex: 0 0 auto;
  color: var(--eval-text-tertiary);
  font-size: 18px;
}

.script-eval-upload-area:hover > .anticon {
  color: var(--eval-accent-mid);
}

.script-eval-upload-area input {
  display: none;
}

.script-eval-upload-area .upload-text {
  min-width: 0;
  flex: 1;
  overflow: hidden;
  color: var(--eval-text-primary);
  font-size: 13px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.script-eval-upload-area .hint {
  overflow: hidden;
  margin-top: 2px;
  color: var(--eval-text-tertiary);
  font-size: 11px;
  font-weight: 400;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.script-eval-upload-btn {
  min-height: 34px;
  padding: 8px 20px;
  border: 0;
  border-radius: 6px;
  background: var(--eval-accent-start);
  color: var(--eval-bg-primary);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
  font-size: 12px;
  font-weight: 700;
  transition:
    box-shadow 0.3s,
    transform 0.3s;
}

.script-eval-upload-btn:hover {
  box-shadow: none;
  transform: translateY(-1px);
}

.script-eval-text-input-container {
  position: relative;
  flex: 1;
  overflow: hidden;
  border: 1px solid var(--eval-glass-border);
  border-radius: 12px;
  background: var(--eval-bg-layer-2);
  transition:
    border-color 0.3s,
    box-shadow 0.3s;
}

.script-eval-text-input-container:focus-within {
  border-color: rgba(16, 185, 129, 0.3);
  box-shadow: 0 0 30px var(--eval-accent-subtle);
}

.script-eval-line-numbers {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  display: grid;
  align-content: start;
  width: 48px;
  padding: 24px 14px;
  border-right: 1px solid var(--eval-glass-border);
  background: rgba(0, 0, 0, 0.2);
  color: var(--eval-text-tertiary);
  font-family: "SF Mono", Monaco, Menlo, Consolas, monospace;
  font-size: 12px;
  line-height: 1.8;
  opacity: 0.4;
  text-align: right;
  user-select: none;
}

.script-eval-line-numbers span {
  height: 21.6px;
}

.script-eval-text-input {
  width: 100%;
  height: 100%;
  min-height: 430px;
  padding: 24px;
  padding-left: 64px;
  border: 0;
  outline: none;
  resize: vertical;
  background: transparent;
  color: var(--eval-text-white);
  font-family: "SF Mono", Monaco, Menlo, Consolas, monospace;
  font-size: 13px;
  line-height: 1.8;
}

.script-eval-text-input::placeholder {
  color: var(--eval-text-placeholder);
}

.script-eval-button-group {
  display: flex;
  gap: 16px;
}

.script-eval-btn-primary,
.script-eval-btn-secondary,
.script-eval-details-header {
  border-radius: 12px;
  font-size: 14px;
}

.script-eval-btn-primary {
  position: relative;
  overflow: hidden;
  min-height: 46px;
  padding: 12px 28px;
  border: 1px solid rgba(16, 185, 129, 0.5);
  background: transparent;
  color: var(--eval-accent-start);
  font-weight: 700;
  letter-spacing: 0.3px;
  transition:
    border-color 0.3s cubic-bezier(0.4, 0, 0.2, 1),
    box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1),
    color 0.3s cubic-bezier(0.4, 0, 0.2, 1),
    transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.script-eval-btn-primary::before {
  position: absolute;
  inset: 0;
  background: var(--eval-accent-start);
  content: "";
  opacity: 0;
  transition: opacity 0.3s;
}

.script-eval-btn-primary span {
  position: relative;
  z-index: 1;
}

.script-eval-btn-primary:hover:not(:disabled)::before {
  opacity: 1;
}

.script-eval-btn-primary:hover:not(:disabled) {
  border-color: transparent;
  color: var(--eval-bg-primary);
  box-shadow: none;
  transform: translateY(-2px);
}

.script-eval-btn-primary:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.script-eval-btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 12px 24px;
  border: 1px solid var(--eval-glass-border);
  background: transparent;
  color: var(--eval-text-secondary);
  font-weight: 500;
  transition:
    background 0.3s,
    border-color 0.3s,
    color 0.3s;
}

.script-eval-btn-secondary:hover {
  border-color: var(--eval-text-tertiary);
  background: rgba(255, 255, 255, 0.03);
  color: var(--eval-text-white);
}

.script-eval-score-card-v2 {
  padding: 24px;
}

.script-eval-score-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 24px;
}

.script-eval-score-title,
.script-eval-details-title {
  color: var(--eval-text-tertiary);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

.script-eval-score-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--eval-text-tertiary);
  font-size: 12px;
}

.script-eval-score-status::before {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--eval-text-tertiary);
  content: "";
}

.script-eval-score-status.ready::before {
  background: var(--eval-accent-mid);
  box-shadow: 0 0 8px var(--eval-accent-glow);
}

.script-eval-score-main {
  display: flex;
  gap: 24px;
  margin-bottom: 24px;
}

.script-eval-radar-container {
  position: relative;
  display: flex;
  flex: 0 0 200px;
  align-items: center;
  justify-content: center;
  width: 200px;
  height: 200px;
}

.script-eval-radar-container::before {
  position: absolute;
  width: 160px;
  height: 160px;
  border-radius: 50%;
  background: var(--eval-accent-subtle);
  content: "";
  opacity: 0;
  transition: opacity 0.5s;
}

.script-eval-radar-container.has-glow::before {
  opacity: 1;
}

.script-eval-radar-svg {
  position: relative;
  z-index: 1;
  width: 180px;
  height: 180px;
}

.script-eval-radar-grid polygon {
  fill: none;
  stroke: var(--eval-glass-border);
  stroke-width: 1;
}

.script-eval-radar-grid line {
  stroke: var(--eval-glass-border);
  stroke-width: 0.5;
}

.script-eval-radar-outline {
  fill: url(#scriptEvalRadarGradient);
  stroke: var(--eval-accent-mid);
  stroke-width: 2;
  opacity: 0;
  transform: scale(0.8);
  transform-origin: center;
  transition:
    opacity 0.5s,
    transform 0.5s;
}

.script-eval-radar-outline.has-data {
  opacity: 1;
  transform: scale(1);
}

.script-eval-score-display {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
  padding-left: 16px;
}

.script-eval-score-number {
  color: var(--eval-text-tertiary);
  font-size: 64px;
  font-weight: 200;
  letter-spacing: -3px;
  line-height: 1;
  transition: all 0.5s;
}

.script-eval-score-number.has-data {
  background: var(--eval-accent-start);
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 20px var(--eval-accent-glow));
  text-shadow: 0 0 40px var(--eval-accent-glow);
}

.script-eval-score-label {
  margin-top: 8px;
  color: var(--eval-text-secondary);
  font-size: 13px;
  font-weight: 500;
}

.script-eval-score-hint {
  max-width: 380px;
  margin-top: 12px;
  color: var(--eval-text-tertiary);
  font-size: 12px;
  line-height: 1.6;
}

.script-eval-dimensions-tags {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 20px;
  padding-top: 24px;
  border-top: 1px solid var(--eval-glass-border);
}

.script-eval-dimensions-tags::after {
  position: absolute;
  top: -1px;
  left: 0;
  width: 40px;
  height: 1px;
  background: var(--eval-accent-mid);
  content: "";
}

.script-eval-dimensions-tags .tag {
  color: var(--eval-text-tertiary);
  cursor: default;
  font-size: 12px;
  transition: color 0.3s;
}

.script-eval-dimensions-tags .tag:hover {
  color: var(--eval-text-white);
}

.script-eval-dimensions-tags .tag::after {
  display: inline-block;
  width: 3px;
  height: 3px;
  margin-bottom: 3px;
  margin-left: 20px;
  border-radius: 50%;
  background: var(--eval-text-placeholder);
  content: "";
  opacity: 0.5;
}

.script-eval-dimensions-tags .tag:last-child::after {
  display: none;
}

.script-eval-details-card-v2 {
  overflow: hidden;
}

.script-eval-details-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 64px;
  padding: 0 24px;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  transition: background 0.2s;
}

.script-eval-details-header:hover {
  background: rgba(255, 255, 255, 0.02);
}

.script-eval-expand-icon {
  color: var(--eval-text-tertiary);
  font-size: 10px;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.script-eval-expand-icon.expanded {
  transform: rotate(180deg);
}

.script-eval-details-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.script-eval-details-content.expanded {
  max-height: 680px;
}

.script-eval-details-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 0 24px 24px;
}

.script-eval-detail-row {
  padding: 12px;
  border-radius: 6px;
  transition: background 0.2s;
}

.script-eval-detail-row:hover {
  background: var(--eval-bg-layer-2);
}

.script-eval-detail-row-main {
  display: flex;
  align-items: center;
  gap: 16px;
}

.script-eval-dimension-name {
  width: 80px;
  flex: 0 0 auto;
  color: var(--eval-text-secondary);
  font-size: 13px;
  font-weight: 500;
}

.script-eval-dimension-bar {
  position: relative;
  overflow: hidden;
  flex: 1;
  height: 6px;
  border-radius: 3px;
  background: var(--eval-glass-border);
}

.script-eval-dimension-bar-fill {
  display: block;
  height: 100%;
  border-radius: 3px;
  background: var(--eval-accent-start);
  box-shadow: 0 0 10px var(--eval-accent-glow);
  transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.script-eval-dimension-score {
  width: 54px;
  flex: 0 0 auto;
  color: var(--eval-text-tertiary);
  font-size: 13px;
  font-weight: 500;
  text-align: right;
}

.script-eval-dimension-desc {
  margin-top: 6px;
  padding-left: 96px;
  color: var(--eval-text-tertiary);
  font-size: 11px;
  opacity: 0.8;
}

.script-eval-score-card-v2.loading .script-eval-radar-outline {
  animation: script-eval-pulse-soft 1.5s ease-in-out infinite;
  opacity: 0.3;
}

.script-eval-score-card-v2.loading .script-eval-score-number {
  background: var(--eval-text-secondary);
  background-size: 200% 100%;
  background-clip: text;
  color: transparent;
  animation: script-eval-shimmer 1.5s infinite;
}

@keyframes script-eval-pulse-soft {
  0%,
  100% {
    opacity: 0.5;
    transform: scale(1);
  }

  50% {
    opacity: 1;
    transform: scale(1.02);
  }
}

@keyframes script-eval-shimmer {
  0% {
    background-position: -200% 0;
  }

  100% {
    background-position: 200% 0;
  }
}

@media (max-width: 1180px) {
  .script-eval-app {
    flex-direction: column;
  }

  .script-eval-sidebar-icons {
    flex-direction: row;
    padding-top: 0;
  }

  .script-eval-sidebar-icons .spacer {
    flex: 1;
  }
}

@media (max-width: 760px) {
  .script-eval-app {
    gap: 24px;
    padding: 20px 14px 38px;
  }

  .script-eval-score-main {
    flex-direction: column;
  }

  .script-eval-radar-container {
    align-self: center;
  }

  .script-eval-score-display {
    padding-left: 0;
    text-align: center;
  }

  .script-eval-score-hint {
    max-width: none;
  }

  .script-eval-text-input {
    min-height: 320px;
  }
}

@media (max-width: 520px) {
  .script-eval-upload-area,
  .script-eval-button-group,
  .script-eval-detail-row-main {
    align-items: stretch;
    flex-direction: column;
  }

  .script-eval-upload-btn,
  .script-eval-btn-primary,
  .script-eval-btn-secondary {
    width: 100%;
  }

  .script-eval-dimension-name,
  .script-eval-dimension-score {
    width: auto;
    text-align: left;
  }

  .script-eval-dimension-desc {
    padding-left: 0;
  }
}

/* === Script Evaluation V3: screenshot-aligned distribution === */
.script-eval-page {
  --eval-bg-primary: #040807;
  --eval-bg-panel: rgba(18, 23, 24, 0.88);
  --eval-bg-panel-soft: rgba(15, 21, 21, 0.78);
  --eval-bg-field: rgba(7, 12, 13, 0.72);
  --eval-border: rgba(168, 255, 212, 0.16);
  --eval-border-strong: rgba(0, 255, 136, 0.28);
  --eval-main-green: #00ff88;
  --eval-dark-green: #00cc6a;
  --eval-soft-green: rgba(0, 255, 136, 0.08);
  --eval-text-white: #fff;
  --eval-text-main: #e6efec;
  --eval-text-muted: #9aa8a3;
  --eval-text-dim: #6f7f79;
  --eval-shadow: none;
  background: var(--eval-bg-primary);
  color: var(--eval-text-main);
}

.script-eval-page .script-token-page__scroll.script-eval-stage {
  min-height: 100%;
  padding: 0;
  overflow-x: hidden;
  background: transparent;
}

.script-eval-stage::before,
.script-eval-stage::after {
  display: none;
}

.script-eval-app {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(520px, 0.95fr) minmax(620px, 1.05fr);
  gap: 20px;
  width: min(calc(100% - 240px), 1536px);
  min-height: auto;
  margin: 0 auto;
  padding: 56px 0 82px;
  font-family: "PingFang SC", "Microsoft YaHei", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.script-eval-sidebar-icons {
  position: fixed;
  top: 50%;
  left: 18px;
  z-index: 5;
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 70px;
  padding: 18px 0;
  border: 1px solid var(--eval-border);
  border-radius: 20px;
  background: rgba(8, 10, 12, 0.92);
  box-shadow: none;
  transform: translateY(-50%);
}

.script-eval-sidebar-icons .anticon {
  width: 44px;
  height: 44px;
  margin: 0 auto;
  border: 1px solid transparent;
  border-radius: 10px;
  color: var(--eval-text-muted);
}

.script-eval-sidebar-icons .anticon:hover {
  border-color: var(--eval-border-strong);
  background: var(--eval-soft-green);
  color: var(--eval-main-green);
}

.script-eval-sidebar-icons .anticon.active {
  border-color: var(--eval-main-green);
  background: rgba(0, 255, 136, 0.12);
  color: var(--eval-main-green);
  box-shadow: 0 0 20px rgba(0, 255, 136, 0.22);
}

.script-eval-sidebar-icons .spacer {
  width: 34px;
  height: 1px;
  flex: 0 0 auto;
  margin: 2px auto;
  background: rgba(255, 255, 255, 0.12);
}

.script-eval-panel-left,
.script-eval-panel-right {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 18px;
}

.script-eval-glass-card {
  border: 1px solid var(--eval-border);
  border-radius: 18px;
  background: var(--eval-bg-panel);
  box-shadow: var(--eval-shadow);
  backdrop-filter: none;
}

.script-eval-glass-card::before {
  display: none;
}

.script-eval-glass-card::after {
  right: 24px;
  left: 24px;
  background: rgba(255, 255, 255, 0.14);
}

.script-eval-input-card-v2,
.script-eval-score-card-v2,
.script-eval-details-card-v2 {
  transition:
    border-color 0.25s ease,
    box-shadow 0.25s ease,
    transform 0.25s ease;
}

.script-eval-input-card-v2:hover,
.script-eval-score-card-v2:hover,
.script-eval-details-card-v2:hover {
  border-color: rgba(0, 255, 136, 0.24);
  box-shadow: none;
  transform: translateY(-1px);
}

.script-eval-input-card-v2 {
  display: flex;
  min-height: 730px;
  padding: 24px 20px 22px;
  flex-direction: column;
  gap: 16px;
}

.script-eval-input-card-head {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 16px;
  align-items: start;
}

.script-eval-input-card-head h2,
.script-eval-diagnosis-card h2,
.script-eval-details-header strong,
.script-eval-score-display h2 {
  margin: 0;
  color: var(--eval-text-white);
  font-size: 26px;
  font-weight: 850;
  letter-spacing: 0;
  line-height: 1.15;
}

.script-eval-input-card-head h2 {
  grid-column: 1 / -1;
}

.script-eval-file-types {
  color: var(--eval-text-muted);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.8px;
}

.script-eval-section-kicker {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}

.script-eval-section-kicker__label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--eval-main-green);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.6px;
  line-height: 1;
}

.script-eval-section-kicker__label .anticon {
  font-size: 13px;
}

.script-eval-section-kicker__meta {
  color: var(--eval-text-muted);
  font-size: 13px;
  font-weight: 800;
}

.script-eval-upload-area {
  min-height: 70px;
  padding: 14px;
  border: 1px solid var(--eval-border);
  border-radius: 16px;
  background: var(--eval-bg-field);
}

.script-eval-upload-area > .anticon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: rgba(0, 255, 136, 0.12);
  color: var(--eval-main-green);
  font-size: 16px;
}

.script-eval-upload-area .upload-text {
  color: var(--eval-text-white);
  font-size: 15px;
  font-weight: 850;
}

.script-eval-upload-area .hint {
  margin-top: 2px;
  color: var(--eval-text-muted);
  font-size: 13px;
}

.script-eval-upload-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 96px;
  min-height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--eval-text-white);
  box-shadow: none;
  font-size: 14px;
  font-weight: 850;
}

.script-eval-upload-btn::before {
  margin-right: 8px;
  color: var(--eval-main-green);
  content: "↥";
}

.script-eval-text-input {
  flex: 1;
  min-height: 470px;
  padding: 22px 18px;
  border: 1px solid var(--eval-border);
  border-radius: 16px;
  outline: none;
  resize: none;
  background: var(--eval-bg-field);
  color: var(--eval-text-main);
  font-family: "PingFang SC", "Microsoft YaHei", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.85;
}

.script-eval-text-input:focus {
  border-color: var(--eval-border-strong);
  box-shadow: 0 0 0 3px rgba(0, 255, 136, 0.05);
}

.script-eval-text-input::placeholder {
  color: var(--eval-text-muted);
}

.script-eval-button-group {
  display: flex;
  gap: 10px;
  margin-top: 2px;
}

.script-eval-btn-primary,
.script-eval-btn-secondary {
  min-height: 44px;
  border-radius: 14px;
  font-size: 14px;
}

.script-eval-btn-primary {
  min-width: 112px;
  padding: 0 20px;
  border: 0;
  background: #00d975;
  color: #02120b;
  box-shadow: none;
  font-weight: 900;
}

.script-eval-btn-primary::before {
  background: var(--eval-main-green);
}

.script-eval-btn-primary span::before {
  margin-right: 8px;
  content: "⬡";
}

.script-eval-btn-secondary {
  min-width: 84px;
  padding: 0 16px;
  border: 1px solid var(--eval-border);
  background: rgba(255, 255, 255, 0.03);
  color: var(--eval-text-white);
}

.script-eval-helper-card {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 88px;
  padding: 18px 22px;
  background: rgba(18, 23, 24, 0.82);
}

.script-eval-helper-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  flex: 0 0 auto;
  border-radius: 14px;
  background: rgba(0, 255, 136, 0.12);
  color: var(--eval-main-green);
  font-size: 20px;
}

.script-eval-helper-card strong {
  display: block;
  color: var(--eval-text-white);
  font-size: 16px;
  font-weight: 850;
  line-height: 1.2;
}

.script-eval-helper-card p {
  margin: 5px 0 0;
  color: var(--eval-text-main);
  font-size: 13px;
}

.script-eval-score-card-v2 {
  display: grid;
  min-height: 334px;
  padding: 26px 30px;
  grid-template-columns: minmax(260px, 0.9fr) minmax(300px, 1.1fr);
  align-items: center;
  gap: 26px;
}

.script-eval-radar-container {
  width: min(100%, 286px);
  height: 252px;
  margin: 0 auto;
  flex: none;
}

.script-eval-radar-svg {
  width: 212px;
  height: 212px;
  opacity: 0.72;
}

.script-eval-radar-label {
  position: absolute;
  z-index: 2;
  color: #d7fff0;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
}

.script-eval-radar-label.label-hook {
  top: 2px;
  left: 50%;
  transform: translateX(-50%);
}

.script-eval-radar-label.label-character {
  top: 68px;
  right: -2px;
}

.script-eval-radar-label.label-plot {
  right: 18px;
  bottom: 36px;
}

.script-eval-radar-label.label-dialogue {
  bottom: 2px;
  left: 50%;
  transform: translateX(-50%);
}

.script-eval-radar-label.label-visual {
  bottom: 70px;
  left: -2px;
}

.script-eval-radar-label.label-content {
  top: 74px;
  left: -2px;
}

.script-eval-radar-grid polygon {
  stroke: rgba(168, 255, 212, 0.1);
}

.script-eval-radar-grid line {
  stroke: rgba(168, 255, 212, 0.09);
}

.script-eval-score-display {
  padding-left: 0;
  gap: 14px;
}

.script-eval-score-display .script-eval-section-kicker {
  width: fit-content;
  padding: 9px 16px;
  border: 1px solid var(--eval-border-strong);
  border-radius: 999px;
  background: var(--eval-soft-green);
}

.script-eval-score-display h2 {
  margin-top: 8px;
}

.script-eval-score-number {
  display: flex;
  align-items: baseline;
  gap: 8px;
  color: var(--eval-text-white);
  font-size: 0;
  letter-spacing: 0;
}

.script-eval-score-number span {
  font-size: 58px;
  font-weight: 900;
  line-height: 1;
}

.script-eval-score-number em {
  color: var(--eval-text-muted);
  font-size: 17px;
  font-style: normal;
  font-weight: 850;
}

.script-eval-score-number b {
  display: inline-grid;
  place-items: center;
  min-width: 38px;
  height: 28px;
  margin-left: 8px;
  border: 1px solid var(--eval-border-strong);
  border-radius: 999px;
  color: var(--eval-main-green);
  font-size: 15px;
  font-weight: 900;
}

.script-eval-score-number.has-data span {
  color: var(--eval-main-green);
  filter: drop-shadow(0 0 18px rgba(0, 255, 136, 0.22));
}

.script-eval-score-hint {
  max-width: 520px;
  margin: 0;
  color: var(--eval-text-main);
  font-size: 14px;
}

.script-eval-diagnosis-card {
  min-height: 160px;
  padding: 24px 22px 22px;
}

.script-eval-diagnosis-card h2 {
  margin-top: 10px;
  font-size: 24px;
}

.script-eval-dimensions-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding-top: 28px;
  border: 0;
}

.script-eval-dimensions-tags::after,
.script-eval-dimensions-tags .tag::after {
  display: none;
}

.script-eval-dimensions-tags .tag {
  padding: 8px 13px;
  border: 1px solid var(--eval-border);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.12);
  color: #d8fff1;
  font-size: 13px;
  font-weight: 800;
}

.script-eval-details-card-v2 {
  padding: 0;
}

.script-eval-details-header {
  min-height: auto;
  padding: 24px 22px 8px;
  border-radius: 18px 18px 0 0;
}

.script-eval-details-header > span {
  display: grid;
  gap: 10px;
}

.script-eval-details-header strong {
  display: block;
  font-size: 24px;
}

.script-eval-expand-icon {
  color: var(--eval-text-muted);
}

.script-eval-details-content.expanded {
  max-height: 760px;
}

.script-eval-details-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 12px 22px 22px;
}

.script-eval-detail-row {
  min-height: 104px;
  padding: 16px;
  border: 1px solid var(--eval-border);
  border-radius: 14px;
  background: rgba(5, 9, 10, 0.52);
}

.script-eval-detail-row:hover {
  border-color: var(--eval-border-strong);
  background: rgba(0, 255, 136, 0.045);
}

.script-eval-detail-row-main {
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.script-eval-dimension-name {
  width: auto;
  color: var(--eval-text-white);
  font-size: 15px;
  font-weight: 900;
}

.script-eval-dimension-score {
  width: auto;
  color: var(--eval-main-green);
  font-size: 14px;
  font-weight: 900;
}

.script-eval-dimension-desc {
  margin-top: 10px;
  padding-left: 0;
  color: var(--eval-text-main);
  font-size: 13px;
  opacity: 1;
}

.script-eval-dimension-bar {
  height: 4px;
  margin-top: 14px;
  background: rgba(255, 255, 255, 0.08);
}

.script-eval-dimension-bar-fill {
  background: var(--eval-main-green);
  box-shadow: 0 0 12px rgba(0, 255, 136, 0.24);
}

.script-eval-helper-card--right {
  min-height: 90px;
}

@media (max-width: 1380px) {
  .script-eval-app {
    width: min(calc(100% - 120px), 1280px);
    grid-template-columns: minmax(460px, 0.92fr) minmax(560px, 1.08fr);
  }

  .script-eval-score-card-v2 {
    grid-template-columns: minmax(220px, 0.82fr) minmax(280px, 1.18fr);
  }
}

@media (max-width: 1180px) {
  .script-eval-app {
    width: min(calc(100% - 44px), 920px);
    grid-template-columns: 1fr;
    padding-top: 34px;
  }

  .script-eval-sidebar-icons {
    position: sticky;
    top: 12px;
    flex-direction: row;
    width: 100%;
    transform: none;
  }

  .script-eval-sidebar-icons .spacer {
    flex: 1;
    width: auto;
    height: auto;
    background: transparent;
  }
}

@media (max-width: 760px) {
  .script-eval-app {
    width: calc(100% - 28px);
    gap: 16px;
    padding: 20px 0 44px;
  }

  .script-eval-input-card-v2 {
    min-height: 640px;
  }

  .script-eval-score-card-v2,
  .script-eval-details-list {
    grid-template-columns: 1fr;
  }

  .script-eval-score-card-v2 {
    gap: 18px;
    padding: 22px;
  }

  .script-eval-radar-container {
    width: 100%;
  }
}

@media (max-width: 520px) {
  .script-eval-input-card-head {
    grid-template-columns: 1fr;
  }

  .script-eval-upload-area,
  .script-eval-button-group,
  .script-eval-helper-card {
    align-items: stretch;
    flex-direction: column;
  }

  .script-eval-upload-btn,
  .script-eval-btn-primary,
  .script-eval-btn-secondary {
    width: 100%;
  }
}

/* === Script Evaluation V3.1: fit inside existing app shell === */
.script-eval-sidebar-icons {
  display: none;
}

.script-eval-app {
  grid-template-columns: minmax(500px, 0.94fr) minmax(560px, 1.06fr);
  gap: 24px;
  width: min(calc(100% - 96px), 1396px);
  max-width: calc(100vw - 128px);
  padding: 52px 0 96px;
}

.script-eval-input-card-v2 {
  height: 664px;
  min-height: 0;
  flex: 0 0 auto;
}

.script-eval-text-input {
  min-height: 0;
  flex: 1 1 auto;
}

.script-eval-panel-right {
  min-width: 0;
}

.script-eval-score-card-v2 {
  min-width: 0;
  min-height: 306px;
  grid-template-columns: minmax(236px, 0.86fr) minmax(270px, 1.14fr);
  gap: 30px;
}

.script-eval-diagnosis-card,
.script-eval-details-card-v2,
.script-eval-helper-card--right {
  min-width: 0;
}

.script-eval-dimensions-tags {
  overflow: visible;
}

.script-eval-dimensions-tags .tag {
  white-space: nowrap;
}

.script-eval-detail-row {
  min-width: 0;
}

.script-eval-dimension-desc {
  overflow-wrap: anywhere;
}

@media (max-width: 1280px) {
  .script-eval-app {
    grid-template-columns: minmax(430px, 0.92fr) minmax(500px, 1.08fr);
    width: min(calc(100% - 64px), 1180px);
    max-width: calc(100vw - 96px);
  }

  .script-eval-score-card-v2 {
    grid-template-columns: minmax(210px, 0.8fr) minmax(248px, 1.2fr);
    gap: 22px;
  }

  .script-eval-radar-container {
    transform: scale(0.94);
    transform-origin: center;
  }
}

@media (max-width: 1120px) {
  .script-eval-app {
    grid-template-columns: 1fr;
    width: min(calc(100% - 48px), 880px);
    max-width: none;
  }

  .script-eval-input-card-v2 {
    height: auto;
    min-height: 620px;
  }
}

@media (max-width: 760px) {
  .script-eval-app {
    width: calc(100% - 28px);
    padding-top: 24px;
  }

  .script-eval-score-card-v2 {
    grid-template-columns: 1fr;
  }
}

/* === Script Evaluation V4: 三版 UI replacement === */
.script-eval-v4 {
  --eval4-bg: #050508;
  --eval4-layer-1: rgba(20, 22, 35, 0.48);
  --eval4-layer-2: rgba(30, 33, 48, 0.34);
  --eval4-accent-rgb: var(--accent-rgb, 0, 255, 136);
  --eval4-border: rgba(var(--eval4-accent-rgb), 0.18);
  --eval4-border-strong: rgba(var(--eval4-accent-rgb), 0.46);
  --eval4-highlight: rgba(255, 255, 255, 0.08);
  --eval4-text-white: #fff;
  --eval4-text-main: #e2e8f0;
  --eval4-text-muted: #94a3b8;
  --eval4-text-soft: #64748b;
  --eval4-placeholder: #475569;
  --eval4-green: var(--accent, #00ff88);
  --eval4-green-deep: var(--accent-dim, #00d874);
  --eval4-cyan: var(--accent-cyan, #7be7ff);
  --eval4-glow: rgba(var(--eval4-accent-rgb), 0.24);
  --eval4-subtle: rgba(var(--eval4-accent-rgb), 0.08);
  background: var(--eval4-bg);
  color: var(--eval4-text-main);
}

.script-eval-v4 .script-eval-v4-stage {
  position: relative;
  padding: 0;
  overflow-x: hidden;
  background: #050508;
}

.script-eval-v4 .script-eval-v4-stage::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: none;
  background-size: 56px 56px;
  opacity: 0.18;
}

.script-eval-v4-app {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(520px, 1.08fr) minmax(580px, 1fr);
  gap: 18px;
  width: min(calc(100% - 12px), 1680px);
  min-height: 100%;
  margin: 0 auto;
  padding: 10px 0 18px;
}

.script-eval-v4-panel-left,
.script-eval-v4-panel-right {
  min-width: 0;
}

.script-eval-v4-panel-left {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.script-eval-v4-panel-right {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.script-eval-v4-panel-title {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 24px;
}

.script-eval-v4-panel-title .label,
.script-eval-v4-details-header .details-title {
  color: var(--eval4-green);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.script-eval-v4-panel-title .divider {
  width: 1px;
  height: 12px;
  background: var(--eval4-border);
}

.script-eval-v4-panel-title .text {
  color: var(--eval4-text-muted);
  font-size: 14px;
  font-weight: 600;
}

.script-eval-v4-panel-title .file-types {
  margin-left: auto;
  color: var(--eval4-text-soft);
  font-size: 12px;
}

.script-eval-v4-glass {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--eval4-border);
  border-radius: 12px;
  background: var(--eval4-layer-1);
  box-shadow: none;
  backdrop-filter: none;
}

.script-eval-v4-glass::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  background: rgba(var(--eval4-accent-rgb), 0.16);
  opacity: 0.72;
}

.script-eval-v4-glass::after {
  content: "";
  position: absolute;
  top: 0;
  right: 14%;
  left: 14%;
  height: 1px;
  background: rgba(255, 255, 255, 0.18);
  pointer-events: none;
}

.script-eval-v4-input-card {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 14px;
  min-height: 748px;
  padding: 16px;
}

.script-eval-v4-upload-area,
.script-eval-v4-text-shell,
.script-eval-v4-button-group,
.script-eval-v4-score-header,
.script-eval-v4-score-main,
.script-eval-v4-dimensions-tags,
.script-eval-v4-details-header,
.script-eval-v4-details-list,
.script-eval-v4-note {
  position: relative;
  z-index: 1;
}

.script-eval-v4-upload-area {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 70px;
  padding: 14px 18px;
  border: 1px dashed var(--eval4-border);
  border-radius: 12px;
  background: var(--eval4-layer-2);
  cursor: pointer;
  transition:
    border-color 0.2s,
    background 0.2s,
    transform 0.2s;
}

.script-eval-v4-upload-area:hover,
.script-eval-v4-upload-area:focus-visible {
  border-color: var(--eval4-border-strong);
  background: rgba(var(--eval4-accent-rgb), 0.07);
  outline: none;
  transform: translateY(-1px);
}

.script-eval-v4-upload-area > .anticon {
  color: var(--eval4-text-soft);
  font-size: 18px;
}

.script-eval-v4-upload-area:hover > .anticon,
.script-eval-v4-upload-area:focus-visible > .anticon {
  color: var(--eval4-green);
}

.script-eval-v4-upload-area input {
  display: none;
}

.script-eval-v4-upload-area .upload-text {
  flex: 1;
  min-width: 0;
  color: var(--eval4-text-main);
  font-size: 14px;
  font-weight: 700;
}

.script-eval-v4-upload-area .hint {
  margin-top: 2px;
  overflow: hidden;
  color: var(--eval4-text-soft);
  font-size: 12px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.script-eval-v4-upload-btn {
  min-width: 84px;
  padding: 10px 20px;
  border: none;
  border-radius: 8px;
  background: var(--eval4-green);
  box-shadow: none;
  color: #04100b;
  font-size: 13px;
  font-weight: 900;
  transition:
    box-shadow 0.2s,
    transform 0.2s;
}

.script-eval-v4-upload-btn:hover {
  box-shadow: none;
  transform: translateY(-1px);
}

.script-eval-v4-text-shell {
  display: grid;
  grid-template-columns: 50px minmax(0, 1fr);
  flex: 1;
  min-height: 520px;
  overflow: hidden;
  border: 1px solid var(--eval4-border);
  border-radius: 12px;
  background: rgba(8, 11, 18, 0.62);
  transition:
    border-color 0.2s,
    box-shadow 0.2s;
}

.script-eval-v4-text-shell:focus-within {
  border-color: rgba(var(--eval4-accent-rgb), 0.4);
  box-shadow: 0 0 30px rgba(var(--eval4-accent-rgb), 0.1);
}

.script-eval-v4-line-numbers {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 18px 12px 18px 0;
  overflow: hidden;
  border-right: 1px solid var(--eval4-border);
  background: rgba(0, 0, 0, 0.18);
  color: var(--eval4-text-soft);
  font-family: "SF Mono", Monaco, Menlo, Consolas, monospace;
  font-size: 13px;
  line-height: 1.9;
  text-align: right;
  user-select: none;
}

.script-eval-v4-text-input {
  width: 100%;
  height: 100%;
  min-height: 520px;
  padding: 18px 22px;
  border: none;
  outline: none;
  background: transparent;
  color: var(--eval4-text-white);
  font-family: "SF Mono", Monaco, Menlo, Consolas, monospace;
  font-size: 14px;
  line-height: 1.9;
  resize: none;
}

.script-eval-v4-text-input::placeholder {
  color: var(--eval4-placeholder);
}

.script-eval-v4-button-group {
  display: flex;
  gap: 12px;
}

.script-eval-v4-btn-primary,
.script-eval-v4-btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 800;
  transition:
    border-color 0.2s,
    box-shadow 0.2s,
    color 0.2s,
    transform 0.2s,
    background 0.2s;
}

.script-eval-v4-btn-primary {
  position: relative;
  min-width: 142px;
  padding: 0 30px;
  overflow: hidden;
  border: 1px solid rgba(var(--eval4-accent-rgb), 0.55);
  background: transparent;
  color: var(--eval4-green);
}

.script-eval-v4-btn-primary::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--eval4-green);
  opacity: 0;
  transition: opacity 0.2s;
}

.script-eval-v4-btn-primary span {
  position: relative;
  z-index: 1;
}

.script-eval-v4-btn-primary:hover:not(:disabled) {
  border-color: transparent;
  box-shadow: none;
  color: #04100b;
  transform: translateY(-2px);
}

.script-eval-v4-btn-primary:hover:not(:disabled)::before {
  opacity: 1;
}

.script-eval-v4-btn-primary:disabled {
  opacity: 0.46;
  cursor: not-allowed;
}

.script-eval-v4-score-card.loading .score-number {
  background: var(--eval4-text-main);
  background-size: 220% 100%;
  animation: script-eval-v4-shimmer 1.4s linear infinite;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.script-eval-v4-score-card.loading .script-eval-v4-radar-outline {
  opacity: 0.34;
  animation: script-eval-v4-pulse 1.2s ease-in-out infinite;
}

.script-eval-v4-btn-secondary {
  min-width: 118px;
  padding: 0 26px;
  border: 1px solid var(--eval4-border);
  background: rgba(255, 255, 255, 0.03);
  color: var(--eval4-text-muted);
}

.script-eval-v4-btn-secondary:hover {
  border-color: rgba(148, 163, 184, 0.34);
  background: rgba(255, 255, 255, 0.06);
  color: var(--eval4-text-white);
  transform: translateY(-1px);
}

.script-eval-v4-score-card {
  padding: 20px 26px 22px;
}

.script-eval-v4-score-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.script-eval-v4-score-header .score-title {
  color: var(--eval4-text-soft);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.script-eval-v4-score-header .score-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--eval4-text-soft);
  font-size: 12px;
  font-weight: 600;
}

.script-eval-v4-score-header .score-status::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--eval4-text-soft);
}

.script-eval-v4-score-header .score-status.ready::before {
  background: var(--eval4-green);
  box-shadow: 0 0 10px var(--eval4-glow);
}

.script-eval-v4-score-main {
  display: grid;
  grid-template-columns: 276px minmax(0, 1fr);
  gap: 28px;
  align-items: center;
  margin-bottom: 18px;
}

.script-eval-v4-radar-container {
  position: relative;
  display: grid;
  width: 276px;
  height: 276px;
  place-items: center;
}

.script-eval-v4-radar-container::before {
  content: "";
  position: absolute;
  width: 226px;
  height: 226px;
  border: 1px solid rgba(var(--eval4-accent-rgb), 0.16);
  border-radius: 50%;
  background: rgba(var(--eval4-accent-rgb), 0.045);
  opacity: 0;
  transition: opacity 0.3s;
}

.script-eval-v4-radar-container.has-glow::before {
  opacity: 1;
}

.script-eval-v4-radar-svg {
  position: relative;
  z-index: 1;
  width: 254px;
  height: 254px;
}

.script-eval-v4-radar-grid polygon {
  fill: none;
  stroke: rgba(var(--eval4-accent-rgb), 0.3);
  stroke-width: 1.15;
}

.script-eval-v4-radar-grid line {
  stroke: rgba(var(--eval4-accent-rgb), 0.22);
  stroke-width: 0.7;
}

.script-eval-v4-radar-outline {
  fill: url(#scriptEvalV4RadarGradient);
  stroke: var(--eval4-green);
  stroke-width: 2.35;
  opacity: 0;
  filter: drop-shadow(0 0 14px rgba(var(--eval4-accent-rgb), 0.36));
  transform: scale(0.84);
  transform-origin: center;
  transition:
    opacity 0.35s,
    transform 0.35s;
}

.script-eval-v4-radar-outline.has-data {
  opacity: 1;
  transform: scale(1);
}

.script-eval-v4-score-display {
  min-width: 0;
}

.script-eval-v4-score-display .score-number {
  color: var(--eval4-text-soft);
  font-size: 72px;
  font-weight: 300;
  line-height: 1;
}

.script-eval-v4-score-display .score-number span {
  color: inherit;
  font-size: 28px;
}

.script-eval-v4-score-display .score-number.has-data {
  background: var(--eval4-green);
  background-clip: text;
  filter: drop-shadow(0 0 16px rgba(var(--eval4-accent-rgb), 0.28));
  -webkit-text-fill-color: transparent;
}

.script-eval-v4-score-display .score-label {
  margin-top: 10px;
  color: var(--eval4-text-muted);
  font-size: 14px;
  font-weight: 700;
}

.script-eval-v4-score-display .score-hint {
  margin-top: 12px;
  color: var(--eval4-text-soft);
  font-size: 13px;
  line-height: 1.7;
}

.script-eval-v4-dimensions-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  padding-top: 16px;
  border-top: 1px solid var(--eval4-border);
}

.script-eval-v4-dimensions-tags .tag {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--eval4-text-soft);
  font-size: 13px;
  white-space: nowrap;
}

.script-eval-v4-dimensions-tags .tag::after {
  content: "";
  width: 3px;
  height: 3px;
  border-radius: 999px;
  background: var(--eval4-placeholder);
  opacity: 0.65;
}

.script-eval-v4-dimensions-tags .tag:last-child::after {
  display: none;
}

.script-eval-v4-details-card {
  transition:
    box-shadow 0.2s,
    transform 0.2s;
}

.script-eval-v4-details-header {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  padding: 16px 22px;
  border: none;
  background: transparent;
  color: inherit;
  cursor: pointer;
}

.script-eval-v4-details-header:hover {
  background: rgba(255, 255, 255, 0.025);
}

.script-eval-v4-details-header .details-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.script-eval-v4-details-header .expand-icon {
  color: var(--eval4-text-soft);
  font-size: 12px;
  transition: transform 0.2s;
}

.script-eval-v4-details-header .expand-icon.expanded {
  transform: rotate(180deg);
}

.script-eval-v4-details-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.28s ease;
}

.script-eval-v4-details-content.expanded {
  max-height: 620px;
}

.script-eval-v4-details-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 0 22px 20px;
}

.script-eval-v4-detail-row {
  padding: 13px 12px;
  border-radius: 10px;
  transition: background 0.2s;
}

.script-eval-v4-detail-row:hover {
  background: var(--eval4-layer-2);
}

.script-eval-v4-detail-row .detail-row-main {
  display: grid;
  grid-template-columns: 88px minmax(140px, 1fr) 64px;
  gap: 16px;
  align-items: center;
}

.script-eval-v4-detail-row .dimension-name {
  color: var(--eval4-text-muted);
  font-size: 14px;
  font-weight: 700;
}

.script-eval-v4-detail-row .dimension-bar {
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.14);
}

.script-eval-v4-detail-row .dimension-bar-fill {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--eval4-green);
  box-shadow: 0 0 10px rgba(var(--eval4-accent-rgb), 0.34);
  transition: width 0.45s ease;
}

.script-eval-v4-detail-row .dimension-score {
  color: var(--eval4-text-soft);
  font-size: 14px;
  font-weight: 700;
  text-align: right;
}

.script-eval-v4-detail-row .dimension-desc {
  margin-top: 7px;
  padding-left: 104px;
  color: var(--eval4-text-soft);
  font-size: 12px;
  line-height: 1.6;
}

.script-eval-v4-note {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 56px;
  padding: 0 18px;
  border: 1px solid var(--eval4-border);
  border-radius: 12px;
  background: rgba(20, 22, 35, 0.34);
  color: var(--eval4-text-muted);
  font-size: 12px;
}

.script-eval-v4-note .anticon {
  color: var(--eval4-green);
  font-size: 16px;
}

@keyframes script-eval-v4-pulse {
  0%,
  100% {
    transform: scale(0.84);
  }

  50% {
    transform: scale(0.96);
  }
}

@keyframes script-eval-v4-shimmer {
  0% {
    background-position: 220% 0;
  }

  100% {
    background-position: -220% 0;
  }
}

@media (max-width: 1280px) {
  .script-eval-v4-app {
    grid-template-columns: minmax(500px, 1fr) minmax(560px, 1fr);
    width: min(calc(100% - 10px), 1248px);
    gap: 14px;
    padding-top: 8px;
  }

  .script-eval-v4-score-main {
    grid-template-columns: 244px minmax(0, 1fr);
    gap: 22px;
  }

  .script-eval-v4-radar-container {
    width: 244px;
    height: 244px;
  }

  .script-eval-v4-radar-svg {
    width: 224px;
    height: 224px;
  }

  .script-eval-v4-score-display .score-number {
    font-size: 60px;
  }

  .script-eval-v4-input-card {
    min-height: 730px;
    padding: 14px;
  }

  .script-eval-v4-score-card {
    padding: 18px 22px 20px;
  }
}

@media (max-width: 1080px) {
  .script-eval-v4-app {
    grid-template-columns: 1fr;
    width: min(calc(100% - 24px), 980px);
    padding: 32px 0 56px;
  }

  .script-eval-v4-input-card {
    min-height: 560px;
  }
}

@media (max-width: 640px) {
  .script-eval-v4-app {
    width: calc(100% - 24px);
    padding: 20px 0 40px;
  }

  .script-eval-v4-panel-title {
    flex-wrap: wrap;
  }

  .script-eval-v4-panel-title .file-types {
    width: 100%;
    margin-left: 0;
  }

  .script-eval-v4-input-card,
  .script-eval-v4-score-card {
    padding: 16px;
  }

  .script-eval-v4-score-main {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .script-eval-v4-radar-container {
    justify-self: center;
  }

  .script-eval-v4-button-group,
  .script-eval-v4-upload-area {
    align-items: stretch;
    flex-direction: column;
  }

  .script-eval-v4-btn-primary,
  .script-eval-v4-btn-secondary,
  .script-eval-v4-upload-btn {
    width: 100%;
  }

  .script-eval-v4-detail-row .detail-row-main {
    grid-template-columns: 1fr 58px;
  }

  .script-eval-v4-detail-row .dimension-bar {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .script-eval-v4-detail-row .dimension-desc {
    padding-left: 0;
  }
}

/* === Script Evaluation V4.1: reference scale and color tuning === */
.script-eval-v4 {
  --eval4-bg: #0b1110;
  --eval4-layer-1: rgba(21, 24, 26, 0.96);
  --eval4-layer-2: rgba(16, 18, 20, 0.92);
  --eval4-border: rgba(255, 255, 255, 0.1);
  --eval4-border-strong: rgba(var(--eval4-accent-rgb), 0.38);
  --eval4-text-main: #f3f5f2;
  --eval4-text-muted: #aeb8b1;
  --eval4-text-soft: #7e8983;
  --eval4-placeholder: #7e8983;
  --eval4-glow: rgba(var(--eval4-accent-rgb), 0.16);
}

.script-eval-v4 .script-eval-v4-stage {
  background: #0b1110;
}

.script-eval-v4 .script-eval-v4-stage::before {
  background-size: 64px 64px;
  opacity: 0.07;
}

.script-eval-v4-app {
  grid-template-columns: minmax(560px, 0.96fr) minmax(620px, 1.04fr);
  gap: 18px;
  width: min(calc(100% - 96px), 1396px);
  padding: 50px 0 72px;
}

.script-eval-v4-panel-left,
.script-eval-v4-panel-right {
  gap: 16px;
}

.script-eval-v4-glass {
  border-color: var(--eval4-border);
  background: var(--eval4-layer-1);
  box-shadow: none;
}

.script-eval-v4-glass::before {
  background: rgba(var(--eval4-accent-rgb), 0.07);
  opacity: 1;
}

.script-eval-v4-input-card {
  min-height: 664px;
  padding: 18px;
}

.script-eval-v4-upload-area {
  min-height: 64px;
  border-color: var(--eval4-border);
  background: var(--eval4-layer-2);
}

.script-eval-v4-upload-area:hover,
.script-eval-v4-upload-area:focus-visible {
  background: rgba(var(--eval4-accent-rgb), 0.06);
}

.script-eval-v4-upload-btn {
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: #202527;
  box-shadow: none;
  color: var(--eval4-text-main);
}

.script-eval-v4-upload-btn:hover {
  border-color: rgba(var(--eval4-accent-rgb), 0.34);
  background: rgba(var(--eval4-accent-rgb), 0.12);
  box-shadow: none;
  color: var(--eval4-green);
}

.script-eval-v4-text-shell {
  min-height: 428px;
  border-color: var(--eval4-border);
  background: #101214;
}

.script-eval-v4-text-input {
  min-height: 428px;
}

.script-eval-v4-btn-primary {
  min-width: 104px;
  min-height: 38px;
  padding: 0 18px;
  border-color: rgba(var(--eval4-accent-rgb), 0.45);
  font-size: 13px;
}

.script-eval-v4-btn-secondary {
  min-width: 76px;
  min-height: 38px;
  padding: 0 16px;
  background: #202527;
  font-size: 13px;
}

.script-eval-v4-score-card {
  padding: 24px 28px;
}

.script-eval-v4-score-main {
  grid-template-columns: 248px minmax(0, 1fr);
  gap: 28px;
  margin-bottom: 20px;
}

.script-eval-v4-radar-container {
  width: 248px;
  height: 220px;
}

.script-eval-v4-radar-container::before {
  width: 176px;
  height: 176px;
}

.script-eval-v4-radar-svg {
  width: 198px;
  height: 198px;
}

.script-eval-v4-radar-grid polygon {
  stroke: rgba(var(--eval4-accent-rgb), 0.18);
  stroke-width: 0.85;
}

.script-eval-v4-radar-grid line {
  stroke: rgba(var(--eval4-accent-rgb), 0.12);
  stroke-width: 0.6;
}

.script-eval-v4-radar-outline {
  stroke-width: 2;
  filter: drop-shadow(0 0 10px rgba(var(--eval4-accent-rgb), 0.24));
}

.script-eval-v4-score-display .score-number {
  color: var(--eval4-text-main);
  font-size: 50px;
  font-weight: 800;
  letter-spacing: 0;
}

.script-eval-v4-score-display .score-number span {
  color: var(--eval4-text-muted);
  font-size: 16px;
  font-weight: 800;
}

.script-eval-v4-dimensions-tags {
  border-top-color: var(--eval4-border);
}

.script-eval-v4-dimensions-tags .tag {
  padding: 6px 11px;
  border: 1px solid var(--eval4-border);
  border-radius: 999px;
  color: var(--eval4-text-main);
  font-size: 12px;
}

.script-eval-v4-dimensions-tags .tag::after {
  display: none;
}

.script-eval-v4-details-header {
  padding: 18px 20px 10px;
}

.script-eval-v4-details-list {
  padding: 0 20px 20px;
}

.script-eval-v4-detail-row {
  border: 1px solid var(--eval4-border);
  background: #101214;
}

.script-eval-v4-detail-row:hover {
  background: rgba(var(--eval4-accent-rgb), 0.05);
}

.script-eval-v4-note {
  min-height: 64px;
  border-color: var(--eval4-border);
  background: var(--eval4-layer-1);
}

@media (max-width: 1280px) {
  .script-eval-v4-app {
    grid-template-columns: minmax(500px, 0.98fr) minmax(520px, 1.02fr);
    width: min(calc(100% - 24px), 1128px);
    gap: 16px;
    margin-right: auto;
    margin-left: 16px;
    padding: 28px 0 44px;
  }

  .script-eval-v4-input-card {
    min-height: 664px;
  }

  .script-eval-v4-score-main {
    grid-template-columns: 196px minmax(0, 1fr);
    gap: 18px;
  }

  .script-eval-v4-radar-container {
    width: 196px;
    height: 190px;
  }

  .script-eval-v4-radar-svg {
    width: 168px;
    height: 168px;
  }

  .script-eval-v4-score-display .score-number {
    font-size: 42px;
  }

  .script-eval-v4-score-display .score-hint {
    max-width: 280px;
  }
}

/* === Script Evaluation V4.2: prevent clipping inside the app shell === */
.script-eval-v4-app {
  grid-template-columns: minmax(0, 0.96fr) minmax(0, 1.04fr);
  width: min(calc(100% - 40px), 1396px);
  margin-right: auto;
  margin-left: 24px;
}

.script-eval-v4-panel-left,
.script-eval-v4-panel-right,
.script-eval-v4-score-card,
.script-eval-v4-details-card,
.script-eval-v4-note,
.script-eval-v4-score-display {
  min-width: 0;
}

.script-eval-v4-score-main {
  grid-template-columns: minmax(168px, 0.74fr) minmax(220px, 1fr);
  gap: 20px;
}

.script-eval-v4-radar-container {
  width: 100%;
  max-width: 220px;
  height: 198px;
}

.script-eval-v4-radar-svg {
  width: min(184px, 100%);
  height: min(184px, 100%);
}

.script-eval-v4-score-header .score-status {
  flex: 0 0 auto;
  white-space: nowrap;
}

.script-eval-v4-score-display .score-number {
  white-space: nowrap;
}

.script-eval-v4-score-display .score-hint {
  max-width: none;
  overflow-wrap: anywhere;
}

@media (max-width: 1280px) {
  .script-eval-v4-app {
    grid-template-columns: minmax(0, 0.98fr) minmax(0, 1.02fr);
    width: min(calc(100% - 32px), 1180px);
    margin-left: 16px;
  }

  .script-eval-v4-score-main {
    grid-template-columns: minmax(150px, 0.68fr) minmax(210px, 1fr);
    gap: 18px;
  }

  .script-eval-v4-radar-container {
    max-width: 196px;
    height: 184px;
  }

  .script-eval-v4-radar-svg {
    width: min(168px, 100%);
    height: min(168px, 100%);
  }
}

@media (max-width: 1160px) {
  .script-eval-v4-app {
    grid-template-columns: 1fr;
    width: min(calc(100% - 32px), 980px);
    margin-right: auto;
    margin-left: auto;
  }
}

/* === Script Evaluation V4.3: enlarge workspace and use surrounding space === */
.script-eval-v4 .script-eval-v4-stage {
  width: 100%;
  max-width: none;
  margin: 0;
}

.script-eval-v4-app {
  gap: 18px;
  width: min(calc(100% - 174px), 1530px);
  margin-right: auto;
  margin-left: auto;
  padding: 34px 0 44px;
}

.script-eval-v4-input-card {
  min-height: calc(100vh - 244px);
  padding: 18px;
}

.script-eval-v4-text-shell,
.script-eval-v4-text-input {
  min-height: calc(100vh - 422px);
}

.script-eval-v4-score-card {
  padding: 24px 28px;
}

.script-eval-v4-score-main {
  gap: 20px;
  margin-bottom: 20px;
}

.script-eval-v4-radar-container {
  max-width: 220px;
  height: 198px;
}

.script-eval-v4-radar-svg {
  width: min(184px, 100%);
  height: min(184px, 100%);
}

.script-eval-v4-details-header {
  padding: 18px 20px 10px;
}

.script-eval-v4-details-list {
  padding: 0 20px 20px;
}

@media (max-width: 1280px) {
  .script-eval-v4-app {
    width: calc(100% - 162px);
    margin-left: auto;
    padding: 28px 0 38px;
  }

  .script-eval-v4-input-card {
    min-height: calc(100vh - 224px);
  }

  .script-eval-v4-text-shell,
  .script-eval-v4-text-input {
    min-height: calc(100vh - 400px);
  }

  .script-eval-v4-score-card {
    padding: 22px 26px;
  }

  .script-eval-v4-radar-container {
    max-width: 202px;
    height: 186px;
  }

  .script-eval-v4-radar-svg {
    width: min(170px, 100%);
    height: min(170px, 100%);
  }
}

@media (max-width: 1160px) {
  .script-eval-v4-app {
    width: min(calc(100% - 32px), 1040px);
    margin-right: auto;
    margin-left: auto;
  }
}

@media (max-width: 760px) {
  .script-eval-v4-app {
    width: calc(100% - 24px);
  }
}

/* === Script Evaluation V4.4: Insights, Suggestions, and Report Actions === */
.script-eval-v4-insights-card,
.script-eval-v4-suggestions-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
  border-color: var(--eval4-border);
  background: var(--eval4-layer-1);
  padding: 20px 22px;
}

.script-eval-v4-insight-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.script-eval-v4-insight-group + .script-eval-v4-insight-group {
  padding-top: 14px;
  border-top: 1px solid var(--eval4-border);
}

.insight-group-title,
.suggestions-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 780;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--fg-muted);
}

.insight-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  font-size: 12px;
  font-weight: 900;
  border-radius: 5px;
}

.highlights .insight-icon {
  background: rgba(16, 185, 129, 0.12);
  color: #10b981;
}

.issues .insight-icon {
  background: rgba(245, 158, 11, 0.12);
  color: #f59e0b;
}

.suggestions-title .insight-icon {
  background: rgba(var(--eval4-accent-rgb), 0.12);
  color: var(--eval4-accent, var(--accent));
}

.insight-list,
.suggestion-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.insight-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 13px;
  line-height: 1.55;
  color: var(--fg-body);
}

.highlight-item {
  background: rgba(16, 185, 129, 0.06);
  border-left: 3px solid rgba(16, 185, 129, 0.5);
}

.issue-item {
  background: rgba(245, 158, 11, 0.06);
  border-left: 3px solid rgba(245, 158, 11, 0.5);
}

.suggestion-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 8px;
  background: rgba(var(--eval4-accent-rgb), 0.05);
  border-left: 3px solid rgba(var(--eval4-accent-rgb), 0.4);
  font-size: 13px;
  line-height: 1.55;
  color: var(--fg-body);
}

.suggestion-index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: rgba(var(--eval4-accent-rgb), 0.12);
  color: var(--eval4-accent, var(--accent));
  font-size: 11px;
  font-weight: 800;
}

.suggestion-text {
  flex: 1;
  min-width: 0;
}

.script-eval-v4-report-actions {
  display: flex;
  gap: 10px;
}

.script-eval-v4-report-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  flex: 1;
  min-height: 38px;
  border: 1px solid var(--eval4-border);
  border-radius: 10px;
  background: var(--eval4-layer-1);
  color: var(--fg-muted);
  font: inherit;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.18s, color 0.18s, border-color 0.18s;
}

.script-eval-v4-report-btn:hover {
  border-color: rgba(var(--eval4-accent-rgb), 0.4);
  background: rgba(var(--eval4-accent-rgb), 0.08);
  color: var(--fg-body);
}

.script-eval-v4-report-btn:active {
  background: rgba(var(--eval4-accent-rgb), 0.14);
}

.script-eval-v4-panel-right {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* === Management Center === */
.token-usage-page.management-center-page {
  display: grid;
  grid-template-rows: minmax(0, 1fr);
  width: 100%;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  padding: 0 0 0 82px;
  background: var(--bg-base);
  color: var(--fg-body);
  font-family: var(--font-sans);
}

.management-center-shell {
  display: grid;
  align-content: start;
  gap: 12px;
  width: 100%;
  height: 100%;
  min-height: 0;
  margin: 0 auto;
  overflow: auto;
  padding: 0 28px 36px;
  scrollbar-color: rgba(var(--accent-rgb), 0.36) transparent;
}

.management-center-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
  min-height: 52px;
  margin: 0 -28px;
  padding: 0 28px;
  border-bottom: 1px solid var(--border-weak);
  border-bottom-left-radius: var(--radius-md);
  background: var(--bg-surface, var(--bg-panel));
  overflow: hidden;
}

.management-center-toolbar__title {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  margin-right: auto;
}

.management-center-toolbar__title strong {
  color: var(--fg-body);
  font-size: 14px;
  font-weight: 850;
  white-space: nowrap;
}

.management-center-toolbar button,
.management-card__head button,
.management-center-status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  gap: 7px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xs);
  background: var(--bg-inset);
  color: var(--fg-muted);
  font: inherit;
  font-size: 12px;
  font-weight: 750;
}

.management-center-toolbar button {
  padding: 0 13px;
  cursor: pointer;
}

.management-center-toolbar button.management-center-toolbar__back {
  width: 32px;
  min-width: 32px;
  min-height: 32px;
  padding: 0;
  border-color: transparent;
  background: transparent;
  color: var(--fg-muted);
}

.management-center-toolbar button:hover,
.management-card__head button:hover {
  border-color: rgba(var(--accent-rgb), 0.36);
  background: var(--bg-hover);
  color: var(--fg-body);
}

.management-center-toolbar button.is-primary {
  border-color: rgba(var(--accent-rgb), 0.56);
  background: var(--accent);
  color: var(--dg-button-text, rgb(6 12 10));
}

.management-center-status-pill {
  min-height: 28px;
  padding: 0 10px;
  color: var(--fg-muted);
}

.management-center-overview {
  display: grid;
  grid-template-columns: minmax(0, 1.75fr) minmax(280px, 0.88fr);
  align-items: start;
  gap: 12px;
}

.management-card {
  min-width: 0;
  border: 1px solid var(--border-weak);
  border-radius: var(--radius-md);
  background: var(--bg-panel);
  box-shadow: none;
}

.management-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 38px;
  padding: 0 14px;
  border-bottom: 1px solid var(--border-weak);
}

.management-card__head h2 {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: var(--fg-body);
  font-size: 14px;
  font-weight: 850;
}

.management-card__head h2 .anticon {
  color: var(--fg-muted);
}

.management-card__head > span,
.management-card__head button {
  min-height: 24px;
  padding: 0 9px;
  border-radius: var(--radius-xs);
  color: var(--fg-muted);
  font-size: 11px;
}

.management-card--chart {
  display: flex;
  flex-direction: column;
  height: clamp(360px, 48vh, 560px);
  min-height: 0;
}

.management-empty-chart {
  display: grid;
  place-items: center;
  align-content: center;
  justify-items: center;
  min-height: calc(100% - 76px);
  margin: 12px 16px 16px;
  padding: 44px 20px;
  border-radius: var(--radius-sm);
  background: var(--bg-inset);
  color: var(--fg-soft);
  font-size: 13px;
  text-align: center;
}

.management-empty-chart .anticon {
  margin: 0 0 12px;
  color: var(--fg-dim);
  font-size: 44px;
  opacity: 0.26;
}

.management-model-list {
  display: grid;
  gap: 8px;
  padding: 10px 14px 14px;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-color: rgba(var(--accent-rgb), 0.42) transparent;
  scrollbar-width: thin;
}

.management-model-list::-webkit-scrollbar {
  width: 8px;
}

.management-model-list::-webkit-scrollbar-track {
  background: transparent;
}

.management-model-list::-webkit-scrollbar-thumb {
  border: 2px solid transparent;
  border-radius: 999px;
  background: rgba(var(--accent-rgb), 0.42);
  background-clip: padding-box;
}

.management-model-row,
.management-record-table__row {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) auto auto;
  align-items: center;
  gap: 14px;
  min-height: 42px;
  padding: 0 12px;
  border-radius: var(--radius-sm);
  background: var(--bg-inset);
  color: var(--fg-muted);
  font-size: 12px;
}

.management-model-row strong {
  overflow: hidden;
  color: var(--fg-body);
  font-size: 13px;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.management-model-row em {
  color: var(--accent);
  font-style: normal;
  font-weight: 850;
}

.management-balance-alert {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 14px;
  padding: 11px 16px;
  border: 1px solid color-mix(in srgb, var(--warning, #f59e0b) 45%, transparent);
  border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--warning, #f59e0b) 12%, var(--bg-inset));
  color: var(--fg-body);
  font-size: 13px;
}

.management-balance-alert .anticon {
  color: var(--warning, #f59e0b);
  font-size: 18px;
}

.management-balance-alert span {
  flex: 1;
  min-width: 0;
}

.management-balance-alert button {
  flex-shrink: 0;
  min-height: 28px;
  padding: 0 14px;
  border-radius: var(--radius-xs);
  background: var(--warning, #f59e0b);
  color: #1a1205;
  font-size: 12px;
  font-weight: 850;
  cursor: pointer;
}

.management-metric-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 0 0 12px;
}

.management-metric-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 14px;
  border: 1px solid var(--border-weak);
  border-radius: var(--radius-sm);
  background: var(--bg-elevated);
}

.management-metric-card.is-accent {
  border-color: color-mix(in srgb, var(--accent) 35%, transparent);
}

.management-metric-card.is-warn {
  border-color: color-mix(in srgb, var(--warning, #f59e0b) 45%, transparent);
}

.management-metric-card__label {
  color: var(--fg-muted);
  font-size: 11px;
}

.management-metric-card__value {
  color: var(--fg-body);
  font-size: 20px;
  font-weight: 850;
  line-height: 1.2;
}

.management-metric-card.is-warn .management-metric-card__value {
  color: var(--warning, #f59e0b);
}

.management-metric-card__hint {
  color: var(--fg-soft);
  font-size: 11px;
}

.management-model-bar {
  display: grid;
  gap: 4px;
  padding: 8px 10px;
  border-radius: var(--radius-xs);
  background: var(--bg-inset);
}

.management-model-bar__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.management-model-bar__top strong {
  overflow: hidden;
  color: var(--fg-body);
  font-size: 13px;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.management-model-bar__top em {
  flex-shrink: 0;
  color: var(--accent);
  font-style: normal;
  font-weight: 850;
  font-size: 12px;
}

.management-model-bar__track {
  height: 5px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--fg-dim) 18%, transparent);
  overflow: hidden;
}

.management-model-bar__track span {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent-cyan, var(--accent)), var(--accent));
  transition: width 0.4s ease;
}

.management-model-bar__sub {
  color: var(--fg-soft);
  font-size: 11px;
}

.management-trend-card {
  margin-top: 12px;
}

.management-status-trend {
  padding: 12px 18px 16px;
  border-top: 1px solid var(--border-weak);
}

.management-status-trend__title {
  display: block;
  margin-bottom: 4px;
  color: var(--fg-muted);
  font-size: 11px;
}

.management-status-trend__empty {
  display: block;
  padding: 12px 0;
  color: var(--fg-soft);
  font-size: 12px;
  text-align: center;
}

.usage-trend {
  padding: 4px 0 0;
}

.usage-trend__svg {
  display: block;
  width: 100%;
  height: auto;
}

.usage-trend__grid {
  stroke: color-mix(in srgb, var(--fg-dim) 16%, transparent);
  stroke-width: 1;
  stroke-dasharray: 3 4;
}

.usage-trend__line {
  fill: none;
  stroke: var(--accent);
  stroke-width: 2.5;
  stroke-linejoin: round;
  stroke-linecap: round;
}

.usage-trend__dot {
  fill: var(--bg-elevated);
  stroke: var(--accent);
  stroke-width: 2;
}

.usage-trend__xlabel {
  fill: var(--fg-soft);
  font-size: 11px;
}

.usage-trend__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  margin-top: 8px;
  padding-top: 10px;
  border-top: 1px solid var(--border-weak);
  color: var(--fg-soft);
  font-size: 12px;
}

.usage-trend__meta b {
  color: var(--accent);
  font-weight: 850;
}

@media (max-width: 760px) {
  .management-metric-cards {
    grid-template-columns: 1fr;
  }
}

.management-status-card {
  min-height: auto;
}

.management-status-card dl {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 10px 14px 8px;
}

.management-status-card div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.management-status-card dt {
  color: var(--accent-cyan);
  font-size: 12px;
}

.management-status-card dd {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin: 0;
  color: var(--fg-body);
  font-size: 14px;
  font-weight: 750;
}

.management-status-card dd.is-good {
  color: var(--accent);
}

.management-status-card dd i,
.management-member-meter b::before {
  display: block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  content: "";
}

.management-members,
.management-records {
  padding-bottom: 12px;
}

.management-member-list {
  display: grid;
  gap: 8px;
  padding: 8px 14px 0;
}

.management-member-row {
  display: grid;
  grid-template-columns: auto minmax(160px, 1fr) auto auto auto auto;
  align-items: center;
  gap: 18px;
  min-height: 54px;
  padding: 0 14px;
  border-radius: var(--radius-sm);
  background: var(--bg-inset);
  color: var(--fg-muted);
  font-size: 13px;
}

.management-member-avatar {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(var(--accent-rgb), 0.24);
  border-radius: 50%;
  background: rgba(var(--accent-rgb), 0.88);
  color: var(--fg-body);
  font-size: 11px;
  font-weight: 900;
}

.management-member-row div {
  display: grid;
  gap: 2px;
}

.management-member-row strong {
  color: var(--fg-body);
  font-size: 13px;
  font-weight: 850;
}

.management-member-row em {
  color: var(--fg-soft);
  font-size: 11px;
  font-style: normal;
}

.management-member-role {
  min-width: 76px;
  padding: 3px 8px;
  border: 1px solid var(--border-weak);
  border-radius: var(--radius-xs);
  background: var(--bg-panel);
  color: var(--fg-muted);
  font-size: 11px;
  text-align: center;
}

.management-member-meter {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 850;
}

.management-member-meter b {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.management-member-row > .anticon {
  color: var(--accent);
}

.management-record-table {
  display: grid;
  min-height: calc(100% - 48px);
  padding: 12px 16px 0;
}

.management-record-table__head {
  display: grid;
  grid-template-columns: 1fr 0.8fr 1.2fr 2fr 0.7fr 0.7fr 0.8fr;
  align-items: center;
  min-height: 30px;
  padding: 0 12px;
  border-radius: var(--radius-xs);
  background: var(--bg-inset);
  color: var(--fg-body);
  font-size: 12px;
  font-weight: 850;
}

.management-record-table__row {
  grid-template-columns: 1fr 0.8fr 1.2fr 2fr 0.7fr 0.7fr 0.8fr;
  min-height: 38px;
  margin-top: 8px;
}

.management-record-table__row span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.management-record-table__row span:last-child {
  color: var(--accent);
  font-weight: 850;
}

.management-record-empty {
  display: grid;
  place-items: center;
  min-height: 230px;
  color: var(--fg-soft);
  font-size: 13px;
}

.management-record-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 12px 0 4px;
  border-top: 1px solid var(--border-weak);
  margin-top: 4px;
}

.management-record-pagination button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  border: 1px solid var(--border-weak);
  background: var(--bg-elevated);
  color: var(--fg-base);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.management-record-pagination button:hover:not(:disabled) {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.management-record-pagination button:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.management-record-pagination span {
  font-size: 12px;
  color: var(--fg-soft);
  min-width: 48px;
  text-align: center;
}

.management-record-table__row span.is-good {
  color: var(--success, #10b981);
}

.management-record-table__row span.is-error {
  color: var(--error, #ef4444);
}

@media (max-width: 1180px) {
  .token-usage-page.management-center-page {
    padding-left: 20px;
  }

  .management-center-shell {
    grid-template-rows: auto auto auto auto;
    padding: 0 20px 32px;
  }

  .management-center-toolbar {
    margin: 0 -20px;
    padding: 0 20px;
  }
}

@media (max-width: 900px) {
  .management-center-overview,
  .management-member-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .management-card--chart {
    height: min(420px, 58vh);
  }

  .management-center-toolbar {
    justify-content: flex-start;
    flex-wrap: wrap;
  }
}

/* === Service Settings === */
.settings-page {
  display: grid;
  width: 100%;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  padding-left: 82px;
  background: var(--bg-base);
  color: var(--fg-body);
  font-family: var(--font-sans);
}

.settings-page__shell {
  display: grid;
  align-content: start;
  gap: 18px;
  width: 100%;
  min-height: 0;
  overflow: auto;
  padding: 28px;
}

.settings-page__head,
.settings-page__grid article {
  border: 1px solid var(--border-weak);
  border-radius: var(--radius-md);
  background: var(--bg-panel);
}

.settings-page__head {
  padding: 24px;
}

.settings-page__head span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 850;
}

.settings-page__head h1,
.settings-page__head p {
  margin: 0;
}

.settings-page__head h1 {
  color: var(--fg-body);
  font-size: 26px;
  font-weight: 900;
}

.settings-page__head p {
  margin-top: 8px;
  color: var(--fg-muted);
  font-size: 14px;
}

.settings-page__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.settings-page__grid article {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 14px;
  min-height: 168px;
  padding: 18px;
}

.settings-page__grid article > .anticon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(var(--accent-rgb), 0.34);
  border-radius: var(--radius-xs);
  background: var(--accent-muted, rgba(var(--accent-rgb), 0.13));
  color: var(--accent);
  font-size: 18px;
}

.settings-page__grid article div {
  display: grid;
  align-content: start;
  gap: 6px;
}

.settings-page__grid strong {
  color: var(--fg-body);
  font-size: 15px;
}

.settings-page__grid span {
  color: var(--fg-muted);
  font-size: 13px;
  line-height: 1.7;
}

.settings-page__grid button {
  grid-column: 1 / -1;
  align-self: end;
  justify-self: start;
  min-height: 34px;
  padding: 0 13px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xs);
  background: var(--bg-inset);
  color: var(--fg-muted);
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  font-weight: 750;
}

.settings-page__grid button:hover {
  border-color: rgba(var(--accent-rgb), 0.36);
  background: var(--bg-hover);
  color: var(--fg-body);
}

@media (max-width: 1180px) {
  .settings-page {
    padding-left: 20px;
  }

  .settings-page__grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

.script-eval-v4-error {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  background: rgba(255, 90, 95, 0.1);
  border: 1px solid rgba(255, 90, 95, 0.25);
  color: var(--error);
  font-size: 13px;
  margin-bottom: 12px;
}

.script-eval-v4-error__icon {
  flex-shrink: 0;
  font-size: 16px;
}
