:root {
  --bg: #06090c;
  --bg2: #0a1015;
  --panel: rgba(13, 20, 26, 0.72);
  --line: #16222c;
  --line2: #1e2f3c;
  --ink: #b9c6d1;
  --ink-dim: #5c6b78;
  --ink-faint: #3d4a55;
  --cyan: #82d2f5;
  --cyan-soft: #b6e6fb;
  --cyan-deep: #2b6b86;
  --pass: #82d2f5;
  --fail: #6d7b86;
  --excellent: #d8f2ff;
  --warn: #d8a05a;
  --mono: ui-monospace, "SFMono-Regular", "JetBrains Mono", "Cascadia Mono", Menlo, Consolas, monospace;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

body {
  min-height: 100vh;
  overflow-x: hidden;
  background:
    radial-gradient(1200px 700px at 50% -10%, #0d1a22 0%, transparent 60%),
    linear-gradient(180deg, #070b0f 0%, #06090c 60%, #05080b 100%);
  padding: 0 0 48px;
}

.vignette {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at 50% 40%, transparent 40%, rgba(0, 0, 0, 0.55) 100%);
  z-index: 0;
}

/* ---------- 顶栏 ---------- */
.topbar {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 20px 32px;
  border-bottom: 1px solid var(--line);
  background: rgba(6, 10, 14, 0.7);
  backdrop-filter: blur(8px);
  flex-wrap: wrap;
}

.brand { display: flex; align-items: center; gap: 14px; }

.glyph {
  font-size: 22px;
  color: var(--cyan);
  text-shadow: 0 0 14px rgba(130, 210, 245, 0.55);
}

.brandtext h1 {
  margin: 0;
  font-size: 17px;
  font-weight: 500;
  letter-spacing: 0.22em;
  color: #dce8f1;
}

.brandtext p {
  margin: 2px 0 0;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--ink-faint);
}

.status {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--ink-dim);
}

/* 顶栏里的同一颗球体，缩到仪器指示灯大小 */
.lamp {
  width: 9px; height: 9px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%,
    #ffffff 0%, #d8f1ff 18%, #8fcdee 46%, #3b86ae 74%, #1b5474 100%);
  box-shadow: 0 0 9px rgba(130, 210, 245, 0.55), inset 0 0 3px rgba(255, 255, 255, .7);
  opacity: .78;
}
.lamp.busy {
  opacity: 1;
  box-shadow: 0 0 14px rgba(160, 224, 255, 0.85), inset 0 0 3px rgba(255, 255, 255, .9);
  animation: breathe 1.7s ease-in-out infinite;
}
.lamp.err {
  background: radial-gradient(circle at 35% 30%,
    #fff2e2 0%, #f0c892 34%, #c9884a 70%, #7a4d1e 100%);
  box-shadow: 0 0 10px rgba(216, 160, 90, .6);
  opacity: 1;
}

@keyframes breathe {
  0%, 100% { opacity: .25; transform: scale(.85); }
  50% { opacity: 1; transform: scale(1.15); }
}

.modelname { color: var(--ink-faint); }

/* ---------- 布局 ---------- */
.workspace {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(340px, 0.85fr) minmax(380px, 1.15fr);
  gap: 20px;
  padding: 24px 32px;
  align-items: start;
}

@media (max-width: 900px) {
  .workspace { grid-template-columns: 1fr; padding: 16px; }
  .archive { margin: 0 16px; }
  .topbar { padding: 16px; }
}

.panel {
  position: relative;
  z-index: 1;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 22px 24px 26px;
  backdrop-filter: blur(6px);
}

/* z-index 2：任何情况下都不让球体的光丝压到这条分隔线上 */
.panelhead {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 12px;
  margin-bottom: 18px;
  flex-wrap: wrap;
  background: #0b1218;
}

.panelhead h2 {
  margin: 0;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.3em;
  color: #cfdce6;
}

.hint {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--ink-faint);
}

/* ---------- 表单 ---------- */
.field { margin-bottom: 16px; }
.field.grow { flex: 1; }

.field label {
  display: block;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  color: var(--ink-dim);
  margin-bottom: 7px;
}

select {
  width: 100%;
  background: #080d11;
  border: 1px solid var(--line2);
  border-radius: 2px;
  color: var(--ink);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .06em;
  padding: 9px 12px;
  outline: none;
}
select:focus { border-color: var(--cyan-deep); }

input[type="text"], input[type="email"], input[type="password"], textarea {
  width: 100%;
  background: #080d11;
  border: 1px solid var(--line2);
  border-radius: 2px;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 13px;
  padding: 10px 12px;
  outline: none;
  transition: border-color .18s, box-shadow .18s;
}

textarea { resize: vertical; line-height: 1.85; min-height: 180px; }

/* 照片转录 */
.intakerow {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 8px;
  flex-wrap: wrap;
}
.intakerow .ghostbtn.small { letter-spacing: .1em; }
.intakerow .minisel {
  flex: 0 1 auto;
  min-width: 130px;
  max-width: 190px;
  padding: 4px 6px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .06em;
  color: var(--ink-dim);
  background: #0b141a;
  border: 1px solid var(--line2);
  border-radius: 2px;
}
.intakerow .minisel:focus { border-color: var(--cyan-deep); }
.ocrstate {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .1em;
  color: var(--ink-faint);
}
.ocrstate.busy { color: var(--cyan-soft); }
.ocrstate.err { color: var(--warn); }
.ocrstate.ok { color: var(--cyan); }

input:focus, textarea:focus {
  border-color: var(--cyan-deep);
  box-shadow: 0 0 0 1px rgba(130, 210, 245, 0.12);
}

input::placeholder, textarea::placeholder { color: #37444e; }

.fieldmeta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  color: var(--ink-faint);
  margin: -4px 0 16px;
  flex-wrap: wrap;
}

.chk { display: flex; align-items: center; gap: 7px; cursor: pointer; }
.chk input { accent-color: var(--cyan-deep); width: 13px; height: 13px; }

button { font-family: var(--sans); cursor: pointer; }

.primarybtn {
  width: 100%;
  background: transparent;
  border: 1px solid var(--cyan-deep);
  color: var(--cyan-soft);
  font-size: 13px;
  letter-spacing: 0.28em;
  padding: 12px 0;
  border-radius: 2px;
  transition: background .2s, color .2s, border-color .2s, opacity .2s;
}
.primarybtn:hover:not(:disabled) {
  background: rgba(130, 210, 245, 0.08);
  border-color: var(--cyan);
}
.primarybtn:disabled { opacity: .32; cursor: not-allowed; }

.ghostbtn {
  background: transparent;
  border: 1px solid var(--line2);
  color: var(--ink-dim);
  font-size: 11px;
  letter-spacing: 0.14em;
  padding: 6px 12px;
  border-radius: 2px;
  transition: color .2s, border-color .2s;
}
.ghostbtn:hover { color: var(--cyan-soft); border-color: var(--cyan-deep); }
.ghostbtn.small { font-size: 10px; padding: 5px 10px; }

.err {
  margin: 10px 0 0;
  min-height: 16px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--warn);
}
.err.ok { color: var(--cyan-soft); }

/* 重复手记提示：中心计算机不重复运算同一份数据 */
.dupbar {
  margin: 12px 0 0;
  padding: 12px 14px;
  border: 1px solid var(--line2);
  border-left: 2px solid var(--cyan-deep);
  background: rgba(130, 210, 245, 0.045);
}
.dupbar p {
  margin: 0 0 10px;
  font-family: var(--mono);
  font-size: 11px;
  line-height: 1.8;
  letter-spacing: .05em;
  color: var(--cyan-soft);
}
.dupacts { display: flex; gap: 10px; flex-wrap: wrap; }

/* 取样一致性：把本轮定级有多稳直接写出来 */
.stabline {
  margin: 14px 0 0;
  font-family: var(--mono);
  font-size: 10px;
  line-height: 1.9;
  letter-spacing: .08em;
  color: var(--ink-faint);
}
.stabline.split { color: var(--warn); }

/* 定级徽标：让分数背后的档位看得见 */
.lvchip {
  display: inline-block;
  margin-left: 8px;
  padding: 1px 5px;
  border: 1px solid var(--line2);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: .08em;
  color: var(--ink-dim);
}
.lvchip.split { border-color: rgba(216, 160, 90, .5); color: var(--warn); }

/* 档位大白话：A~E 各是什么意思，紧挨着四项打分 */
.lvlegend {
  margin: 12px 0 0; padding: 8px 10px;
  border: 1px dashed var(--line2); border-radius: 2px;
  font-size: 11px; line-height: 1.9; letter-spacing: .04em;
  color: var(--ink-dim);
}
.lvlegend b {
  font-family: var(--mono); font-weight: 400;
  color: var(--cyan-soft); margin-right: 2px;
}

/* ---------- 报告 ---------- */
.report { min-height: 480px; display: flex; flex-direction: column; }

.state { display: none; flex: 1; }
.report[data-state="idle"] .state-idle,
.report[data-state="computing"] .state-computing,
.report[data-state="result"] .state-result { display: block; }
.report[data-state="computing"] .state-computing,
.report[data-state="result"] .state-result { display: flex; flex-direction: column; }

.state-idle {
  display: none;
  padding: 22px 0 8px;
  text-align: center;
  color: var(--ink-faint);
}
.state-idle p { margin: 4px 0; font-size: 12px; letter-spacing: .14em; }
.state-idle .dim { color: #33404a; font-size: 11px; }

/* ============================================================
   中心计算机本体
   三层：向外散出的晕光 / 内部丝状云团 / 上方汇聚的光丝
   ============================================================ */

/* 舞台高度 = 光丝的活动余量。上方必须留出足够空白，
   否则汇聚光丝会顶到 panelhead 那条分隔线上。 */
.core-stage {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: height .9s cubic-bezier(.2, .7, .3, 1);
}
.report[data-state="idle"] .core-stage { height: 268px; }
.report[data-state="computing"] .core-stage { height: 288px; }
.report[data-state="result"] .core-stage { height: 116px; }

.core {
  position: relative;
  width: var(--size);
  height: var(--size);
  transition: width .9s cubic-bezier(.2, .7, .3, 1),
              height .9s cubic-bezier(.2, .7, .3, 1),
              opacity .9s ease;
}
.report[data-state="idle"]      .core { --size: 176px; --rate: 1;    opacity: .68; }
.report[data-state="computing"] .core { --size: 196px; --rate: .22;  opacity: 1; }
.report[data-state="result"]    .core { --size: 82px;  --rate: 2.6;  opacity: .46; }

/* 出报告时的一次呼吸：先急速收缩、过冲、再回到原状。
   不是动画循环，是一次——鉴定结束，它松了一口气。 */
.core.gasp { animation: coreGasp 1.25s cubic-bezier(.22, .68, .3, 1); }
@keyframes coreGasp {
  0%   { transform: scale(1);     filter: brightness(1); }
  20%  { transform: scale(.855);  filter: brightness(1.85) saturate(1.15); }
  48%  { transform: scale(1.05);  filter: brightness(1.1); }
  100% { transform: scale(1);     filter: brightness(1); }
}

/* 晕光 */
.core-halo {
  position: absolute;
  inset: -46%;
  border-radius: 50%;
  background: radial-gradient(circle,
    rgba(198, 238, 255, .34) 0%,
    rgba(140, 208, 248, .17) 26%,
    rgba(96, 168, 220, .07) 48%,
    rgba(70, 140, 200, 0) 72%);
  filter: blur(5px);
  animation: haloBreathe calc(6.2s * var(--rate, 1)) ease-in-out infinite;
}
@keyframes haloBreathe {
  0%, 100% { opacity: .6; transform: scale(.96); }
  50%      { opacity: 1;  transform: scale(1.05); }
}

/* 上方汇聚的光丝：画布比球体大一圈，光丝才有落脚的地方。
   外圈用径向遮罩渐隐，上方再叠一层竖向遮罩——靠近分隔线的部分先消失，
   于是光丝在球体周围最亮，越往上越淡，不会触到那条横线。 */
.core-lines { position: absolute; inset: -50%; }
.core-lines .ln {
  stroke: #cdeeff;
  stroke-linecap: round;
  fill: none;
  animation: filamentPulse calc(var(--d, 5s) * var(--rate, 1)) ease-in-out var(--x, 0s) infinite;
}
@keyframes filamentPulse {
  0%, 100% { opacity: .1; }
  46%      { opacity: .9; }
}

/* 球体 */
.core-body {
  position: absolute;
  inset: 11%;
  border-radius: 50%;
  overflow: hidden;
  /* 半透明球壳：核心最亮 → 中段压暗以托出内部光丝 → 临边再次增亮 */
  background: radial-gradient(circle at 50% 50%,
    rgba(250, 254, 255, .99) 0%,
    rgba(196, 234, 253, .95) 10%,
    rgba(124, 188, 228, .88) 26%,
    rgba(72, 140, 188, .86) 48%,
    rgba(48, 106, 150, .86) 70%,
    rgba(98, 172, 216, .90) 88%,
    rgba(192, 236, 255, .95) 100%);
  box-shadow:
    inset 0 0 22px rgba(196, 238, 255, .38),
    inset -5px -9px 24px rgba(4, 20, 34, .42),
    0 0 44px rgba(126, 202, 250, .28),
    0 0 120px rgba(90, 170, 230, .13);
}

.core-nebula {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  animation: spinSlow calc(58s * var(--rate, 1)) linear infinite;
}
.core-nebula path { fill: none; }
@keyframes spinSlow { to { transform: rotate(360deg); } }

/* 维度暗区：四个维度各占球体内一个扇区，得分越低，该扇区越暗。
   共鸣潜力在左侧扇区——它低的时候，你能看见球体左边暗下去一块。 */
.core-sectors {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  pointer-events: none;
  transition: opacity 1s ease .35s;
}
.report[data-state="result"] .core-sectors { opacity: 1; }
.core-sectors path { transition: opacity 1.1s cubic-bezier(.3, .7, .3, 1); }

/* 内核辉光：叠在光丝之上，让中心重新亮起来 */
.core-vignette {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 48% 44%,
    rgba(255, 255, 255, .58) 0%,
    rgba(214, 243, 255, .24) 15%,
    rgba(255, 255, 255, 0) 42%);
}

.core-sheen {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 35% 28%,
    rgba(255, 255, 255, .8) 0%,
    rgba(255, 255, 255, .16) 11%,
    rgba(255, 255, 255, 0) 29%);
}

/* 临边增亮：让它看起来是发光的球壳，而非暗色行星 */
.core-limb {
  position: absolute;
  inset: 11%;
  border-radius: 50%;
  pointer-events: none;
  box-shadow:
    inset 0 0 16px 1px rgba(226, 247, 255, .58),
    0 0 22px 1px rgba(184, 234, 255, .38);
}

/* 出报告后光丝收束，只留一颗安静的球 */
.report[data-state="result"] .core-lines { display: none; }

/* 运算日志 */
.state-computing {
  align-items: center;
  justify-content: center;
  padding: 8px 0 6px;
}

.log {
  list-style: none;
  margin: 0; padding: 0;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .1em;
  color: var(--ink-faint);
  min-height: 96px;
}
.log li { opacity: 0; animation: fadein .5s forwards; }
.log li::before { content: "› "; color: var(--cyan-deep); }
@keyframes fadein { to { opacity: 1; } }

/* 结果 */
.reporttitle {
  font-size: 13px;
  letter-spacing: .18em;
  color: #d5e2ec;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.scoresplit {
  display: flex;
  align-items: baseline;
  gap: 16px;
  padding: 26px 0 10px;
}

.bignum {
  font-family: var(--mono);
  font-size: 76px;
  line-height: 1;
  font-weight: 300;
  letter-spacing: -.02em;
  color: var(--excellent);
  text-shadow: 0 0 26px rgba(130, 210, 245, 0.35);
  animation: emerge .9s cubic-bezier(.2,.7,.3,1) both;
}
.bignum span { font-size: 26px; color: var(--cyan-deep); margin-left: 4px; text-shadow: none; }

@keyframes emerge {
  0% { opacity: 0; filter: blur(9px); letter-spacing: .3em; }
  100% { opacity: 1; filter: blur(0); letter-spacing: -.02em; }
}

.bignumlabel {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .34em;
  color: var(--ink-faint);
}

.verdict {
  font-size: 12px;
  letter-spacing: .34em;
  padding: 4px 0 18px;
  color: var(--pass);
}
.verdict.fail { color: var(--fail); }
.verdict.excellent { color: var(--excellent); text-shadow: 0 0 16px rgba(216,242,255,.4); }

.dims { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }

.dims li {
  padding: 15px 0;
  border-bottom: 1px solid var(--line);
  animation: fadein .8s both;
}

.dimrow {
  display: flex;
  align-items: baseline;
  gap: 12px;
}
.dimname { font-size: 12px; letter-spacing: .2em; color: #cbd8e2; min-width: 68px; }
.dimweight { font-family: var(--mono); font-size: 10px; color: var(--ink-faint); }
.dimscore {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 17px;
  color: var(--cyan-soft);
}
/* 百分号小一号：数值照旧显示，但不让它像「分数」那样抢戏 */
.dimscore em { font-style: normal; font-size: 11px; opacity: .6; margin-left: 1px; }

.bar {
  margin-top: 8px;
  height: 2px;
  background: #101a22;
  position: relative;
  overflow: hidden;
}
.bar i {
  position: absolute;
  left: 0; top: 0; bottom: 0;
  background: linear-gradient(90deg, rgba(130,210,245,.25), var(--cyan));
  box-shadow: 0 0 10px rgba(130,210,245,.35);
}

.dimcomment {
  margin-top: 9px;
  font-size: 12.5px;
  color: var(--ink-dim);
  line-height: 1.8;
}

.askrow { margin-top: 20px; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.reply {
  margin: 0;
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: .06em;
  color: var(--ink-dim);
  animation: fadein .5s both;
}

/* ---------- 档案库 ---------- */
.archive { margin: 0 32px; }

.tabs { display: flex; gap: 6px; margin-bottom: 16px; flex-wrap: wrap; }

.tab {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--ink-faint);
  font-size: 11px;
  letter-spacing: .18em;
  padding: 6px 14px;
  border-radius: 2px;
  transition: all .18s;
}
.tab:hover { color: var(--ink); }
.tab.active { color: var(--cyan-soft); border-color: var(--cyan-deep); background: rgba(130,210,245,.05); }

.curvebox { display: none; margin-bottom: 18px; }
.curvebox.on { display: block; }
.curvebox svg { width: 100%; height: 180px; display: block; }

.archivelist { display: flex; flex-direction: column; }

button.arow {
  display: grid;
  width: 100%;
  grid-template-columns: 96px 1fr 92px 78px 116px;
  gap: 14px;
  align-items: baseline;
  padding: 11px 8px;
  border: none;
  border-bottom: 1px solid var(--line);
  background: transparent;
  font-size: 12px;
  text-align: left;
  transition: background .18s;
}
button.arow:hover { background: rgba(130, 210, 245, .045); }
button.arow:hover .atitle { color: var(--cyan-soft); }
button.arow:hover .aid { color: var(--cyan-deep); }
@media (max-width: 720px) {
  button.arow { grid-template-columns: 1fr 78px; gap: 6px; }
  button.arow .aid, button.arow .awho, button.arow .atime { display: none; }
}

.aid { font-family: var(--mono); font-size: 10px; color: var(--ink-faint); letter-spacing: .08em; }
.atitle { color: #cfdce6; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.awho { font-family: var(--mono); font-size: 10px; color: var(--ink-faint); }
.ascore { font-family: var(--mono); font-size: 14px; color: var(--cyan-soft); text-align: right; }
.atime { font-family: var(--mono); font-size: 10px; color: var(--ink-faint); text-align: right; }

.vchip {
  display: inline-block;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .12em;
  padding: 2px 8px;
  border: 1px solid var(--line2);
  border-radius: 2px;
  color: var(--ink-dim);
}
.vchip.pass { color: var(--pass); border-color: rgba(130,210,245,.35); }
.vchip.excellent { color: var(--excellent); border-color: rgba(216,242,255,.45); }

.empty {
  padding: 26px 0;
  text-align: center;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .12em;
  color: var(--ink-faint);
}

.footer {
  position: relative;
  z-index: 1;
  margin: 26px 32px 0;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .1em;
  color: #2f3b45;
  text-align: center;
}

/* ---------- 模态 ---------- */
.modal {
  position: fixed;
  inset: 0;
  z-index: 20;
  background: rgba(3, 6, 9, .78);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  backdrop-filter: blur(3px);
}
.modal[hidden] { display: none; }

.modalcard {
  width: 100%;
  max-width: 420px;
  background: #0a1116;
  border: 1px solid var(--line2);
  border-radius: 3px;
  padding: 22px 24px 24px;
}
.modalcard.wide { max-width: 760px; }

.modalhead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.modalhead h3 {
  margin: 0;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .26em;
  color: #cfdce6;
}
.closebtn {
  background: none;
  border: none;
  color: var(--ink-faint);
  font-size: 20px;
  line-height: 1;
  padding: 0 4px;
}
.closebtn:hover { color: var(--cyan-soft); }

.authpane { display: flex; flex-direction: column; gap: 11px; padding-top: 16px; }
.authpane[hidden] { display: none; }
.row2 { display: flex; gap: 9px; }
.row2 input { flex: 1; }
.row2 .ghostbtn { white-space: nowrap; }

.tip {
  margin: 14px 0 0;
  font-family: var(--mono);
  font-size: 10px;
  line-height: 1.7;
  color: #33404a;
}

/* ---------- 进入序列 ---------- */
.boot {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #050a0e;
  transition: opacity .7s ease, visibility .7s;
}
.boot.done { opacity: 0; visibility: hidden; pointer-events: none; }

.bootinner { width: min(420px, 76vw); text-align: center; }

.bootmark {
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: .62em;
  text-indent: .62em;
  color: #7fc7ee;
  margin-bottom: 26px;
  text-shadow: 0 0 18px rgba(127, 199, 238, .55);
  animation: bootmarkGlow 2.6s ease-in-out infinite;
}
@keyframes bootmarkGlow {
  0%, 100% { opacity: .5; }
  50% { opacity: 1; }
}

/* 荧光蓝加载条：底色暗，填充条带辉光，条首有一枚更亮的游走光点 */
.bootbar {
  position: relative;
  height: 3px;
  background: rgba(127, 199, 238, .12);
  border-radius: 2px;
  overflow: hidden;
}
.bootbar i {
  display: block;
  height: 100%;
  width: 0%;
  border-radius: 2px;
  background: linear-gradient(90deg, #2f7ba6 0%, #7fc7ee 72%, #d8f2ff 100%);
  box-shadow: 0 0 12px rgba(127, 199, 238, .85), 0 0 26px rgba(127, 199, 238, .38);
  transition: width .18s linear;
}
.bootbar::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: 56px;
  background: linear-gradient(90deg, transparent, rgba(216, 242, 255, .5), transparent);
  animation: bootSweep 1.5s linear infinite;
}
.boot.done .bootbar::after { animation: none; }
@keyframes bootSweep {
  0% { left: -56px; }
  100% { left: 100%; }
}

.bootpct {
  margin-top: 12px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .18em;
  color: #8fd3f4;
}
.bootpct em { font-style: normal; opacity: .55; margin-left: 2px; }

.boottip {
  margin: 22px 0 0;
  font-size: 12px;
  letter-spacing: .3em;
  text-indent: .3em;
  color: #55707f;
  animation: bootTipFade 2.8s ease-in-out infinite;
}
@keyframes bootTipFade {
  0%, 100% { opacity: .45; }
  50% { opacity: .95; }
}

.audiohint {
  position: fixed;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%);
  z-index: 190;
  margin: 0;
  padding: 6px 14px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .18em;
  color: #7fc7ee;
  background: rgba(8, 18, 26, .82);
  border: 1px solid rgba(127, 199, 238, .28);
  border-radius: 2px;
  pointer-events: none;
  animation: bootTipFade 2.4s ease-in-out infinite;
}
.audiohint[hidden] { display: none; }

/* 音效触发瞬间，顶栏按钮闪一下——听得见听得见都留个证据 */
#soundBtn.fired {
  color: #d8f2ff;
  border-color: #7fc7ee;
  box-shadow: 0 0 10px rgba(127, 199, 238, .5);
}

/* ---------- 档案详情 ---------- */
.recbody { max-height: 68vh; overflow-y: auto; padding-right: 6px; }
.recbody::-webkit-scrollbar { width: 5px; }
.recbody::-webkit-scrollbar-thumb { background: var(--line2); border-radius: 3px; }

.recmeta {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .08em;
  color: var(--ink-faint);
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}
.recmeta b { color: var(--cyan); font-weight: 400; }

.recscore {
  display: flex;
  align-items: baseline;
  gap: 14px;
  padding: 18px 0 12px;
}
.recscore .n { font-family: var(--mono); font-size: 44px; font-weight: 300; color: var(--excellent); }
.recscore .n span { font-size: 16px; color: var(--cyan-deep); }
.recscore .v { font-size: 12px; letter-spacing: .28em; color: var(--pass); }

.rechand {
  margin: 16px 0 0;
  padding: 14px 16px;
  background: #070c10;
  border-left: 2px solid var(--line2);
  font-size: 13px;
  line-height: 1.95;
  color: #9fb0bd;
  white-space: pre-wrap;
  max-height: 260px;
  overflow-y: auto;
}

.reclabel {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .18em;
  color: var(--ink-faint);
  margin: 20px 0 10px;
}

/* ---------- 详细鉴定报告 ---------- */
.detailmodal { padding: 32px 20px; align-items: flex-start; }
.detailcard {
  width: 100%;
  max-width: 820px;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  background: #0a1015;
  border: 1px solid var(--line2);
  border-radius: 3px;
  padding: 22px 26px 26px;
}
.detailhead { flex-wrap: wrap; gap: 12px; }
.detailacts { display: flex; align-items: center; gap: 12px; }
.detailbody {
  overflow-y: auto;
  padding-right: 8px;
  font-size: 13.5px;
  line-height: 1.95;
  color: #a9bac6;
}
.detailbody::-webkit-scrollbar { width: 5px; }
.detailbody::-webkit-scrollbar-thumb { background: var(--line2); border-radius: 3px; }

/* 等待条：与进入页面那条同一款荧光蓝、同一种推进节奏。
   详细报告要跑十几秒，空白一片会让人以为卡住了——有条子在走就不一样。 */
.dwait {
  padding: 26px 4px 6px;
  animation: dwaitIn .4s ease both;
}
@keyframes dwaitIn { from { opacity: 0; transform: translateY(4px); } }
.dwaittip {
  margin: 0 0 14px;
  font-family: var(--mono);
  font-size: 11px; letter-spacing: .16em;
  color: #8fd3f4;
}
.dwaitbar {
  position: relative;
  height: 3px;
  background: rgba(127, 199, 238, .12);
  border-radius: 2px;
  overflow: hidden;
}
.dwaitbar i {
  display: block; height: 100%; width: 0%;
  border-radius: 2px;
  background: linear-gradient(90deg, #2f7ba6 0%, #7fc7ee 72%, #d8f2ff 100%);
  box-shadow: 0 0 12px rgba(127, 199, 238, .85), 0 0 26px rgba(127, 199, 238, .38);
}
.dwaitbar::after {
  content: '';
  position: absolute; top: 0; bottom: 0; width: 56px;
  background: linear-gradient(90deg, transparent, rgba(216, 242, 255, .5), transparent);
  animation: bootSweep 1.5s linear infinite;
}
.dwaitpct {
  margin-top: 10px;
  font-family: var(--mono);
  font-size: 11px; letter-spacing: .18em;
  color: #8fd3f4;
}
.dwaitpct em { font-style: normal; opacity: .55; margin-left: 2px; }

/* 生成失败时的说明：等条子撤了再显示 */
.dreport > .waiting {
  margin: 8px 0;
  font-family: var(--mono);
  font-size: 11px; letter-spacing: .12em;
  color: var(--warn);
}

/* 极简 Markdown 渲染 */
.md h2 {
  font-size: 13px; font-weight: 500; letter-spacing: .2em;
  color: var(--cyan-soft);
  margin: 26px 0 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}
.md h3 {
  font-size: 12.5px; font-weight: 500; letter-spacing: .14em;
  color: #cfdce6; margin: 20px 0 8px;
}
.md p { margin: 0 0 12px; }
.md ul, .md ol { margin: 0 0 14px; padding-left: 22px; }
.md li { margin-bottom: 7px; }
.md li::marker { color: var(--cyan-deep); }
.md strong { color: #dceaf4; font-weight: 600; }
.md em { color: var(--cyan); font-style: normal; }
.md blockquote {
  margin: 14px 0; padding: 8px 0 8px 16px;
  border-left: 2px solid var(--cyan-deep);
  color: var(--ink-dim);
}
.md code {
  font-family: var(--mono); font-size: 12px;
  background: #0e161d; padding: 1px 5px; border-radius: 2px; color: #b9d8ea;
}
.md hr { border: none; border-top: 1px solid var(--line); margin: 22px 0; }
.md .waiting { color: var(--ink-faint); font-family: var(--mono); font-size: 11px; letter-spacing: .12em; }

/* 报告抬头：打印时也能独立成立 */
.mdhead {
  padding-bottom: 14px;
  margin-bottom: 8px;
  border-bottom: 1px solid var(--line2);
}
.mdhead .t { font-size: 15px; letter-spacing: .16em; color: #dce8f1; }
.mdhead .m {
  margin-top: 6px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .08em;
  color: var(--ink-faint);
  line-height: 1.9;
}

/* ---------- 打印 / 导出 PDF ---------- */
@media print {
  @page { margin: 18mm 16mm; }

  html.printing, html.printing body {
    background: #fff !important;
    height: auto !important;
    overflow: visible !important;
    padding: 0 !important;
  }
  /* 只保留详细报告本身 */
  html.printing body > *:not(#detailModal) { display: none !important; }
  html.printing #detailModal {
    display: block !important;
    position: static !important;
    background: #fff !important;
    padding: 0 !important;
    backdrop-filter: none !important;
  }
  html.printing .detailcard {
    max-width: none; max-height: none;
    border: none; background: #fff; padding: 0;
  }
  html.printing .detailhead { display: none !important; }
  html.printing .detailbody {
    overflow: visible !important;
    max-height: none !important;
    color: #1a1a1a;
    font-size: 11.5pt;
    line-height: 1.75;
  }
  html.printing .md h2 {
    color: #0b3d52;
    border-bottom: 1px solid #c3d3dc;
    page-break-after: avoid;
  }
  html.printing .md h3 { color: #22303a; page-break-after: avoid; }
  html.printing .md strong { color: #000; }
  html.printing .md em { color: #0b3d52; }
  html.printing .md blockquote { border-left: 2px solid #9ab4c2; color: #44545f; }
  html.printing .md code { background: #f1f4f6; color: #22303a; }
  html.printing .md li, html.printing .md p { page-break-inside: avoid; }
  html.printing .mdhead .t { color: #000; font-size: 15pt; }
  html.printing .mdhead .m { color: #5a6a75; font-size: 8.5pt; }
}

/* ---------------- 写作评价量表 ----------------

   入口上的一条提示，点开是一张纸（rubric.html，白底，自带 A4 打印样式）。
   放在提交面板最上面：学生是来交手记的，要求就该在他动笔的地方等着他。 */
.rubricbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 2px 0 18px;
  padding: 10px 12px;
  border: 1px dashed rgba(130, 210, 245, .26);
  border-radius: 2px;
  background: rgba(130, 210, 245, .035);
}
.rubrictext {
  font-size: 12px;
  line-height: 1.6;
  letter-spacing: .02em;
  color: #7f95a3;
}
.rubricmodal { padding: 26px 18px; align-items: flex-start; }
.rubriccard {
  width: 100%;
  max-width: 940px;
  height: 90vh;
  display: flex;
  flex-direction: column;
  background: #0a1015;
  border: 1px solid var(--line2);
  border-radius: 3px;
  padding: 18px 20px 20px;
}
.rubricframe {
  flex: 1;
  width: 100%;
  min-height: 0;
  border: 0;
  border-radius: 2px;
  background: #fff;
}
@media (max-width: 720px) {
  .rubricbar { flex-direction: column; align-items: flex-start; gap: 8px; }
  .rubricmodal { padding: 12px 8px; }
  .rubriccard { height: 94vh; padding: 14px 12px 14px; }
}
