/* Look follows the design figure: gray cards, gray speaker/mic icons, "+" fixation. */
:root {
  --bg: #ffffff;
  --ink: #1d1f23;
  --muted: #6b7078;
  --card: #efefef;
  --card-line: #c9c9c9;
  --icon: #8a8a8a;
}

body { background: var(--bg); color: var(--ink); font-family: 'Open Sans', 'Arial', sans-serif; font-size: 18px; }

.screen { max-width: 760px; margin: 0 auto; padding: 0 16px; line-height: 1.5; }
.screen.left, .left { text-align: left; }
.center { text-align: center; }
.muted { color: var(--muted); }
.screen > .icon { width: 64px; height: 64px; color: var(--icon); }

/* Flashcard screens */
.card-screen { display: flex; align-items: center; justify-content: center; height: 70vh; }
.card {
  box-sizing: border-box; width: min(600px, 92vw); height: 340px;
  background: var(--card); border: 2px solid var(--card-line); border-radius: 18px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px;
  color: var(--icon);
}
.card .icon { width: 120px; height: 120px; }
.card-label { margin: 0; font-size: 36px; color: var(--muted); }

/* Question words appearing as they're spoken (QUESTION_TEXT = 'words'). */
.card.card-words { width: min(1000px, 94vw); height: auto; min-height: 340px; padding: 36px 44px; }
.q-words { margin: 0; color: var(--ink); font-size: clamp(28px, 4vw, 48px); line-height: 1.35; text-align: center; }
.q-words .w { opacity: 0; transition: opacity 0.12s ease-out; }
.q-words .w.on { opacity: 1; }

/* Instruction mock-ups of each screen (smaller copies of the real cards) */
.mock-wrap { display: flex; justify-content: center; margin: 18px 0; }
.card.mock { width: min(440px, 88vw); height: 220px; gap: 10px; }
.card.mock .icon { width: 72px; height: 72px; }
.card.mock .card-label { font-size: 24px; }
.card.card-words.mock { width: min(620px, 88vw); min-height: 180px; height: auto; padding: 24px 28px; }
.card.mock .q-words { font-size: 30px; }
.callout {
  font-size: 22px; font-weight: 600; margin: 18px auto; padding: 12px 18px; max-width: 620px;
  background: #fff4d6; border: 2px solid #e0a82e; border-radius: 10px; color: #5c3d00;
}

.fixation {
  display: flex; align-items: center; justify-content: center; height: 70vh;
  font-size: 96px; font-weight: 300; user-select: none;
}

/* Instruction steps */
.steps { display: flex; gap: 16px; justify-content: center; margin: 20px 0; flex-wrap: wrap; }
.step {
  width: 170px; padding: 14px 8px; background: var(--card); border: 1px solid var(--card-line);
  border-radius: 12px; text-align: center; color: var(--icon);
}
.step p { margin: 4px 0; color: var(--ink); }
.step p.muted { color: var(--muted); font-size: 14px; }
.step .icon { width: 40px; height: 40px; }
.step-plus { font-size: 40px; line-height: 40px; height: 40px; color: var(--ink); }

/* Mic check level meter */
.meter {
  width: 420px; max-width: 90%; height: 26px; margin: 16px auto; border: 2px solid #333;
  border-radius: 6px; overflow: hidden; background: #eee;
}
#mic-check-level { height: 100%; width: 0%; background: #2a2; }

.consent {
  max-height: 68vh; overflow-y: auto; border: 1px solid var(--card-line); border-radius: 8px;
  background: #fafafa; padding: 8px;
}
.consent img { display: block; width: 100%; max-width: 760px; margin: 0 auto 8px; }

.lab-id { margin-top: 18vh; text-align: center; }
.lab-id input { font-size: 18px; padding: 8px 12px; margin-right: 8px; }

/* Fullscreen-exit / blur warning */
.warning-overlay {
  position: fixed; inset: 0; z-index: 10000; background: rgba(0, 0, 0, 0.55);
  display: flex; align-items: center; justify-content: center;
}
.warning-box { background: #fff; border-radius: 12px; padding: 24px 32px; max-width: 520px; text-align: center; }

.debug-hint {
  position: fixed; bottom: 8px; right: 10px; z-index: 99999; pointer-events: none;
  font: 12px sans-serif; color: #999; background: rgba(255, 255, 255, 0.75);
  padding: 2px 6px; border-radius: 4px;
}
