:root {
  --paper: #f3f0e4;
  --panel: #fffdf4;
  --ink: #1e2a33;
  --muted: #5c6871;
  --teal: #4ecdc4;
  --teal-deep: #1f7a72;
  --teal-soft: #ddf4f1;
  --coral: #ff6b6b;
  --coral-deep: #d94f4f;
  --coral-soft: #ffe3e3;
  --yellow: #ffd23f;
  --yellow-soft: #fff3c2;
  --chalk: #22303b;
  --chalk-deep: #17222b;
  --chalk-text: #eef3f1;
  --chalk-muted: rgba(238, 243, 241, 0.62);
  --chalk-line: rgba(238, 243, 241, 0.2);
  --radius: 14px;
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  font-synthesis: none;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background-color: var(--paper);
  background-image: radial-gradient(rgba(30, 42, 51, 0.09) 1px, transparent 1.4px);
  background-size: 22px 22px;
  color: var(--ink);
  line-height: 1.6;
}

button, input, textarea, select { font: inherit; }
button, select, input[type="radio"], input[type="checkbox"], summary { cursor: pointer; }

:focus-visible {
  outline: 3px solid var(--teal-deep);
  outline-offset: 2px;
  border-radius: 6px;
}
.results :focus-visible { outline-color: var(--yellow); }

.shell { width: min(1360px, calc(100% - 48px)); margin: 0 auto; }

/* ---------- 顶栏 ---------- */
.topbar {
  min-height: 84px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 14px 0;
  border-bottom: 2px solid var(--ink);
}
.brand-block, .status-cluster, .status-pill, .panel-heading, .field-label-row, .run-row, .probability-meta, .result-section-heading, footer {
  display: flex;
  align-items: center;
}
.brand-block { gap: 12px; }
.brand-mark {
  width: 46px; height: 46px;
  display: grid; place-items: center;
  border: 2px solid var(--ink);
  border-radius: 12px;
  background: var(--yellow);
  color: var(--ink);
  font-size: 24px; font-weight: 900;
  box-shadow: 3px 3px 0 var(--ink);
}
.eyebrow, .answer-label, .error-kicker { margin: 0; font-size: 10px; letter-spacing: 0.18em; font-weight: 800; color: var(--muted); }
h1 { margin: 2px 0 0; font-size: 24px; font-weight: 900; letter-spacing: 0.01em; }
.status-cluster { gap: 10px; font-size: 12px; color: var(--muted); }
.status-pill {
  gap: 8px;
  min-height: 36px;
  padding: 0 14px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--panel);
  box-shadow: 2px 2px 0 var(--ink);
  font-weight: 700;
  color: var(--ink);
}
.status-dot { width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--ink); background: var(--yellow); }
.status-dot.online { background: var(--teal); }
.status-dot.offline { background: var(--coral); }
select {
  min-height: 44px;
  padding: 0 34px 0 14px;
  border: 2px solid var(--ink);
  border-radius: 10px;
  background: var(--panel);
  color: var(--ink);
  font-weight: 700;
  box-shadow: 2px 2px 0 var(--ink);
}

/* ---------- 工作区 ---------- */
.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.04fr) minmax(0, 0.96fr);
  gap: 24px;
  align-items: start;
  padding: 26px 0 8px;
}
.panel {
  border: 2px solid var(--ink);
  border-radius: 20px;
  background: var(--panel);
  box-shadow: 5px 5px 0 var(--ink);
}
.composer, .results { padding: 24px; }
.results {
  position: sticky;
  top: 18px;
  min-height: 640px;
  background: var(--chalk);
  color: var(--chalk-text);
}
.panel-heading { justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.panel-heading h3 { margin: 8px 0 0; font-size: 22px; font-weight: 900; }
.kicker {
  margin: 0;
  display: inline-block;
  padding: 3px 12px;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.16em;
}
.kicker-dark { background: var(--yellow); color: var(--ink); }
.ghost-button, .text-button, .remove-button { border: 0; background: transparent; }
.ghost-button {
  min-height: 44px;
  padding: 0 16px;
  border: 2px solid var(--ink);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
  box-shadow: 2px 2px 0 var(--ink);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.ghost-button:hover { transform: translate(-1px, -1px); box-shadow: 3px 3px 0 var(--ink); }
.ghost-button:active { transform: translate(1px, 1px); box-shadow: 1px 1px 0 var(--ink); }

/* ---------- 原语选择 ---------- */
.primitive-picker { margin: 0 0 22px; padding: 0; border: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.primitive-picker legend { margin-bottom: 10px; font-size: 12px; font-weight: 800; }
.primitive-picker label { position: relative; }
.primitive-picker input { position: absolute; opacity: 0; pointer-events: none; }
.primitive-picker span {
  min-height: 72px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 3px;
  padding: 12px 14px;
  border: 2px solid var(--ink);
  border-radius: 12px;
  background: #fff;
  box-shadow: 3px 3px 0 var(--ink);
  transition: background-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}
.primitive-picker label:hover span { transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--ink); }
.primitive-picker strong { font-size: 16px; font-weight: 900; }
.primitive-picker small { color: var(--muted); font-size: 10px; line-height: 1.4; }
.primitive-picker input:checked + span { background: var(--teal); }
.primitive-picker input:checked + span small { color: rgba(30, 42, 51, 0.72); }
.primitive-picker input:focus-visible + span { outline: 3px solid var(--teal-deep); outline-offset: 2px; }

/* ---------- 输入模块 ---------- */
.module {
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  padding: 14px 14px 16px;
  background: #fff;
  box-shadow: 3px 3px 0 var(--ink);
}
.field-group { margin-top: 18px; }
.field-group:first-of-type { margin-top: 0; }
.module-state { background: var(--yellow-soft); }
.module-instructions { background: var(--teal-soft); }
.field-label-row { justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.field-label {
  display: inline-block;
  padding: 3px 12px;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.14em;
}
.mode-toggle { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 4px; color: var(--muted); font-size: 12px; font-weight: 700; }
.mode-toggle input { width: 18px; height: 18px; accent-color: var(--teal-deep); }
textarea, .field-group > input, .criterion-row input {
  width: 100%;
  border: 2px solid var(--ink);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  outline: none;
  transition: box-shadow 0.15s ease, background-color 0.15s ease;
}
textarea { min-height: 140px; padding: 13px 14px; resize: vertical; line-height: 1.65; }
.field-group > input { height: 48px; padding: 0 14px; }
textarea:focus, .field-group > input:focus, .criterion-row input:focus {
  box-shadow: 3px 3px 0 var(--teal-deep);
  background: #fff;
}
.field-note { margin: 8px 0 0; font-size: 11px; color: var(--muted); }

/* ---------- Criteria 编辑 ---------- */
.add-button {
  min-height: 44px;
  padding: 0 14px;
  border: 2px dashed var(--ink);
  border-radius: 10px;
  background: transparent;
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
  transition: background-color 0.15s ease;
}
.add-button:hover { background: var(--yellow-soft); }
.criteria-editor { display: flex; flex-direction: column; gap: 10px; }
.criterion-row { display: grid; gap: 8px; align-items: center; }
.choice-row { grid-template-columns: minmax(96px, 0.32fr) minmax(160px, 1fr) 36px; }
.score-row { grid-template-columns: 36px minmax(160px, 1fr) 36px; }
.criterion-row input { height: 44px; padding: 0 12px; }
.level-index {
  width: 36px; height: 36px;
  display: grid; place-items: center;
  border: 2px solid var(--ink);
  border-radius: 10px;
  background: var(--yellow);
  color: var(--ink);
  font-size: 14px; font-weight: 900;
  box-shadow: 2px 2px 0 var(--ink);
}
.remove-button {
  width: 36px; height: 36px;
  border: 2px solid var(--ink);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  font-size: 18px;
  font-weight: 800;
  line-height: 1;
  transition: background-color 0.15s ease, color 0.15s ease;
}
.remove-button:hover { background: var(--coral-soft); color: var(--coral-deep); }

/* ---------- 运行 ---------- */
.run-row { justify-content: space-between; gap: 16px; margin-top: 24px; }
.shortcut-hint { margin: 0; color: var(--muted); font-size: 11px; font-weight: 700; }
kbd {
  display: inline-grid;
  place-items: center;
  min-width: 24px; height: 24px;
  margin-right: 4px;
  border: 2px solid var(--ink);
  border-radius: 6px;
  background: #fff;
  box-shadow: 2px 2px 0 var(--ink);
  font-size: 10px;
  font-weight: 800;
}
.run-button {
  min-width: 200px;
  min-height: 54px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 0 10px 0 22px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--coral);
  color: #fff;
  font-size: 15px;
  font-weight: 900;
  letter-spacing: 0.06em;
  box-shadow: 4px 4px 0 var(--ink);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.run-button:hover { transform: translate(-1px, -1px); box-shadow: 5px 5px 0 var(--ink); }
.run-button:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }
.run-button:disabled { cursor: wait; opacity: 0.75; transform: none; }
.run-arrow {
  width: 36px; height: 36px;
  display: grid; place-items: center;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: var(--yellow);
  color: var(--ink);
  font-size: 16px;
  font-weight: 900;
}
.run-button.loading .run-arrow { animation: pulse 1s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: 0.45; transform: scale(0.86); } }

/* ---------- 结果区（深色黑板） ---------- */
.run-state {
  padding: 6px 14px;
  border: 2px solid var(--chalk-line);
  border-radius: 999px;
  color: var(--chalk-muted);
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}
.empty-state { min-height: 480px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.empty-state h4 { margin: 26px 0 8px; font-size: 20px; font-weight: 900; }
.empty-state p { max-width: 320px; margin: 0; color: var(--chalk-muted); font-size: 13px; line-height: 1.75; }
.orbital {
  width: 96px; height: 96px;
  display: grid; place-items: center;
  border: 2px solid var(--chalk-line);
  border-radius: 50%;
  position: relative;
}
.orbital::after {
  content: "";
  position: absolute;
  width: 64px; height: 64px;
  border: 2px dashed var(--teal);
  border-radius: 50%;
  animation: orbit 10s linear infinite;
}
.orbital span { width: 14px; height: 14px; border: 2px solid var(--ink); border-radius: 50%; background: var(--yellow); }
@keyframes orbit { to { transform: rotate(360deg); } }

.answer-hero {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  padding-bottom: 22px;
  border-bottom: 2px dashed var(--chalk-line);
}
.answer-label { color: var(--yellow); }
.answer-value {
  margin: 8px 0 0;
  max-width: 380px;
  font-size: clamp(30px, 3vw, 42px);
  font-weight: 900;
  line-height: 1.08;
  letter-spacing: -0.01em;
  color: var(--teal);
  overflow-wrap: anywhere;
}
.confidence-ring {
  --confidence: 0deg;
  flex: 0 0 auto;
  width: 108px; height: 108px;
  padding: 8px;
  border-radius: 50%;
  background: conic-gradient(var(--teal) var(--confidence), rgba(238, 243, 241, 0.14) 0);
}
.confidence-ring > div {
  width: 100%; height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--chalk-deep);
}
.confidence-ring strong { font-size: 23px; font-weight: 900; font-variant-numeric: tabular-nums; }
.confidence-ring span { margin-top: 2px; color: var(--chalk-muted); font-size: 9px; letter-spacing: 0.12em; }

.probability-section { margin-top: 24px; }
.result-section-heading { justify-content: space-between; margin-bottom: 14px; }
.result-section-heading h4 { margin: 0; font-size: 13px; font-weight: 800; }
.result-section-heading span { color: var(--chalk-muted); font-size: 11px; }
.probability-list { max-height: 240px; overflow: auto; padding-right: 4px; }
.probability-row { margin-bottom: 13px; }
.probability-meta { justify-content: space-between; gap: 16px; margin-bottom: 6px; font-size: 11px; color: var(--chalk-muted); }
.probability-meta span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.probability-meta strong { color: var(--chalk-text); font-variant-numeric: tabular-nums; }
.probability-row.leading .probability-meta strong { color: var(--teal); }
.probability-track { height: 10px; border-radius: 999px; background: rgba(238, 243, 241, 0.14); overflow: hidden; }
.probability-track span { display: block; height: 100%; border-radius: inherit; background: #7a8a99; transition: width 0.5s ease; }
.probability-row.leading .probability-track span { background: var(--teal); }

.metrics-grid {
  margin-top: 22px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border: 2px solid var(--chalk-line);
  border-radius: 12px;
  overflow: hidden;
}
.metrics-grid div { min-width: 0; padding: 12px; border-right: 2px solid var(--chalk-line); }
.metrics-grid div:last-child { border-right: 0; }
.metrics-grid span, .metrics-grid strong { display: block; }
.metrics-grid span { color: var(--chalk-muted); font-size: 9px; letter-spacing: 0.08em; }
.metrics-grid strong { margin-top: 4px; overflow: hidden; text-overflow: ellipsis; font-size: 12px; font-weight: 800; white-space: nowrap; font-variant-numeric: tabular-nums; }

.raw-response { margin-top: 16px; border-top: 2px dashed var(--chalk-line); }
.raw-response summary {
  padding: 16px 0 0;
  display: flex;
  justify-content: space-between;
  color: var(--chalk-text);
  font-size: 12px;
  font-weight: 800;
  list-style: none;
}
.raw-response summary::-webkit-details-marker { display: none; }
.raw-response summary span { color: var(--chalk-muted); font-weight: 500; }
.raw-toolbar { margin-top: 14px; display: flex; justify-content: space-between; align-items: center; gap: 12px; color: var(--chalk-muted); font-size: 10px; }
.text-button { min-height: 44px; padding: 0 4px; color: var(--teal); font-size: 12px; font-weight: 800; }
.text-button:hover { text-decoration: underline; text-underline-offset: 3px; }
pre {
  max-height: 260px;
  overflow: auto;
  margin: 8px 0 0;
  padding: 16px;
  border: 2px solid var(--chalk-line);
  border-radius: 12px;
  background: var(--chalk-deep);
  color: #cfe8e2;
  font: 11px/1.65 ui-monospace, SFMono-Regular, Menlo, monospace;
}

/* ---------- 错误态 ---------- */
.error-state { min-height: 420px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.error-kicker { color: var(--coral); }
.error-state h4 { margin: 12px 0 8px; font-size: 24px; font-weight: 900; }
#error-message { max-width: 420px; margin: 0; color: var(--chalk-muted); line-height: 1.7; }
.retry-button {
  margin-top: 22px;
  min-height: 48px;
  padding: 0 28px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--coral);
  color: #fff;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.06em;
  box-shadow: 3px 3px 0 var(--ink);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.retry-button:hover { transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--ink); }
.retry-button:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }

/* ---------- 页脚 / Toast ---------- */
footer { justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 26px 2px 40px; color: var(--muted); font-size: 11px; font-weight: 700; }
footer p { margin: 0; }
.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 10;
  padding: 12px 18px;
  border: 2px solid var(--ink);
  border-radius: 12px;
  background: var(--ink);
  color: #fff;
  box-shadow: 4px 4px 0 rgba(30, 42, 51, 0.3);
  font-size: 12px;
  font-weight: 700;
  opacity: 0;
  transform: translate(-50%, 12px);
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.toast.visible { opacity: 1; transform: translate(-50%, 0); }
.hidden { display: none !important; }

/* ---------- 响应式 ---------- */
@media (max-width: 980px) {
  .shell { width: min(100% - 32px, 760px); }
  .workspace { grid-template-columns: 1fr; }
  .results { position: static; min-height: 560px; }
}

@media (max-width: 620px) {
  .shell { width: min(100% - 20px, 560px); }
  .topbar { min-height: 76px; }
  .brand-mark { width: 40px; height: 40px; font-size: 20px; }
  h1 { font-size: 20px; }
  .status-pill span:last-child { display: none; }
  .status-pill { min-height: 40px; padding: 0 10px; }
  select { max-width: 150px; }
  .composer, .results { padding: 16px; border-radius: 16px; }
  .workspace { gap: 18px; padding-top: 18px; }
  .primitive-picker { gap: 8px; }
  .primitive-picker span { min-height: 64px; padding: 10px 8px; }
  .primitive-picker strong { font-size: 14px; }
  .primitive-picker small { font-size: 9px; }
  .module { padding: 12px; }
  .choice-row { grid-template-columns: 1fr 44px; }
  .choice-row .criterion-value { grid-column: 1 / -1; grid-row: 2; }
  .choice-row .remove-button { grid-column: 2; grid-row: 1; }
  .score-row { grid-template-columns: 36px 1fr 44px; }
  .remove-button { width: 44px; height: 44px; }
  .run-row { align-items: stretch; flex-direction: column; }
  .shortcut-hint { display: none; }
  .run-button { width: 100%; }
  .answer-hero { align-items: flex-start; flex-direction: column; }
  .confidence-ring { width: 92px; height: 92px; align-self: flex-end; margin-top: -40px; }
  .metrics-grid { grid-template-columns: repeat(2, 1fr); }
  .metrics-grid div:nth-child(2) { border-right: 0; }
  .metrics-grid div:nth-child(-n + 2) { border-bottom: 2px solid var(--chalk-line); }
  footer { padding-bottom: 28px; }
}

/* Direction D — modular playful lab */
:root{--ink:#1e2a33;--paper:#f7f1e5;--surface:#fffdf8;--teal:#39b9a8;--teal-deep:#16796f;--coral:#ff755f;--yellow:#ffd23f;--line:#1e2a33;--muted:#667078;--shadow:8px 8px 0 #1e2a33;font-family:ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC",sans-serif}
body{background-color:var(--paper);background-image:radial-gradient(rgba(30,42,51,.11) 1px,transparent 1px);background-size:22px 22px}
.ambient{display:none}.shell{width:min(1360px,calc(100% - 48px))}.topbar{min-height:88px;border-bottom:2px solid var(--ink)}
.brand-mark{border:2px solid var(--ink);border-radius:0;background:var(--coral);color:var(--ink);box-shadow:4px 4px 0 var(--ink);font-family:inherit;font-style:normal;font-weight:900}
.eyebrow,.kicker,.answer-label,.error-kicker{font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-weight:900}.status-pill{display:flex;align-items:center;gap:8px;padding:7px 10px;border:2px solid var(--ink);background:var(--surface)}
.status-dot{border:2px solid var(--ink);box-shadow:none}.status-dot.online,.status-dot.offline{box-shadow:none}select{border:2px solid var(--ink);border-radius:0;background:var(--surface);font-weight:800}
.workspace{margin-top:56px;gap:24px}.panel{border:2px solid var(--ink);border-radius:0;background:var(--surface);box-shadow:var(--shadow);backdrop-filter:none}.composer,.results{padding:28px}.results{background:var(--ink);color:var(--surface);box-shadow:8px 8px 0 var(--coral)}
.panel-heading h3{font-family:inherit;font-weight:900}.ghost-button,.retry-button{padding:9px 12px;border:2px solid var(--ink);border-radius:0;background:var(--surface);color:var(--ink);box-shadow:3px 3px 0 var(--ink);font-weight:800}.ghost-button:active,.retry-button:active{transform:translate(3px,3px);box-shadow:none}
.primitive-picker{gap:9px}.primitive-picker span{border:2px solid var(--ink);border-radius:0;background:var(--surface)}.primitive-picker strong{font-family:inherit;font-weight:900}.primitive-picker input:checked+span{border-color:var(--ink);background:var(--teal);box-shadow:4px 4px 0 var(--ink);transform:translate(-2px,-2px)}
.module{padding:17px;border:2px solid var(--ink)}.module-state{background:#fff3bd}.module-instructions{background:#ffe0d7}.module-criteria{background:#cdeee8}.field-group{margin-top:16px}.field-label{font-weight:900}
textarea,.field-group>input,.criterion-row input{border:2px solid var(--ink);border-radius:0;background:var(--surface)}textarea:focus,.field-group>input:focus,.criterion-row input:focus,select:focus-visible{border-color:var(--ink);box-shadow:4px 4px 0 var(--teal);background:#fff}
.add-button{border:0;background:transparent;font-weight:900;text-decoration:underline;text-underline-offset:3px}.level-index{border:2px solid var(--ink);border-radius:0;background:var(--yellow);color:var(--ink);font-family:inherit;font-weight:900}.remove-button{color:var(--ink)}
.run-row{border-top:0}.run-button{border:2px solid var(--ink);border-radius:0;background:var(--coral);color:var(--ink);box-shadow:5px 5px 0 var(--ink);font-weight:900}.run-button:active{transform:translate(5px,5px);box-shadow:none}.run-arrow{border:2px solid var(--ink);border-radius:0;background:var(--yellow);color:var(--ink)}
.kicker-dark{color:var(--yellow)}.run-state{border:1px solid #7f8c94;border-radius:0;background:transparent;color:#d7dfe2}.orbital{border:3px solid var(--surface);border-radius:0;background:var(--teal);box-shadow:7px 7px 0 var(--yellow);transform:rotate(-3deg)}.orbital::after{border-color:var(--ink)}.orbital span{background:var(--coral);box-shadow:0 0 0 9px var(--yellow)}.empty-state h4{font-family:inherit;font-weight:900}.empty-state p{color:#b8c1c6}
.answer-hero{border:2px solid var(--surface);border-radius:0;background:#2a3944;box-shadow:6px 6px 0 var(--teal)}.answer-value{font-family:inherit;font-weight:900}.confidence-ring{background:conic-gradient(var(--coral) var(--confidence),#51606b 0)}.confidence-ring>div{background:var(--ink)}.probability-track{border:1px solid #86929a;border-radius:0;background:#34444f}.probability-track span{border-radius:0}.probability-row.leading .probability-track span{background:var(--coral)}
.metrics-grid{border-color:#687781;border-radius:0}.metrics-grid div{border-color:#687781}.raw-response{border-color:#687781}.raw-response .text-button{color:var(--yellow)}pre{border:1px solid #687781;border-radius:0;background:#111a20}.error-state p:last-child{color:#b8c1c6}.retry-button{margin-top:16px;background:var(--yellow)}
.site-footer{margin-top:32px;padding:30px 2px 44px;border-top:2px solid var(--ink)}.site-footer p{margin:5px 0 0}.site-footer nav{display:flex;gap:16px;flex-wrap:wrap}.site-footer a,.site-footer button{border:0;background:transparent;color:var(--ink);font-size:11px;font-weight:800;text-decoration:underline;text-underline-offset:4px}
dialog{max-width:420px;padding:28px;border:2px solid var(--ink);background:var(--surface);box-shadow:9px 9px 0 var(--ink);text-align:center}dialog::backdrop{background:rgba(30,42,51,.72)}dialog img{width:min(260px,100%);margin-top:12px;border:2px solid var(--ink)}dialog h2{margin-top:4px}.modal-close{position:absolute;right:10px;top:8px;border:0;background:transparent;font-size:25px}
.toast{border:2px solid var(--ink);border-radius:0;background:var(--yellow);color:var(--ink);box-shadow:4px 4px 0 var(--ink);font-weight:800}:focus-visible{outline:3px solid var(--teal-deep);outline-offset:3px}.results :focus-visible{outline-color:var(--yellow)}
@media(max-width:980px){.shell{width:min(100% - 30px,760px)}}
@media(max-width:620px){.shell{width:min(100% - 18px,560px)}.workspace{margin-top:34px}.status-pill{padding:0;border:0;background:transparent}.composer,.results{padding:17px}.site-footer{align-items:flex-start;flex-direction:column}}
@media(max-width:800px){.primitive-picker{grid-template-columns:1fr}.primitive-picker span{min-height:62px}.results{min-height:560px}}

/* ---------- 降低动效 ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
