:root {
  --bg: #f4f6fb;
  --card: #ffffff;
  --ink: #1c2434;
  --ink-2: #5b6577;
  --line: #e3e8f0;
  --brand: #2f6bff;
  --brand-ink: #ffffff;
  --ok: #16a34a;
  --warn: #e0a300;
  --bad: #dc2626;
  --radius: 14px;
  --shadow: 0 6px 24px rgba(23, 43, 84, .08);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Source Han Sans SC", sans-serif;
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

.wrap { max-width: 880px; margin: 0 auto; padding: 20px 16px 80px; }

/* 顶部条 */
.topbar {
  position: sticky; top: 0; z-index: 20;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.topbar-inner {
  max-width: 880px; margin: 0 auto; padding: 10px 16px;
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
}
.topbar h1 { font-size: 16px; margin: 0; font-weight: 600; flex: 1; min-width: 200px; }
.timer { font-variant-numeric: tabular-nums; font-weight: 700; font-size: 17px; color: var(--ink); }
.timer.warn { color: var(--bad); }
.who { font-size: 13px; color: var(--ink-2); }

/* 卡片 */
.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 22px; margin-bottom: 18px;
}
.card h2 { margin: 0 0 4px; font-size: 19px; }
.sub { color: var(--ink-2); font-size: 14px; margin: 0 0 16px; }

/* 进度 */
.progress { height: 6px; background: #e8edf7; border-radius: 99px; overflow: hidden; margin: 14px 0 6px; }
.progress > i { display: block; height: 100%; width: 0; background: var(--brand); transition: width .25s ease; }
.progress-label { font-size: 13px; color: var(--ink-2); display: flex; justify-content: space-between; }

/* 题干 */
.stem { font-size: 20px; font-weight: 600; margin: 6px 0 18px; word-break: break-word; }
.stem.zh { font-size: 24px; }
.stem-en { font-size: 21px; font-weight: 600; color: var(--brand); letter-spacing: .2px; }

/* 选项 */
.opts { display: grid; gap: 10px; }
.opt {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 13px 15px; border: 1.5px solid var(--line); border-radius: 11px;
  cursor: pointer; background: #fff; transition: .15s; text-align: left;
  font-size: 16px; font-family: inherit; color: inherit; width: 100%;
}
.opt:hover { border-color: #b9c9ff; background: #f7f9ff; }
.opt .k {
  flex: none; width: 26px; height: 26px; border-radius: 50%;
  background: #eef2fb; color: var(--ink-2);
  display: grid; place-items: center; font-size: 13px; font-weight: 700; margin-top: 1px;
}
.opt.sel { border-color: var(--brand); background: #f2f6ff; }
.opt.sel .k { background: var(--brand); color: #fff; }
.opt.right { border-color: var(--ok); background: #f2fcf5; }
.opt.right .k { background: var(--ok); color: #fff; }
.opt.wrong { border-color: var(--bad); background: #fff5f5; }
.opt.wrong .k { background: var(--bad); color: #fff; }
.opt[disabled] { cursor: default; }

/* 按钮 */
.btn {
  appearance: none; border: 0; border-radius: 11px; padding: 12px 22px;
  font-size: 16px; font-family: inherit; font-weight: 600; cursor: pointer;
  background: var(--brand); color: var(--brand-ink); transition: .15s;
}
.btn:hover { filter: brightness(1.06); }
.btn:disabled { opacity: .45; cursor: not-allowed; filter: none; }
.btn.ghost { background: #eef2fb; color: var(--ink); }
.btn.big { width: 100%; padding: 15px; font-size: 17px; }
.btn.danger { background: var(--bad); }
.btn.small { padding: 8px 14px; font-size: 14px; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.row.end { justify-content: flex-end; }
.spread { display: flex; justify-content: space-between; gap: 12px; align-items: center; margin-top: 20px; }

/* 输入 */
label.field { display: block; margin: 0 0 16px; }
label.field > span { display: block; font-size: 14px; font-weight: 600; margin-bottom: 6px; }
input[type=text], select {
  width: 100%; padding: 12px 14px; border: 1.5px solid var(--line);
  border-radius: 11px; font-size: 16px; font-family: inherit; background: #fff; color: var(--ink);
}
input[type=text]:focus, select:focus { outline: none; border-color: var(--brand); }

/* 播放器 */
.player { display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  background: #f7f9ff; border: 1px solid #dfe7ff; border-radius: 12px; padding: 14px 16px; }
.playbtn {
  width: 54px; height: 54px; border-radius: 50%; border: 0; cursor: pointer;
  background: var(--brand); color: #fff; font-size: 20px; display: grid; place-items: center;
  flex: none; transition: .15s;
}
.playbtn:disabled { background: #c9d2e3; cursor: not-allowed; }
.plays-left { font-size: 13px; color: var(--ink-2); }
.playing-note { color: var(--brand); font-size: 14px; }

/* 口语录音 */
.rec-panel { display: grid; gap: 14px; }
.rec-ring {
  width: 110px; height: 110px; border-radius: 50%; margin: 6px auto;
  display: grid; place-items: center; font-size: 30px; font-weight: 700;
  font-variant-numeric: tabular-nums;
  background: #eef2fb; color: var(--ink-2); border: 4px solid #e0e7f5; transition: .2s;
}
.rec-ring.on { background: #ffeef0; color: var(--bad); border-color: #ffd0d6; animation: pulse 1s infinite; }
@keyframes pulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.04); } }
.hint { font-size: 13px; color: var(--ink-2); }
.result-box { background: #f7f9ff; border: 1px solid #dfe7ff; border-radius: 12px; padding: 14px 16px; font-size: 14px; }
.result-box b { color: var(--brand); }
.tag { display: inline-block; padding: 2px 10px; border-radius: 99px; font-size: 12px; font-weight: 700; }
.tag.ok { background: #e7f9ee; color: var(--ok); }
.tag.warn { background: #fdf5e3; color: #a97b00; }
.tag.bad { background: #fdeaea; color: var(--bad); }
.tag.gray { background: #eef1f6; color: var(--ink-2); }

/* 分数面板 */
.score-hero { text-align: center; padding: 8px 0 4px; }
.score-hero .num { font-size: 56px; font-weight: 800; line-height: 1.1; }
.score-hero .num small { font-size: 20px; font-weight: 600; color: var(--ink-2); }
.breakdown { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 18px 0; }
.bd { background: #f7f9ff; border: 1px solid #e5ebfa; border-radius: 12px; padding: 14px; text-align: center; }
.bd .v { font-size: 24px; font-weight: 700; }
.bd .l { font-size: 13px; color: var(--ink-2); }
table.detail { width: 100%; border-collapse: collapse; font-size: 14px; }
table.detail th, table.detail td { text-align: left; padding: 9px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.detail th { color: var(--ink-2); font-weight: 600; font-size: 13px; }

/* 通告条 */
.notice { padding: 12px 14px; border-radius: 11px; font-size: 14px; margin-bottom: 14px; }
.notice.info { background: #eef3ff; color: #24509a; }
.notice.warn { background: #fdf6e6; color: #8a6500; }
.notice.bad { background: #fdeeee; color: #9b2c2c; }
.notice.ok { background: #eafaf0; color: #166534; }

.center { text-align: center; }
.muted { color: var(--ink-2); font-size: 14px; }
.hidden { display: none !important; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13px; }

@media (max-width: 560px) {
  .wrap { padding: 14px 12px 70px; }
  .card { padding: 18px 15px; }
  .breakdown { grid-template-columns: 1fr; }
  .stem { font-size: 18px; }
  .stem.zh { font-size: 21px; }
}
@media print {
  .topbar, .btn, .row { display: none !important; }
}