.game-page {
  --tint: #e2e9dc;
  --tint-line: #c2ceba;
  --panel: #fefdf9;
}
.game-page.alphabet { --tint: #f0e8d5; --tint-line: #d9ccb2; }
.game-page button, .game-page input, .game-page select { font: inherit; color: inherit; }
.game-page button { cursor: pointer; }
.game-page :is(button, select, input):focus-visible { outline: 3px solid #956b21; outline-offset: 3px; }
.game-page button:disabled { cursor: default; }
.game-toolbar { display: flex; align-items: center; gap: 11px; margin: 4px 0 16px; }
.game-toolbar[hidden] { display: none; }
.game-toolbar label { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; }
.game-toolbar label .icon { color: var(--accent); }
.set-select { position: relative; }
.set-select select {
  cursor: pointer; appearance: none; background: var(--panel); border: 1px solid #bfc6b8;
  border-radius: 6px; min-height: 42px; padding: 8px 30px 8px 12px; font-size: 14px; font-weight: 550;
}
.set-select .icon { position: absolute; top: 50%; right: 9px; width: 14px; height: 14px; transform: translateY(-50%); pointer-events: none; }
.game-workspace { display: grid; grid-template-columns: minmax(0, 2.1fr) minmax(230px, 1fr); align-items: start; gap: 20px; }
#game-panel, #game-aside { border: 1px solid var(--rule); border-radius: 12px; min-width: 0; padding: clamp(20px, 2.75vw, 35px); overflow-wrap: break-word; }
#game-panel { background: var(--panel); box-shadow: 0 2px 6px #273b3407; }
#game-aside { background: #eef0e7; padding: 23px; }
.game-kicker {
  margin: 0 0 12px; color: var(--accent);
  font: 600 11px/1.5 var(--mono); text-transform: uppercase; letter-spacing: .11em;
}
.game-specimen {
  display: grid; place-items: center; margin: 12px 0 21px; min-height: clamp(108px, 12vw, 157px); padding: 12px;
  border: 1px solid var(--tint-line); border-radius: 7px; color: #414a30;
  background-color: var(--tint);
  background-image: linear-gradient(90deg, #877e4e13 1px, transparent 1px), linear-gradient(#877e4e13 1px, transparent 1px);
  background-size: 23px 23px;
  text-align: center; font: 400 clamp(44px, 7vw, 80px)/1 var(--serif); letter-spacing: -.045em;
}
.game-prompt { margin: 5px 0 16px; font: 400 clamp(26px, 3vw, 38px)/1.18 var(--serif); letter-spacing: -.037em; }
.values #game-panel .game-prompt { max-width: 34ch; }
.values #game-panel:has(.game-instruction) .game-prompt {
  max-width: none; border-left: 3px solid #77916d; background: #f0f3ea; padding: 16px 20px;
  font-size: clamp(24px, 2.5vw, 32px); line-height: 1.26;
}
.game-instruction { font-weight: 550; color: var(--text); }
.game-prompt:focus { outline: none; }
.game-detail, .game-feedback p, #game-aside p { font-size: 15px; color: var(--text); }
.game-actions, .game-answer-form { display: flex; flex-wrap: wrap; gap: 9px; align-items: center; margin-top: 20px; }
.game-answer-form label { flex-basis: 100%; font-size: 14px; font-weight: 600; }
.game-input {
  flex: 1 1 160px; min-width: 0; min-height: 45px; padding: 9px 12px; background: #fff;
  border: 1px solid #aeb9a8; border-radius: 6px;
}
.game-primary, .game-secondary, button.game-reveal, .game-choice {
  border: 1px solid #c5ccbe; border-radius: 6px; min-height: 44px; padding: 9px 15px; background: #f9f9f2;
}
.game-page :is(.game-primary, .game-secondary, button.game-reveal, .game-choice) { font-size: 14px; font-weight: 600; }
.game-page .game-primary { background: #2c473d; border-color: #2c473d; color: #fffef7; }
.game-page .game-primary:hover:enabled { background: #385b48; }
.game-page :is(.game-secondary, button.game-reveal, .game-choice):hover:enabled { background: #eef1e7; border-color: #8fa188; }
.game-page :is(.game-secondary,.game-primary):disabled { opacity: .55; }
.game-choices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; margin-top: 20px; }
.game-choice { background: var(--panel); text-align: left; }
.game-choice[data-result=correct] { border-color: #67845b; background: #e6efdd; }
.game-choice[data-result=wrong] { border-color: #a57562; background: #f5e9e1; }
.game-result-label { display: block; margin-top: 3px; font-size: 12px; font-weight: 500; }
.game-feedback, .game-reveal:not(button) { background: #f0f3ea; border-radius: 7px; padding: 14px 16px; margin-top: 16px; }
.game-feedback > :first-child, .game-reveal > :first-child { margin-top: 0; }
.game-feedback p + p, .game-feedback strong + p { margin-top: 5px; }
.game-feedback[data-result=wrong] { background: #f6ede4; }
.game-caption { display: block; margin-bottom: 4px; color: var(--accent); font: 600 11px/1.5 var(--mono); letter-spacing: .07em; text-transform: uppercase; }
.game-feedback p.game-meaning { font-size: 18px; color: var(--ink); }
.game-source { display: block; width: fit-content; margin-top: 10px; color: var(--accent); font-size: 13px; text-decoration: underline; text-underline-offset: 3px; }
.game-source:hover { text-decoration-thickness: 2px; }
.game-example-label { margin-top: 17px; padding-top: 12px; border-top: 1px solid #d1dac8; }
.recall-fields { display: grid; gap: 8px; margin-top: 19px; }
.recall-row { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; gap: 11px; align-items: center; }
.recall-row .game-input { width: 100%; }
.recall-letter { display: grid; place-items: center; height: 38px; width: 36px; background: #e8edde; color: #35523c; border-radius: 5px; font: 400 24px/1 var(--serif); }
.recall-row[data-result] { padding: 9px 0; border-top: 1px solid var(--rule); }
.recall-row[data-result=wrong] .recall-letter { background: #f4e7de; color: #7a4a35; }
.recall-feedback { color: var(--text); font-size: 13px; }
.game-page .recall-meaning { min-height: 38px; padding: 4px 0; border: 0; background: transparent; color: var(--accent); font-size: 14px; text-decoration: underline; text-underline-offset: 3px; }
#game-aside p.recall-mnemonic { color: var(--ink); font: 400 clamp(32px, 3.4vw, 47px)/1.15 var(--serif); letter-spacing: .035em; }
.game-next { margin-top: 14px; }
.game-review-title { font-size: 23px; }
.game-review-list { margin: 8px 0 0; padding: 0; list-style: none; }
.game-review-list li { padding: 10px 0; border-top: 1px solid var(--rule); }
.game-review-list strong { display: block; margin-top: 4px; color: var(--accent); }
.game-aside-title { margin: 0 0 10px; font: 400 26px/1.18 var(--serif); letter-spacing: -.04em; }
.game-stats, .game-list { margin: 12px 0 0; padding: 0; }
.game-stats > div { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; padding: 8px 0; border-top: 1px solid #cbd3c3; }
.game-stats dt { color: var(--text); font-size: 14px; }
.game-stats dd { margin: 0; font: 600 16px/1.3 var(--mono); }
#game-aside:has(.game-stats) { --heading-color: #fffdf4; background: #2e493f; color: #fffdf4; border-color: #2e493f; }
#game-aside:has(.game-stats) dt { color: #e3e9dc; }
#game-aside:has(.game-stats) .game-stats > div { border-color: #5b7164; }
.game-list { list-style: none; }
.game-list button { width: 100%; padding: 8px 10px; min-height: 40px; border: 1px solid transparent; border-bottom-color: #cbd3c3; background: transparent; text-align: left; }
.game-list button:hover, .game-list button[aria-current=true] { background: #dfe7d6; border-radius: 5px; }
.game-list button[aria-current=true] { border-color: #859c7c; font-weight: 650; }
.alphabet #game-aside .game-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(75px, 1fr)); gap: 5px; }
.alphabet #game-aside .game-list button { overflow-wrap: anywhere; text-align: center; padding: 7px 3px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; border: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
@media (max-width: 700px) {
  .game-workspace { grid-template-columns: 1fr; gap: 12px; }
  #game-panel, #game-aside { padding: 19px; }
  .game-specimen { margin: 9px 0 14px; }
}
@media (max-width: 400px) {
  .recall-row { grid-template-columns: 32px minmax(0, 1fr); gap: 5px 10px; }
  .recall-letter { width: 32px; }
  .recall-meaning { grid-column: 2; justify-self: start; }
  .game-choices { grid-template-columns: 1fr; }
  .game-answer-form { align-items: stretch; }
  .game-answer-form .game-input { flex-basis: 100%; }
}
