:root {
  color: #18221c;
  background: #e8efe5;
  font-family: Georgia, "Times New Roman", serif;
}

* {
  box-sizing: border-box;
}

html {
  height: 100%;
  overflow: hidden;
}

body {
  margin: 0;
  min-width: 320px;
  height: 100dvh;
  overflow: hidden;
}

button {
  font: inherit;
}

.game-shell {
  width: min(100% - 2rem, 68rem);
  height: 100%;
  margin: 0 auto;
  padding: clamp(0.75rem, 3vh, 3rem) 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.eyebrow {
  margin: 0;
  color: #8d3d20;
  font-family: "Trebuchet MS", sans-serif;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0.35rem 0 1.5rem;
}

.status-view,
#game-view {
  padding: clamp(0.5rem, 1.5vh, 1.5rem) 0 0;
}

#game-view {
  display: grid;
  flex: 1;
  min-height: 0;
  grid-template-columns: minmax(0, 1fr) minmax(11rem, 13rem);
  grid-template-rows: auto auto auto auto auto minmax(0, 1fr);
  column-gap: 1.25rem;
}

#game-view[hidden] {
  display: none;
}

.game-header {
  border-bottom: 1px solid #b8c6b7;
}

.game-meta {
  display: flex;
  grid-column: 1 / -1;
  justify-content: space-between;
  gap: 1rem;
  color: #425246;
  font-family: "Trebuchet MS", sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
}

.game-meta p {
  margin: 0;
}

#round-prompt {
  grid-column: 1 / -1;
  margin: 0.5rem 0;
}

.choices {
  display: grid;
  grid-column: 1;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  align-items: start;
  min-height: 0;
  margin: 0.5rem 0;
}

.keyboard-shortcuts {
  align-self: start;
  grid-column: 2;
  margin: 0.5rem 0;
  padding: 1rem;
  color: #425246;
  background: #f7f2e8;
  border: 1px solid #b8c6b7;
  border-radius: 6px;
  font-family: "Trebuchet MS", sans-serif;
}

.keyboard-shortcuts p {
  margin: 0.65rem 0 0;
}

.keyboard-shortcuts .keyboard-shortcuts-title {
  margin-top: 0;
  color: #18221c;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

kbd {
  display: inline-block;
  min-width: 1.8rem;
  padding: 0.12rem 0.35rem;
  color: #18221c;
  background: #fffdf7;
  border: 1px solid #8d3d20;
  border-bottom-width: 2px;
  border-radius: 3px;
  font-family: "Trebuchet MS", sans-serif;
  font-size: 0.85em;
  font-weight: 700;
  text-align: center;
}

.choice {
  position: relative;
  display: grid;
  min-height: 0;
  grid-template-rows: auto auto;
  gap: 0.75rem;
  overflow: hidden;
  padding: 0;
  color: inherit;
  background: #fffdf7;
  border: 2px solid #b8c6b7;
  border-radius: 6px;
  cursor: pointer;
  text-align: left;
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease;
}

.choice:not(:disabled):hover,
.choice:not(:disabled):focus-visible {
  border-color: #8d3d20;
  box-shadow: 5px 5px 0 #e8b15a;
  outline: none;
  transform: translate(-2px, -2px);
}

.choice:disabled {
  cursor: default;
}

.choice img {
  display: block;
  width: 100%;
  aspect-ratio: 6 / 5;
  height: auto;
  object-fit: cover;
  object-position: top;
}

.choice.is-newsletter-round img {
  object-position: top;
}

.choice.is-newsletter-round:disabled img {
  object-fit: contain;
  object-position: center;
}

.choice-label {
  padding: 0 1rem 1rem;
  font-family: "Trebuchet MS", sans-serif;
  font-weight: 700;
}

.choice.is-selected {
  border-color: #275d77;
}

.choice.is-correct {
  border-color: #2e6d42;
  background: #e3f3df;
  box-shadow: inset 0 -5px #84bd71;
}

.choice.is-incorrect {
  border-color: #a33434;
  background: #fce8e8;
  box-shadow: inset 0 -5px #dc7474;
}

.result {
  grid-column: 1;
  min-height: 1.5rem;
  margin: 0.25rem 0;
  font-weight: 700;
  text-align: center;
}

.action-button,
#advance-button {
  padding: 0.7rem 1rem;
  color: #fffdf7;
  background: #8d3d20;
  border: 2px solid #8d3d20;
  border-radius: 4px;
  cursor: pointer;
  font-family: "Trebuchet MS", sans-serif;
  font-weight: 700;
}

#advance-button {
  grid-column: 1;
  justify-self: center;
  width: fit-content;
}

.action-button:hover,
.action-button:focus-visible,
#advance-button:hover,
#advance-button:focus-visible {
  color: #18221c;
  background: #e8b15a;
  border-color: #18221c;
  outline: none;
}

#complete-view {
  display: grid;
  flex: 1;
  min-height: 0;
  align-content: center;
  justify-items: center;
  text-align: center;
}

#complete-view[hidden] {
  display: none;
}

#complete-view h2 {
  margin-bottom: 1rem;
}

.completion-kicker {
  margin: 0;
  color: #8d3d20;
  font-family: "Trebuchet MS", sans-serif;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.final-score {
  margin: 0.25rem 0;
  color: #2e6d42;
  font-family: "Trebuchet MS", sans-serif;
  font-size: 4.5rem;
  font-weight: 700;
  line-height: 1;
}

#completion-summary {
  margin: 0.5rem 0 1.5rem;
}

.reload-game {
  margin: 0;
  color: #425246;
  font-family: "Trebuchet MS", sans-serif;
}

@media (max-width: 760px) {
  .game-shell {
    width: min(100% - 1rem, 68rem);
  }

  #game-view {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto auto auto auto auto minmax(0, 1fr);
    column-gap: 0;
  }

  .game-meta,
  #round-prompt,
  .result,
  #advance-button {
    grid-column: auto;
  }

  .choices,
  .keyboard-shortcuts {
    grid-column: auto;
  }

  .keyboard-shortcuts {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
    padding: 0.65rem 0;
    background: transparent;
    border-width: 1px 0;
    border-radius: 0;
  }

  .keyboard-shortcuts p {
    margin: 0;
  }

  .keyboard-shortcuts .keyboard-shortcuts-title {
    width: 100%;
  }
}
