/* 我画到这里，另一个人接了一笔 · 生成式线场 × 异质拼贴
   亮底浓线：暖白纸 / 墨青盘绕 / 赭橙折线 / 一点朱 */
:root {
  --paper: #f6f2e9;
  --paper-2: #efe9db;
  --ink: #1e4b5a;      /* 甲：墨青 */
  --route: #c05a2e;    /* 乙：赭橙 */
  --accent: #b33a2b;   /* 相持点一点朱 */
  --text: #2d3340;
  --text-dim: #6f7787;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --sans: "PingFang SC", "Hiragino Sans GB", "Source Han Sans SC", "Microsoft YaHei", sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; } /* 防自有 display 规则覆盖 hidden */
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background:
    radial-gradient(1000px 520px at 85% -6%, rgba(30, 75, 90, 0.05), transparent 60%),
    var(--paper);
  color: var(--text);
  font: 400 16px/1.85 var(--sans);
  letter-spacing: 0.01em;
}
a { color: var(--ink); text-decoration: none; }
a:hover { color: var(--route); }
:focus-visible { outline: 2px solid var(--route); outline-offset: 3px; }

.skip-link { position: absolute; left: -999px; }
.skip-link:focus { left: 12px; top: 12px; background: #fff; padding: 8px 14px; border: 1px solid var(--ink); }

/* ---------- 页头（紧凑，让舞台尽快入画） ---------- */
.page-head { max-width: 980px; margin: 0 auto; padding: 30px 22px 0; }
.crumb { font-family: var(--mono); font-size: 13px; color: var(--text-dim); letter-spacing: 0.1em; margin: 0 0 10px; }
.crumb a { color: var(--text-dim); border-bottom: 1px solid rgba(30,75,90,.35); padding-bottom: 2px; }
.page-head h1 {
  margin: 0; font-weight: 500; letter-spacing: 0.06em; line-height: 1.3;
  font-size: clamp(26px, 4.2vw, 40px); color: #1c2530;
}

/* ---------- 正文 ---------- */
.page { max-width: 980px; margin: 0 auto; padding: 8px 22px 20px; }
.lead {
  margin: 6px 0 14px; font-family: "Songti SC", "STSong", "Noto Serif SC", serif;
  font-size: clamp(18px, 2.6vw, 23px); color: #1c2530; letter-spacing: 0.08em;
}
.beat { margin: 0 0 46px; }
.beat h2 {
  font-size: 20px; font-weight: 600; letter-spacing: 0.1em; color: #1c2530;
  margin: 0 0 12px; display: flex; align-items: center; gap: 12px;
}
.beat h2::before { content: ""; width: 22px; height: 2px; background: var(--route); flex-shrink: 0; }
.beat p { max-width: 38em; margin: 0 0 1em; }
.note { font-size: 14px; color: var(--text-dim); border-left: 2px solid rgba(192,90,46,.5); padding-left: 14px; }

/* ---------- 线场舞台 ---------- */
.stage-wrap { margin: 0 0 46px; }
.stage-frame {
  border: 1.5px solid #1c2530; background: var(--paper);
  box-shadow: 6px 6px 0 rgba(28, 37, 48, 0.14); /* 拼贴式硬投影 */
  aspect-ratio: 900 / 560; width: 100%; max-height: 62vh; overflow: hidden;
}
.field { display: block; width: 100%; height: 100%; }

.lineg .main { fill: none; stroke-width: 5; stroke-linecap: round; }
.ink-main { stroke: var(--ink); }
.route-main { stroke: var(--route); }
.lineg .thin { fill: none; stroke-width: 1.6; stroke-linecap: round; }
.ink .t1 { stroke: rgba(30, 75, 90, .4); }
.ink .t2 { stroke: rgba(30, 75, 90, .22); }
.route .t1 { stroke: rgba(192, 90, 46, .42); }
.route .t2 { stroke: rgba(192, 90, 46, .22); }

/* 让位重排：结构相同的曲线只动坐标，交给 CSS 平滑 */
.lineg .main, .lineg .thin { transition: d .95s cubic-bezier(.25,.7,.25,1), opacity .5s, stroke-opacity .5s; }

/* 单方视图：另一方退为纸面虚影 */
.field.is-a .route .main, .field.is-a .route .thin { stroke-opacity: .12; }
.field.is-b .ink .main, .field.is-b .ink .thin { stroke-opacity: .12; }
.arrow polygon { fill: var(--route); }
.arrow { transition: transform .95s cubic-bezier(.25,.7,.25,1), opacity .5s; }
.field.is-a .arrow { opacity: .12; }
.knot { stroke: var(--accent); stroke-width: 2.4; fill: none; opacity: 1; transition: opacity .4s; }
.field:not(.is-conflict) .knot { opacity: 0; }

/* ---------- 控制台 ---------- */
.console {
  border: 1.5px solid #1c2530; border-top: 0; background: #fbf8f1;
  padding: 12px 16px 14px; box-shadow: 6px 6px 0 rgba(28, 37, 48, 0.1);
}
.task-line { margin: 0 0 10px; font-size: 15px; color: var(--text); border-bottom: 1px dashed rgba(111,119,135,.4); padding-bottom: 9px; }
.status { margin: 0 0 10px; font-family: var(--mono); font-size: 14px; color: var(--ink); letter-spacing: 0.05em; }

.verdict { border-left: 3px solid var(--route); background: rgba(192, 90, 46, 0.06); padding: 8px 14px; margin: 0 0 10px; }
.verdict p { margin: 0 0 4px; font-size: 15px; }
.verdict strong { color: var(--route); font-weight: 600; }
.verdict .v-title { font-weight: 600; color: #1c2530; letter-spacing: 0.06em; }
.verdict .v-note { font-size: 13.5px; color: var(--text-dim); }
.verdict.half { border-left-color: #1c2530; background: rgba(28, 37, 48, 0.05); }

.keys { display: flex; flex-wrap: wrap; gap: 9px; }
.btn {
  font-family: var(--sans); font-size: 14.5px; letter-spacing: 0.04em;
  color: #1c2530; background: #fbf8f1; border: 1.5px solid #1c2530;
  padding: 8px 15px; cursor: pointer; border-radius: 2px;
  box-shadow: 3px 3px 0 rgba(28, 37, 48, 0.18);
  transition: transform .15s, box-shadow .15s, background .15s;
}
.btn:hover { background: #fff; }
.btn:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 rgba(28, 37, 48, 0.18); }
.btn-main { background: var(--route); color: #fdf9f2; border-color: #96431f; }
.btn-main:hover { background: #cf6a3a; color: #fff; }
.btn small { color: inherit; opacity: .65; font-family: var(--mono); font-size: 12px; margin-left: 5px; }
.hint { margin: 10px 0 0; font-size: 13.5px; color: var(--text-dim); }
.hint a { border-bottom: 1px dashed rgba(30,75,90,.5); }
.noscript-note { border: 1px dashed #1c2530; background: #fbf8f1; padding: 12px 16px; margin-top: 12px; }
.noscript-note p { margin: 0; font-size: 15px; }

/* ---------- 页脚 ---------- */
.page-foot {
  max-width: 980px; margin: 0 auto; padding: 24px 22px 54px;
  border-top: 1px solid rgba(28, 37, 48, .18);
  font-size: 14px; color: var(--text-dim);
}
.page-foot p { margin: 0; }

/* ---------- 响应式 ---------- */
@media (max-width: 640px) {
  .page-head { padding-top: 22px; }
  .beat { margin-bottom: 36px; }
  .stage-frame { max-height: none; box-shadow: 4px 4px 0 rgba(28,37,48,.14); }
  .console { box-shadow: 4px 4px 0 rgba(28,37,48,.1); }
  .keys .btn { flex: 1 1 auto; }
}

/* ---------- 减少动态：线的重排与箭头一律瞬时 ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .lineg .main, .lineg .thin, .arrow, .knot, .btn { transition: none; }
}
