:root {
  color-scheme: light;
  --cream: #fff9f3;
  --ink: #35211d;
  --tomato: #e63f2b;
  --yellow: #fff0b0;
  --sage: #e0eadb;
  font-family:
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    sans-serif;
  color: var(--ink);
  background: var(--cream);
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button {
  font: inherit;
  color: inherit;
  border: 2px solid var(--ink);
  border-radius: 14px;
  background: #fffdf8;
  padding: 12px 16px;
  font-weight: 650;
  cursor: pointer;
  min-height: 46px;
  touch-action: manipulation;
}
button:disabled {
  opacity: 0.45;
  cursor: default;
}
button:focus-visible,
a:focus-visible {
  outline: 3px solid #376baa;
  outline-offset: 3px;
}
button.primary {
  background: var(--tomato);
  color: white;
  border-color: var(--tomato);
  box-shadow: 0 4px 0 #ad2a1c;
}
.icon-button {
  font-size: 26px;
  border: 0;
  background: transparent;
  padding: 4px 12px;
}
h1,
h2,
p {
  margin: 0;
}
h1 {
  font-size: 26px;
  letter-spacing: -0.6px;
}
h2 {
  font-size: 25px;
  line-height: 1.15;
  letter-spacing: -0.5px;
}
p {
  line-height: 1.45;
}
.feed {
  height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.feed-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 20px 10px;
  gap: 10px;
}
.feed-header p {
  font-size: 13px;
  margin-top: 4px;
  max-width: 280px;
}
#deck {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  scroll-snap-type: y mandatory;
  scrollbar-width: none;
}
#deck::-webkit-scrollbar {
  display: none;
}
.activity-frame {
  height: 100%;
  scroll-snap-align: start;
  scroll-snap-stop: always;
}
.activity-frame iframe {
  display: block;
  border: 0;
  width: 100%;
  height: 100%;
  background: var(--cream);
}
.feed-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 16px 10px;
  gap: 10px;
  font-size: 12px;
}
.feed-footer button {
  min-width: 44px;
  min-height: 38px;
  padding: 4px 10px;
  font-size: 22px;
}
.load-error {
  position: fixed;
  inset: 100px 20px auto;
  text-align: center;
  padding: 24px;
  border: 2px solid var(--ink);
  border-radius: 16px;
  background: var(--cream);
}
.load-error button {
  margin-top: 16px;
}
[hidden] {
  display: none !important;
}
.activity {
  min-height: 100dvh;
  padding: 16px 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.activity .eyebrow {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  display: flex;
  justify-content: space-between;
}
.activity .prompt {
  font-size: 17px;
}
.panel {
  background: var(--yellow);
  border: 2px solid var(--ink);
  border-radius: 20px;
  padding: 18px;
}
.answer {
  min-height: 100px;
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
  gap: 8px;
}
.answer:empty:before {
  content: "Your sentence goes here";
  opacity: 0.55;
  font-size: 16px;
  align-self: center;
}
.tiles {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  min-height: 100px;
  align-content: flex-start;
}
.tiles button,
.answer button {
  font-size: 17px;
  padding: 10px 14px;
  border-radius: 12px;
  min-height: 46px;
  box-shadow: 0 3px 0 #c5b7aa;
}
.tiles button.used {
  visibility: hidden;
}
.activity .actions {
  margin-top: auto;
  display: flex;
  gap: 10px;
}
.activity .actions > button {
  flex: 1;
}
.feedback {
  min-height: 48px;
  font-size: 15px;
  line-height: 1.4;
}
.feedback.correct {
  color: #276039;
}
.game-board {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.memory-card {
  min-height: 105px;
  display: grid;
  place-items: center;
  padding: 12px;
  font-size: 15px;
  background: #fffaf0;
  transition:
    transform 0.18s,
    background 0.18s;
}
.memory-card .face {
  display: none;
}
.memory-card.revealed .face,
.memory-card.matched .face {
  display: block;
}
.memory-card.revealed .back,
.memory-card.matched .back {
  display: none;
}
.memory-card.matched {
  background: #c6e3c1;
  border-color: #47713e;
}
.memory-card .back {
  font-size: 34px;
  font-weight: 400;
}
.pairs {
  background: var(--sage);
}
.standalone-link {
  font-size: 12px;
  color: inherit;
  align-self: center;
}
.complete {
  font-size: 20px;
  font-weight: 700;
}
.sentence-result {
  font-size: 21px;
  font-weight: 650;
  line-height: 1.5;
}
.hint {
  font-size: 14px;
  opacity: 0.8;
}
@media (max-height: 580px) {
  .activity {
    gap: 12px;
    padding: 12px 16px;
  }
  h2 {
    font-size: 22px;
  }
  .memory-card {
    min-height: 80px;
    font-size: 13px;
  }
  .panel {
    padding: 12px;
  }
  .answer {
    min-height: 82px;
  }
  .tiles {
    min-height: 82px;
  }
  .feed-header {
    padding: 10px 16px 6px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
