/* 小满视觉规范：纸感米白底、深色字、一页只有一个橙色主按钮；不用红色制造焦虑。 */
:root {
  --paper: #faf6f1;
  --card: #fffdf9;
  --sand: #eee4d8;
  --ink: #2a2520;
  --ink-700: #4a4038;
  --ink-500: #6b655f;
  --ink-300: #a8a29c;
  --orange: #ce742b;
  --orange-700: #9f4215;
  --orange-100: #fde4ce;
  --green: #173d35;
  --warn: #b3541e;
  --error: #8a2f2f;
  --ok: #2f6d3a;
  --radius: 14px;
  font-family: -apple-system, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  color: var(--ink);
  background: var(--paper);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--paper);
  font-size: 18px;
  line-height: 1.6;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  background: var(--green);
  color: #e4d7b5;
}

.topbar .brand { font-weight: 600; letter-spacing: 1px; white-space: nowrap; }
.topbar .who { font-size: 15px; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.topbar button { background: transparent; color: #e4d7b5; border: 1px solid #e4d7b5; padding: 4px 12px; font-size: 14px; }
.pending-badge { background: var(--orange-100); color: var(--orange-700); border-radius: 999px; padding: 2px 10px; font-size: 14px; }

main {
  max-width: 760px;
  margin: 0 auto;
  padding: 20px 16px 48px;
}

h1 { font-size: 26px; margin: 8px 0 16px; }
h2 { font-size: 21px; margin: 24px 0 12px; }
p { margin: 8px 0; }
.muted { color: var(--ink-500); font-size: 16px; }
.warn { color: var(--warn); }
.error { color: var(--error); }
.ok { color: var(--ok); }

.card {
  background: var(--card);
  border: 1px solid var(--sand);
  border-radius: var(--radius);
  padding: 18px;
  margin: 12px 0;
}

button {
  font: inherit;
  border-radius: 12px;
  border: 1px solid var(--sand);
  background: var(--sand);
  color: var(--ink);
  padding: 12px 20px;
  cursor: pointer;
  min-height: 48px;
}

button:disabled { opacity: 0.5; cursor: not-allowed; }
button.primary { background: var(--orange); border-color: var(--orange); color: #fff; font-weight: 600; }
button.primary:active { background: var(--orange-700); }
button.link { background: transparent; border: none; color: var(--orange-700); padding: 8px 4px; min-height: auto; text-decoration: underline; }
button.wide { width: 100%; }

.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.row.end { justify-content: flex-end; }
.spread { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }

label.field { display: block; margin: 16px 0 6px; font-weight: 600; }

input[type="text"], select {
  font: inherit;
  width: 100%;
  padding: 12px;
  border: 1px solid var(--ink-300);
  border-radius: 10px;
  background: #fff;
  min-height: 48px;
}

.code-input { font-size: 26px; letter-spacing: 4px; text-transform: uppercase; text-align: center; }

.choices { display: flex; gap: 10px; flex-wrap: wrap; }
.choices button { flex: 1 1 auto; }
.choices button[aria-pressed="true"] { background: var(--orange-100); border-color: var(--orange); color: var(--orange-700); font-weight: 600; }

.check { display: flex; gap: 12px; align-items: flex-start; margin: 12px 0; font-size: 17px; }
.check input { width: 24px; height: 24px; margin-top: 3px; flex: none; }

.speaker {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.speaker .code { font-weight: 600; font-size: 20px; }
.tag { display: inline-block; background: var(--sand); color: var(--ink-700); border-radius: 999px; padding: 1px 10px; font-size: 14px; margin-right: 6px; }

.progress { height: 10px; background: var(--sand); border-radius: 999px; overflow: hidden; margin: 8px 0 4px; }
.progress > div { height: 100%; background: var(--orange); }

.prompt {
  text-align: center;
  padding: 28px 12px;
}
.prompt .cue { font-size: 24px; color: var(--ink-700); }
.prompt .say { font-size: clamp(44px, 12vw, 84px); font-weight: 700; line-height: 1.25; margin: 12px 0; word-break: keep-all; }
.prompt .say.long { font-size: clamp(22px, 5vw, 30px); font-weight: 500; text-align: left; line-height: 1.8; }
.prompt .hint { font-size: 16px; color: var(--ink-500); }

.record-button {
  display: block;
  margin: 8px auto;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  font-size: 24px;
  font-weight: 700;
  background: var(--orange);
  border: none;
  color: #fff;
}
.record-button.recording { background: var(--green); }

.meter { height: 14px; background: var(--sand); border-radius: 999px; overflow: hidden; max-width: 360px; margin: 12px auto; }
.meter > div { height: 100%; width: 0; background: var(--ok); transition: width 80ms linear; }

.qc { text-align: center; font-size: 19px; margin: 12px 0; }
.qc ul { list-style: none; padding: 0; margin: 4px 0; }

.notice { background: var(--orange-100); color: var(--orange-700); border-radius: 12px; padding: 12px 16px; margin: 12px 0; }

table { width: 100%; border-collapse: collapse; font-size: 15px; }
th, td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--sand); vertical-align: top; }
th { color: var(--ink-500); font-weight: 600; }

@media (max-width: 520px) {
  body { font-size: 17px; }
  .record-button { width: 150px; height: 150px; font-size: 21px; }
  main { padding: 16px 16px 40px; }
}

main.wide-main { max-width: 1100px; }
.topbar a { color: #e4d7b5; }
