:root {
  --quiz: #2f5f8f;
  --quiz2: #f2b84b;
}

[hidden] { display: none !important; }

.setup {
  height: 100%;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 12px;
}

.hero {
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 16px;
  background: linear-gradient(145deg, #f08a70, #c85a47);
  color: #fffdf5;
}

.heroInner { height: 100%; display: flex; flex-direction: column; gap: 12px; }

.heroTitle {
  margin: 0;
  font-family: "CMB", "Segoe UI", system-ui, sans-serif;
  font-size: 38px;
  font-weight: 400;
}

.heroDesc { margin: 0; font-weight: 700; line-height: 1.4; max-width: 68ch; }

.heroInfo {
  border: 1px solid rgba(255, 255, 255, .26);
  border-radius: 14px;
  background: rgba(255, 255, 255, .14);
  padding: 10px 12px;
  font-size: 14px;
  line-height: 1.35;
  font-weight: 800;
}

.emojiStatus {
  border: 1px solid rgba(255, 255, 255, .2);
  border-radius: 14px;
  background: rgba(10, 24, 38, .22);
  padding: 9px 12px;
  font-size: 13px;
  line-height: 1.35;
  font-weight: 800;
}

.spacer { flex: 1 1 auto; min-height: 12px; }
.startRow { display: flex; justify-content: flex-end; }

.game {
  height: 100%;
  display: grid;
  grid-template-columns: 1.65fr 0.65fr;
  gap: 12px;
}

.playWrap {
  border: 1px solid var(--border);
  border-radius: 18px;
  background: #fff;
  padding: 12px;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.metaTop {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 13px;
  color: var(--muted);
  font-weight: 850;
  margin-bottom: 10px;
}

.playArea {
  flex: 1 1 auto;
  min-height: 0;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: #fff;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 16px;
  padding: 24px;
}

.emojiPrompt {
  flex: 1 1 auto;
  min-height: 190px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  text-align: center;
  font-size: 96px;
  line-height: 1.05;
  overflow-wrap: anywhere;
}

.solutionBox {
  border: 1px solid rgba(47, 95, 143, .2);
  border-radius: 18px;
  background: #eef6ff;
  color: #173047;
  padding: 14px 16px;
  text-align: center;
  font-size: 18px;
  font-weight: 900;
  line-height: 1.35;
  min-height: 58px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.solutionBox strong,
.solutionLead,
.solutionQuestion {
  font-family: "CMB", "Segoe UI", system-ui, sans-serif;
  font-size: 30px;
  font-weight: 400;
}

.solutionLead {
  line-height: 1;
}

.solutionTerm {
  display: block;
  margin-top: 8px;
  font-family: "CMB", "Segoe UI", system-ui, sans-serif;
  font-size: clamp(30px, 4vw, 46px);
  font-weight: 400;
  color: #14281e;
}

.solutionBox.correct {
  background: #e7f8ee;
  border-color: #b9e8c8;
}

.solutionBox.reveal {
  background: #fff4d8;
  border-color: #f2d28c;
}

.answerArea {
  display: grid;
  gap: 10px;
}

.inputLine {
  display: grid;
  grid-template-columns: 1fr 58px;
  gap: 10px;
  align-items: stretch;
}

.inputLine.standardInput {
  grid-template-columns: 1fr;
}

.inputLine.standardInput .deleteKey {
  display: none;
}

.answerArea input {
  min-height: 54px;
  text-align: center;
  font-size: 22px;
  font-weight: 900;
}

.deleteKey {
  min-height: 54px;
  padding: 10px;
  font-size: 22px;
  line-height: 1;
  background: #e8efea;
  color: #183424;
}

.actionRow {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 10px;
}

.actionRow

.actionRow.answered,
.actionRow.revealOnlyActions {
  grid-template-columns: 1fr;
}

.actionRow.answered #btnNext,
.actionRow.revealOnlyActions #btnReveal {
  grid-column: 1 / -1;
}

.answerArea.revealOnly .inputLine,
.answerArea.revealOnly .keyboardWrap {
  display: none;
}

.keyboardWrap {
  display: flex;
  justify-content: center;
  overflow: hidden;
}

.keyboard {
  width: min(100%, 760px);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.kbRow {
  display: grid;
  grid-template-columns: repeat(var(--maxCols), 1fr);
  gap: 8px;
}

.key,
.keySpacer {
  width: 100%;
  min-height: 42px;
  border-radius: 13px;
  border: 1px solid var(--border);
  background: #fff;
  color: #111827;
  font-weight: 950;
  font-size: 15px;
  box-shadow: inset 0 -10px 18px rgba(0, 0, 0, 0.06);
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.key {
  cursor: pointer;
}

.key:active {
  transform: scale(.99);
}

.keySpacer {
  background: transparent;
  border-color: transparent;
  box-shadow: none;
  pointer-events: none;
}

.bigAction {
  min-height: 64px;
  font-size: 18px;
  font-family: "CMB", "Segoe UI", system-ui, sans-serif;
}

.side {
  border: 1px solid var(--border);
  border-radius: 18px;
  background: #fff;
  padding: 12px;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: auto;
}

.sideBlock {
  margin-bottom: 10px;
}

.msg {
  border: 1px solid var(--border);
  border-radius: 16px;
  background: #f8fafc;
  padding: 10px;
  min-height: 64px;
  font-size: 13px;
  color: var(--muted);
  font-weight: 800;
  line-height: 1.35;
}

.msg strong {
  color: var(--text);
  font-family: "CMB", "Segoe UI", system-ui, sans-serif;
  font-size: 22px;
  font-weight: 400;
}

.sideButtons {
  display: grid;
  gap: 10px;
  margin-top: auto;
}

@media (max-width: 980px) {
  .setup,
  .game {
    grid-template-columns: 1fr;
  }

  .emojiPrompt {
    font-size: 70px;
    min-height: 150px;
  }
}
