body[data-game="rebus"] .rebusstage .riddle {
  color: #29223d;
  background: #fff6df;
  border: 2px solid #e7bd67;
  border-radius: 14px;
  box-shadow: 0 5px 0 #a47e3d55;
  padding: 14px;
  line-height: 1.35;
  font-size: clamp(18px, 3vw, 26px);
}
.rebus-pattern,
.phrase-pattern {
  font-size: 14px;
  color: #dac6ee;
  text-align: center;
}
.rebus-feedback {
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 100%;
  text-align: center;
}
.rebus-feedback .clue {
  max-width: 480px;
}
.phrase-stage .phraseboard {
  width: 100%;
  max-width: 650px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.phrase-attempt small {
  display: block;
  font-size: 13px;
  margin-bottom: 5px;
  color: #dac6ee;
}
.phrase-stage .guessrow,
.phrase-history .guessrow {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 10px;
}
.phrase-word {
  display: inline-flex;
  gap: 2px;
  white-space: nowrap;
}
.phrase-stage .phrase-word .letter {
  width: 22px;
  height: 30px;
  font-size: 16px;
}
.phrase-stage .phrase-word .letter:not(.right):not(.near):not(.miss) {
  background: #352b4b;
  border-bottom: 2px solid #b9a1d3;
}
.phrase-entry {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  width: 100%;
  max-width: 500px;
}
.phrase-entry textarea {
  width: 100%;
  min-width: 0;
  height: 88px;
  resize: none;
  padding: 9px;
  font: 700 16px/1.35 system-ui;
  background: #17122d;
  color: #fff8ed;
  border: 1px solid #927eac;
  border-radius: 10px;
  box-sizing: border-box;
}
.phrase-history .letter {
  width: 18px;
  height: 26px;
  font-size: 14px;
}
.comparisonstage .choices {
  display: grid;
  grid-template-columns: 1fr 1fr;
  width: min(100%, 600px);
  gap: 12px;
}
.comparisonstage .choices button {
  min-height: 96px;
  padding: 16px;
  border: 2px solid #8f77b6;
  border-radius: 15px;
  background: linear-gradient(140deg, #372752, #221a38);
  font-size: clamp(16px, 2vw, 21px);
}
.comparisonstage .choices button.answer-correct {
  border-color: #80e3bc;
  background: #234739;
}
.comparisonstage .clue {
  max-width: 650px;
  font-size: 16px;
  line-height: 1.4;
}
@media (max-height: 440px) {
  body:is([data-game="phrase"], [data-game="rebus"], [data-game="higher-lower"])
    .subtitle {
    display: none;
  }
  .phrase-stage {
    display: grid;
    grid-template-columns: 1fr 1fr;
    justify-items: center;
    gap: 6px;
  }
  .phrase-stage .phraseboard {
    grid-column: 1;
    grid-row: 1/4;
  }
  .phrase-stage .phrase-entry,
  .phrase-stage .phrase-pattern,
  .phrase-stage [data-guess-history] {
    grid-column: 2;
  }
  .phrase-stage .phrase-word .letter {
    width: 18px;
    height: 26px;
    font-size: 14px;
  }
  .phrase-stage .guessrow {
    gap: 4px 6px;
  }
  .phrase-stage .phraseboard {
    gap: 7px;
  }
  .comparisonstage {
    display: flex;
    flex-direction: column;
    gap: 5px;
  }
  .comparisonstage .choices {
    width: min(100%, 660px);
  }
  .comparisonstage .choices button {
    min-height: 60px;
    padding: 8px;
    font-size: 16px;
  }
  .comparisonstage h2 {
    font-size: 19px;
    margin: 0;
  }
  .comparisonstage .clue {
    font-size: 14px;
    margin: 0;
  }
  .rebusstage {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5px;
  }
  .rebusstage .riddle {
    grid-column: 1;
    grid-row: 1/5;
  }
  .rebusstage .entry {
    display: flex;
    flex-wrap: nowrap;
    gap: 5px;
  }
  .rebusstage .entry input {
    width: 0;
    min-width: 0;
    flex: 1;
  }
  .rebusstage .metric,
  .rebusstage .entry,
  .rebusstage .actions,
  .rebusstage .rebus-pattern {
    grid-column: 2;
  }
  .rebus-feedback {
    display: flex;
    flex-direction: column;
  }
  .rebus-feedback h2 {
    font-size: 20px;
    margin-bottom: 4px;
  }
}
.phrase-entry {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.phrase-entry textarea {
  height: 64px;
}
.phrase-actions {
  display: flex;
  gap: 8px;
  justify-content: center;
  width: 100%;
}
.comparison-feedback {
  display: flex;
  flex-direction: column;
  text-align: center;
}
.comparison-feedback .clue {
  max-width: 660px;
}
.comparison-feedback h2 {
  margin-bottom: 4px;
}
@media (max-height: 440px) {
  .phrase-stage {
    gap: 4px;
  }
  .comparison-feedback {
    gap: 5px;
  }
  .comparison-feedback h2 {
    font-size: 20px;
  }
  .comparison-feedback .clue {
    font-size: 14px;
    line-height: 1.35;
  }
}
