/* 全站保持中灰底色，避免明亮页面影响观看时的明暗适应 */
:root {
  --grey: #808080;
  --card: #e6e6e6;
  --ink: #1b1b1b;
  --muted: #4a4a4a;
  --accent: #2f2f2f;
  --ok: #1d6b2f;
  --bad: #9b1c1c;
}

* { box-sizing: border-box; }

/* hidden 属性必须压过下面各元素自己的 display（#label 是 flex，不加这条播放时字样会压在视频上） */
[hidden] { display: none !important; }

html, body {
  margin: 0;
  min-height: 100%;
  background: var(--grey);
  color: var(--ink);
  font: 16px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

#app { padding: 48px 16px; }

/* Language picker, top right; the playback layer (z-index 10) covers it during trials */
#lang-bar { position: absolute; top: 12px; right: 16px; }
#lang-bar select { width: auto; max-width: none; padding: 4px 8px; font-size: 14px; }

.card {
  max-width: 720px;
  margin: 0 auto;
  padding: 32px 36px;
  background: var(--card);
  border-radius: 10px;
}

h1 { margin: 0 0 16px; font-size: 26px; font-weight: 600; }
p { margin: 0 0 14px; }
.note { color: var(--muted); font-size: 14px; }
.placeholder { border: 2px dashed var(--muted); padding: 12px 16px; margin-bottom: 16px; border-radius: 6px; }

.steps { padding-left: 22px; margin: 0 0 8px; }
.steps li { margin-bottom: 8px; }

.check { display: flex; gap: 10px; align-items: flex-start; margin: 18px 0 4px; }
.check input { margin-top: 5px; }

.checks { list-style: none; padding: 0; margin: 0 0 16px; }
.checks li { padding: 6px 0 6px 30px; position: relative; }
.checks li::before { position: absolute; left: 0; font-weight: 700; }
.checks li.ok::before { content: "✓"; color: var(--ok); }
.checks li.bad::before { content: "✗"; color: var(--bad); }
.fail { color: var(--bad); }

.actions { margin-top: 24px; display: flex; justify-content: flex-end; }

button, .button {
  font: inherit;
  padding: 10px 22px;
  border: 0;
  border-radius: 6px;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  text-decoration: none;
}
button:disabled { opacity: 0.4; cursor: default; }
button.link { background: none; color: var(--ink); text-decoration: underline; padding: 6px; }

fieldset { border: 0; padding: 0; margin: 0 0 18px; }
legend { font-weight: 600; margin-bottom: 6px; padding: 0; }
fieldset label { display: block; margin: 2px 0; }
select, textarea { font: inherit; padding: 6px 8px; width: 100%; max-width: 420px; border: 1px solid #999; border-radius: 4px; background: #fff; }

/* 播放层 */
#stage {
  position: fixed;
  inset: 0;
  background: var(--grey);
  overflow: hidden;
  z-index: 10;
}
#stage.playing { cursor: none; }
#stage video {
  position: absolute;
  visibility: hidden;
  object-fit: fill;
  background: var(--grey);
}
#label {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--ink);
}
#label-big { font-size: 120px; font-weight: 600; line-height: 1; }
#label-small { margin-top: 18px; font-size: 18px; color: #2a2a2a; }

.panel {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(640px, calc(100% - 32px));
  padding: 28px 32px;
  background: var(--card);
  border-radius: 10px;
  text-align: center;
}
.panel .q { font-size: 22px; font-weight: 600; margin-bottom: 22px; }
/* Three equal-width answer buttons (A / same / B); long translations wrap inside the button */
.choices { display: flex; gap: 16px; justify-content: center; margin-bottom: 12px; }
.choice { flex: 1 1 0; min-width: 0; padding: 14px 12px; font-size: 18px; line-height: 1.25; }

.bar { height: 8px; background: #bdbdbd; border-radius: 4px; overflow: hidden; margin: 8px 0 4px; }
.bar > div { height: 100%; width: 0; background: var(--accent); transition: width 0.2s; }
#notice-btn { margin-top: 12px; }
