/* DemonMurderCase · 像素级自绘卡片
   移植自 docs/mock/style.css 的 .nd-* 规则（未经改动的原生 2430 坐标 + scale(1/3)）
   资产路径统一为 /assets/fonts。卡片必须 CSS 自绘，不使用图片。 */

@font-face { font-family: "CLFN16"; src: url("/assets/fonts/c16xcnr.woff2") format("woff2"); font-weight: 400; }
@font-face { font-family: "CLFN16"; src: url("/assets/fonts/c16xcnb.woff2") format("woff2"); font-weight: 700; }
@font-face { font-family: "CLFN24"; src: url("/assets/fonts/c24xcn.woff2") format("woff2"); font-weight: 400; }

/* ===== 原生 2430×2000 / 2430×4320 坐标绘制，再整体缩放 1/3 显示 ===== */
.nd-wrap { position: absolute; overflow: hidden; }
.nd-wrap.small { width: 810px; height: 667px; }
.nd-wrap.tall { width: 810px; height: 1440px; }
.nd-scale { width: 2430px; height: 2000px; transform: scale(0.333333); transform-origin: top left; }
.nd-wrap.tall .nd-scale { height: 4320px; }
.nd-card {
  position: relative; width: 2430px; height: 2000px; overflow: hidden;
  background: linear-gradient(180deg, #eaeae9 0%, #d5d5d4 100%);
  color: #000; font-family: "CLFN16", monospace; -webkit-font-smoothing: none;
}
.nd-card.dark { background: #141415; color: #fff; }
.nd-card.dossier { width: 2430px; height: 4320px; background: #141415; color: #fff; }
.nd-card.dossier .n-title { color: #fff; }
.nd-card.dossier .n:not(.n-title) { color: #828282; }
.nd-card.dossier .d-opt { color: #828282; }
.nd-card.dossier .d-opt span { color: inherit; }
.nd-card.dossier .cl-w, .nd-card.dossier .cl-w span { color: #fff; }
.nd-card.dossier .cl-g, .nd-card.dossier .cl-g span { color: #828282; }
/* 隐秘档案：布局同公开档案，所有文字为白色 */
.nd-card.dossier.secret .n:not(.n-title) { color: #fff; }
.nd-card.dossier.secret .cl-g, .nd-card.dossier.secret .cl-g span { color: #fff; }
.nd-card.dossier.secret .d-opt, .nd-card.dossier.secret .d-opt span { color: #fff; }
.nd-card .n { position: absolute; left: 0; top: 0; line-height: 1; white-space: nowrap; transform-origin: 0 0; }
/* 以下矩阵由 PSD 文字层参数 + 逐像素 bbox 校准得到 */
.nd-card .n-title { font-size: 341.90753px; font-weight: 700; transform: matrix(0.2075674, 0, 0, 0.2059897, 36.4575, 45.9453); }
.nd-card .n-line { position: absolute; left: 39px; top: 124px; width: 1325px; height: 4px; background: currentColor; z-index: 1; }
.nd-card .n-name { font-size: 188.5085px; font-weight: 700; transform: matrix(0.3834184, 0, 0, 0.3021193, 1208.8376, 63.9355); }
.nd-card .n-box { position: absolute; left: 1360px; top: 34px; width: 1034px; height: 130px; border: 4px solid currentColor; background: #e9e9e9; z-index: 2; }
.nd-card.dark .n-box { background: #141415; }
.nd-card .n-small { font-size: 49.31667px; transform: matrix(1, 0, 0, 0.9873804, 49.6917, 140.6616); }
.nd-card .n-big { font-size: 77px; font-weight: 700; transform: matrix(0.9797980, 0, 0, 0.9770690, 35.8947, 204.3857); }
.nd-card .n-foot { font-size: 49.31667px; transform: matrix(0.9967638, 0, 0, 1, 50.3013, 1066.501); }
/* 设卡（公开档案）原生 2430×4320 */
.nd-card.dossier .n-line { width: 2355px; }
.nd-card .d-namebox { position: absolute; left: 1703px; top: 34px; width: 691px; height: 130px; border: 4px solid currentColor; background: #141415; z-index: 2; }
.nd-card .d-name { font-size: 188.5085px; font-weight: 700; transform: matrix(0.3834184, 0, 0, 0.3021193, 1548.2166, 48.7969); }
.nd-card .d-bigbox { position: absolute; left: 39px; top: 124px; width: 2355px; height: 1334px; border: 4px solid currentColor; z-index: 0; }
.nd-card .d-photo { position: absolute; left: 57px; top: 144px; width: 697px; height: 894px; border: 4px solid currentColor; }
.nd-card .d-fields { font-size: 341.90753px; line-height: 410.28906px; width: 7250px; transform: matrix(0.2251200, 0, 0, 0.2251197, 761.8792, 151.8789); }
.nd-card .d-reason { font-size: 341.90753px; line-height: 410.28906px; transform: matrix(0.2251200, 0, 0, 0.2251197, 61.5024, 1045.8792); }
.nd-card .d-self { font-size: 541.49719px; line-height: 649.79663px; transform: matrix(0.0909544, 0, 0, 0.0909545, 800.0000, 2340.7930); }
.nd-card .d-brackets { font-size: 541.49719px; line-height: 649.79663px; transform: matrix(0.0909544, 0, 0, 0.0909545, 740.1818, 1479.3030); }
/* 设卡填写区 */
.nd-card .fill { display: inline-block; min-width: 240px; height: 1em; outline: none; }
.nd-card .fillarea { width: 640px; height: 180px; font-size: 48px; line-height: 60px; color: #fff; outline: none; }
.nd-card .fillname { display: block; width: 100%; height: 100%; font-size: 110px; line-height: 128px; padding: 0 16px; color: #fff; outline: none; white-space: nowrap; overflow: hidden; }
.nd-card .d-photo { cursor: pointer; background-size: cover; background-position: center; }
/* 设卡选项：3 列，文字 + 行尾〔 〕（括号文本固定，不替换；选中用色块覆盖） */
.nd-card .d-opt { position: absolute; top: 1455px; color: #fff; font-size: 48px; line-height: 60px; white-space: nowrap; }
.nd-card .d-opt .r { display: flex; align-items: baseline; justify-content: space-between; width: 100%; }
.nd-card .d-opt .r > span:last-child { margin-left: 16px; }
.nd-card .d-opt1 { left: 41px; width: 700px; }
.nd-card .d-opt2 { left: 800px; width: 650px; }
.nd-card .d-opt3 { left: 1500px; width: 560px; }
/* 勾选色块：绝对定位覆盖在〔 〕内部，尺寸与行文字同色，不占布局 */
.nd-card .d-opt .opt-box { position: relative; display: inline-block; flex: 0 0 auto; }
.nd-card .d-opt .opt-check {
  position: absolute; left: 50%; top: 50%; width: 33px; height: 33px;
  margin: -16.5px 0 0 -16.5px; display: none; background: currentColor;
  pointer-events: none;
}
.nd-card .d-opt .r.on .opt-check { display: block; }

/* ===== 以上为 docs/mock/style.css 原样移植；以下为站点运行所需补充 ===== */
/* 设卡字段行容器：标签 + 同行输入区；cl-w/cl-g 同时决定标签与填写内容颜色 */
.nd-card .d-field-row { display: flex; align-items: baseline; line-height: 410.28906px; }
.nd-card .d-field-row .d-field-label { flex: 0 0 auto; }
.nd-card .d-field-row .d-field-input {
  flex: 1 1 auto; min-width: 0; min-height: 1em; outline: none;
  color: inherit; white-space: pre-wrap; word-break: break-word;
}
.nd-card .d-field-row:not(.stacked) .d-field-input { margin-left: 64px; }
/* 「残疾、伤疤或疾病」：填写内容从下一行开始 */
.nd-card .d-field-row.stacked { display: block; }
.nd-card .d-field-row.stacked .d-field-input { display: block; width: 100%; }
/* 关系类作答区：第三列纵向排列，标签下一行紧接多行输入（top 对齐、可滚动） */
.nd-card .d-opt3 { display: flex; flex-direction: column; height: 2835px; }
.nd-card .d-opt3 > .r { flex: 0 0 60px; }
.nd-card .d-opt3 .d-relation { display: flex; flex-direction: column; flex: 0 0 auto; min-height: 0; }
.nd-card .d-opt3 .d-relation-label { height: 60px; line-height: 60px; }
.nd-card .d-opt3 .d-relation-input {
  flex: 0 0 auto; min-height: 0; color: inherit; outline: none;
  font-size: 48px; line-height: 60px; overflow-y: auto;
  white-space: pre-wrap; word-break: break-word; overflow-wrap: anywhere;
  scrollbar-width: none;
}
.nd-card .d-opt3 .d-relation-input::-webkit-scrollbar { display: none; }
.nd-card .d-opt3 .d-relation-1, .nd-card .d-opt3 .d-relation-2 { flex: 0 0 360px; }
.nd-card .d-opt3 .d-relation-1 .d-relation-input, .nd-card .d-opt3 .d-relation-2 .d-relation-input { flex: 0 0 300px; height: 300px; }
.nd-card .d-opt3 .d-relation-3 { flex: 1 1 auto; min-height: 360px; }
.nd-card .d-opt3 .d-relation-3 .d-relation-input { flex: 1 1 auto; min-height: 0; }
/* 设卡补充页：标题/横线/NAME 下整块空白多行输入区 */
.nd-card .d-supblank {
  position: absolute; left: 49.6917px; top: 190px; width: 2320px; height: 4040px;
  font-size: 49.31667px; line-height: 68px; color: #fff;
  white-space: pre-wrap; word-break: break-word; overflow-wrap: anywhere;
  outline: none; overflow-y: auto; scrollbar-width: none;
}
.nd-card .d-supblank::-webkit-scrollbar { display: none; }
.nd-card .d-supblank.ro { overflow: hidden; }
.nd-card.dossier.secret .d-supblank { color: #fff; }
/* 卡片堆叠（设卡 + 补充页）：设卡绝对定位在顶部，补充页在 1440 之后 */
.card-stack { position: relative; width: 810px; }
.card-stack > .nd-wrap { position: absolute; left: 0; top: 0; }
.card-stack.small { height: 667px; }
.card-stack.tall { min-height: 1440px; padding-top: 1440px; }
.card-stack.tall > .sup-pages { position: relative; }
/* 公开资料库：多页档案堆叠（主卡在上，补充页右下小偏移，只露边） */
.dossier-deck { position: relative; }
.dossier-deck .deck-item {
  position: absolute; left: 0; top: 0; width: 810px; height: 1440px;
  cursor: pointer;
}
.dossier-deck .deck-item .nd-wrap { position: absolute; left: 0; top: 0; }
.canvas .card-item.dragging .dossier-deck .deck-item,
.canvas .card-item.dragging { cursor: grabbing; }
/* 卡片正文区（原生坐标，随卡片一起缩放） */
.nd-card .n-body {
  position: absolute; left: 49.6917px; top: 320px; width: 2320px;
  font-size: 49.31667px; line-height: 68px;
  white-space: pre-wrap; word-break: break-word; color: inherit;
}
/* 线索卡正文放大：72 原生 px = 显示 24px CLFN，行距相应放大 */
.nd-card .n-body.clue-body { font-size: 72px; line-height: 100px; }
.nd-card .n-body.has-photo { width: 1520px; }
/* NAME 方框内的名称值（原生 110px → 显示 ≈36.7px） */
.nd-card .n-nameval {
  display: block; padding: 0 16px; color: inherit;
  font-size: 110px; font-weight: 700; line-height: 128px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.nd-card .n-foot { white-space: pre-wrap; overflow-wrap: anywhere; width: 2320px; }
.nd-card .n-small .n-val, .nd-card .n-foot .n-val, .nd-card .d-v { color: inherit; }
.nd-card .d-namebox .fillname.ro { cursor: default; }
/* 设卡只读值 */
.nd-card .d-fields .d-v { color: inherit; }
.nd-card .d-reason .d-v { margin-left: 32px; white-space: pre-wrap; overflow-wrap: anywhere; }
/* 线索整理的「隐秘档案」知识卡：原因/自定的隐秘法术值另起一行，支持多行 */
.nd-card.dossier.clue-dossier .d-reason { width: 2355px; white-space: nowrap; }
.nd-card.dossier.clue-dossier .d-reason br { display: none; }
.nd-card.dossier.clue-dossier .d-reason .d-v { display: block; margin-left: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
/* 档案卡正文（右侧空白区，原生坐标） */
.nd-card .d-body {
  position: absolute; left: 1700px; top: 300px; width: 640px; max-height: 1100px;
  font-size: 49.31667px; line-height: 68px; color: inherit;
  white-space: pre-wrap; word-break: break-word; overflow: hidden;
}
/* 设卡自述生平长文本 */
.nd-card .d-selffill { position: absolute; left: 800px; top: 2420px; width: 1500px; height: 800px; color: #828282; font-size: 48px; line-height: 60px; outline: none; white-space: pre-wrap; }
.nd-card.dossier.secret .d-selffill { color: #fff; }
/* 设卡可编辑状态：选项可点选（颜色保持行色，仅用色块表示选中） */
.nd-card .d-opt .r { cursor: default; }
.nd-card.editable .d-opt .r { cursor: pointer; }
/* 证据图（线索卡内） */
.nd-card .clue-photo {
  position: absolute; left: 1600px; top: 250px; width: 760px; height: 640px;
  background-size: cover; background-position: center; background-repeat: no-repeat;
}
/* 选中指针（缩放 / 拖动时的抓手） */
.canvas .card-item .nd-card, .center .nd-card { user-select: none; }
