:root {
  --ink: #1b1612;
  --paper: #efe4c9;
  --paper-deep: #e2d3b0;
  --wood: #241c16;
  --wood-edge: #3a2d24;
  --stamp: #9c2b18;
  --moss: #2f4a3c;
  --ok: #2a5a3a;
  --bad: #8a1f16;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  background:
    radial-gradient(1200px 600px at 50% -10%, #3a2c22, transparent 55%),
    var(--wood);
  color: var(--ink);
  font-family: "Atkinson Hyperlegible", system-ui, sans-serif;
}

.stage {
  max-width: 52rem;
  margin: 0 auto;
  padding: 0.75rem 0.9rem 2.5rem;
}

.bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 0.85rem;
}

.modes, .tools {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

button {
  font: inherit;
  cursor: pointer;
  border: 1px solid #cbb892;
  background: var(--paper);
  color: var(--ink);
  padding: 0.45rem 0.7rem;
  border-radius: 2px;
}

button[aria-pressed="true"],
button.active {
  background: var(--moss);
  border-color: var(--moss);
  color: #f4efe4;
}

.card {
  background: var(--paper);
  border: 1px solid #c9b88a;
  box-shadow: 0 18px 40px rgba(0,0,0,.35);
  padding: 1rem 1rem 1.15rem;
}

.picture {
  height: 7.5rem;
  display: grid;
  place-items: center;
  background: var(--paper-deep);
  margin: 0 0 0.7rem;
}

.picture svg { width: 5.5rem; height: 5.5rem; }

.word {
  font-family: Newsreader, Georgia, serif;
  font-size: clamp(2rem, 6vw, 3.4rem);
  font-weight: 700;
  margin: 0 0 0.15rem;
  letter-spacing: -0.02em;
}

.word[hidden], .hint[hidden] { display: none !important; }

.hint {
  margin: 0 0 0.7rem;
  color: #4a4338;
}

.sign {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #111;
}

.sign iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.credit, .local, .fine, .score, .practice-ask {
  margin: 0.7rem 0 0;
  font-size: 0.95rem;
}

.credit a, .notes a { color: var(--stamp); }

.local {
  padding: 0.55rem 0.65rem;
  background: #f7e7c4;
  border-left: 4px solid var(--stamp);
}

.pager, .reveal-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 0.85rem;
  color: #efe4c9;
}

.pager span { font-variant-numeric: tabular-nums; }

.notes {
  background: var(--paper);
  padding: 1.1rem 1.15rem 1.4rem;
  border: 1px solid #c9b88a;
}

.notes h2 {
  font-family: Newsreader, Georgia, serif;
  font-size: 1.35rem;
  margin: 1.2rem 0 0.4rem;
}

.notes h2:first-child { margin-top: 0; }

.notes p, .notes li { line-height: 1.45; }

.choices {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
  margin-top: 0.9rem;
}

.choice {
  min-height: 8.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
}

.choice.correct { outline: 3px solid var(--ok); }
.choice.wrong { outline: 3px solid var(--bad); }

.practice-sign { margin-top: 0.7rem; }
.practice .practice-ask,
.practice .score,
.practice .credit {
  color: #efe4c9;
}
.practice .credit a { color: #e8b4a6; }

@media (max-width: 640px) {
  .bar { flex-direction: column; }
  .modes button { flex: 1 1 auto; }
}

.switch { margin: 0 0 0.7rem; color: #efe4c9; }
.switch a { color: #e8b4a6; }
.talk-card { background: var(--paper); border: 1px solid #c9b88a; box-shadow: 0 18px 40px rgba(0,0,0,.35); padding: 1rem; }
.signer {
  min-height: 18rem;
  display: grid;
  place-items: center;
  background: #efe6d2;
  position: relative;
}
.signer img { max-height: 16rem; max-width: 100%; }
.signer iframe { width: 100%; height: 18rem; border: 0; }
.letter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  justify-content: center;
  align-items: flex-end;
  padding: 0.75rem;
}
.letter-row img {
  max-height: 6.5rem;
  opacity: 0.38;
}
.letter-row img.current {
  max-height: 11rem;
  opacity: 1;
}
.now {
  font-family: Newsreader, Georgia, serif;
  font-size: clamp(1.6rem, 5vw, 2.6rem);
  margin: 0.6rem 0 0.2rem;
}
.kind { margin: 0 0 0.6rem; color: #4a4338; }
.captions {
  min-height: 4.5rem;
  padding: 0.7rem 0.8rem;
  background: #1b1612;
  color: #efe4c9;
  font-size: 1.15rem;
  line-height: 1.4;
}

.rate-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.75rem;
}
.rate-row button[aria-pressed="true"] {
  background: var(--moss);
  border-color: var(--moss);
  color: #f4efe4;
}
.save-status {
  min-height: 1.2em;
  margin: 0.45rem 0 0;
  color: #4a4338;
}
.saved {
  list-style: none;
  padding: 0;
  margin: 0.9rem 0 0;
}
.saved li {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0 0 0.4rem;
}
.saved li button:first-child {
  flex: 1 1 12rem;
  text-align: left;
}
.captions .interim { color: #b7aa90; }
.mic-row, .type-row {
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
  margin-top: 0.75rem;
}
.type-row input {
  flex: 1 1 12rem;
  font: inherit;
  padding: 0.45rem 0.6rem;
  border: 1px solid #cbb892;
  background: #f7efe0;
}
button.live { background: var(--stamp); color: #f7efe0; border-color: var(--stamp); }

