:root {
  --bg: #6e6e6e;          /* 任务背景：中性灰，全程亮度稳定 */
  --card: #7a7a7a;
  --fg: #f5f5f5;
  --accent: #4a90d9;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  background: var(--bg);
  color: var(--fg);
  font-family: -apple-system, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  -webkit-user-select: none; user-select: none;
  overflow: hidden;
}
#app, .scr { height: 100vh; }
.scr { display: none; }
.scr.on { display: flex; }

/* 卡片式页面（登录/说明/休息等） */
.card-scr { align-items: center; justify-content: center; }
.card {
  background: var(--card);
  border-radius: 12px;
  padding: 36px 44px;
  max-width: 640px;
  width: min(92vw, 640px);
  box-shadow: 0 8px 30px rgba(0,0,0,.25);
  max-height: 90vh;
  overflow-y: auto;
  line-height: 1.75;
}
.card.wide { max-width: 760px; width: min(94vw, 760px); }
.card h1 { font-size: 26px; margin-bottom: 4px; }
.card h2 { font-size: 22px; margin-bottom: 14px; }
.card .sub { color: #cfcfcf; margin-bottom: 20px; }
.card label { display: block; margin: 14px 0 6px; font-size: 15px; }
.card input[type="text"] {
  width: 100%; font-size: 17px; padding: 10px 14px; border-radius: 8px;
  border: 1px solid #555; background: #eee; color: #222;
}
.card button {
  font-size: 16px; padding: 10px 26px; border-radius: 8px; border: none;
  background: #9a9a9a; color: #fff; cursor: pointer; margin-top: 16px;
}
.card button.primary { background: var(--accent); font-size: 17px; }
.card button:hover { filter: brightness(1.1); }
.card button:disabled { opacity: .5; cursor: default; }
.card ul { padding-left: 22px; margin: 10px 0; }
.card li { margin: 6px 0; }
.err { color: #ffb3b3; margin-top: 10px; min-height: 1.2em; }
.hint { color: #d9d9d9; font-size: 13.5px; margin-top: 14px; }
.btn-row { display: flex; gap: 14px; margin: 12px 0; flex-wrap: wrap; }
.check-row { display: flex; align-items: center; gap: 8px; margin-top: 8px; font-size: 15px; }

/* 任务屏 */
#scr-task { position: relative; align-items: center; justify-content: center; }
#fixation {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  font-size: 42px; color: #e8e8e8; font-weight: 300;
}
#listen {
  position: absolute; left: 50%; top: 38%; transform: translateX(-50%);
  font-size: 24px; visibility: hidden;
}
#respond-cue {
  position: absolute; left: 50%; top: 62%; transform: translateX(-50%);
  font-size: 20px; color: #f0f0f0; text-align: center; white-space: nowrap;
}
#respond-cue.dim { font-size: 16px; color: #b8b8b8; }
#key-hint {
  position: absolute; bottom: 22px; left: 50%; transform: translateX(-50%);
  font-size: 15px; color: #d0d0d0; white-space: nowrap;
}
#key-hint.dim { font-size: 13.5px; color: #a8a8a8; }
.keycap {
  display: inline-block; min-width: 26px; padding: 2px 8px; border-radius: 5px;
  background: #e8e8e8; color: #333; font-weight: 600; text-align: center;
  box-shadow: 0 2px 0 #999; margin: 0 2px; font-size: 0.95em;
}

/* 说明页时间轴与键位表 */
.card h3 { font-size: 17px; margin: 20px 0 8px; color: #ffe9b8; }
.tl { display: flex; align-items: stretch; gap: 6px; margin: 12px 0; flex-wrap: wrap; }
.tl .seg {
  border: 1.5px solid #bbb; border-radius: 8px; padding: 7px 12px;
  font-size: 13.5px; text-align: center; line-height: 1.5; flex: 1; min-width: 96px;
}
.tl .seg b { display: block; font-size: 15px; }
.tl .seg small { color: #d5d5d5; }
.tl .arr { align-self: center; color: #ddd; font-size: 18px; }
.keytable { border-collapse: collapse; margin: 10px 0; }
.keytable td { padding: 8px 16px 8px 0; font-size: 15px; }
.keytable small { color: #d5d5d5; }
#fb {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -38%);
  text-align: center; width: 80vw;
}
#fb .amt { display: block; font-size: 52px; font-weight: 600; }
#fb .cap { display: block; font-size: 18px; color: #dcdcdc; margin-top: 6px; }
#task-corner {
  position: absolute; top: 16px; right: 20px;
  font-size: 13.5px; color: #c9c9c9;
}

/* 结束页表格 */
#end-summary table { border-collapse: collapse; margin: 14px 0; }
#end-summary td { border-bottom: 1px solid #8f8f8f; padding: 7px 18px 7px 0; font-size: 15px; }
#end-summary td:first-child { color: #d9d9d9; padding-right: 34px; }
