:root {
  color-scheme: light;
  --ink: #174e47;
  --muted: #718783;
  --cream: #fffdf7;
  --paper: #f8f3e7;
  --line: #ded5b9;
  --green: #4da47e;
  --green-dark: #28775d;
  --mint: #e8f5ec;
  --coral: #e36d5d;
  --coral-soft: #fff0ec;
  --mustard: #efb43a;
  --mustard-soft: #fff5d8;
  --blue: #65b7c7;
  --blue-soft: #e8f6f8;
  --shadow: 0 12px 0 rgba(116, 99, 50, .14), 0 24px 45px rgba(47, 79, 70, .1);
  font-family: "Trebuchet MS", "Arial Rounded MT Bold", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  background:
    radial-gradient(circle at 10% 8%, rgba(239, 180, 58, .17), transparent 25rem),
    radial-gradient(circle at 91% 22%, rgba(101, 183, 199, .16), transparent 31rem),
    #f9f6ea;
}

button {
  font: inherit;
}

button:focus-visible {
  outline: 4px solid rgba(239, 180, 58, .55);
  outline-offset: 3px;
}

.page-pattern {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: .5;
  background-image: radial-gradient(rgba(23, 78, 71, .08) 1.5px, transparent 1.5px);
  background-size: 22px 22px;
}

.app {
  width: min(1120px, calc(100% - 32px));
  min-height: 100vh;
  margin: 0 auto;
  padding: 18px 0 56px;
}

.topbar {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
}

.brand,
.collection-button,
.sound-button,
.back-button {
  border: 0;
  color: var(--ink);
  cursor: pointer;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  padding: 0;
  text-align: left;
  background: transparent;
}

.brand-mark {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  font-size: 26px;
  border: 3px solid #b8ddd3;
  border-radius: 17px;
  background: #f6fff9;
  box-shadow: 0 5px 0 rgba(40, 119, 93, .15);
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 21px;
  line-height: 1.12;
}

.brand small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.collection-button,
.sound-button,
.back-button {
  min-height: 48px;
  border: 2px solid var(--line);
  border-radius: 15px;
  background: rgba(255, 253, 247, .94);
  box-shadow: 0 4px 0 rgba(116, 99, 50, .12);
  font-weight: 800;
}

.collection-button {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
}

.collection-button b {
  min-width: 44px;
  padding: 5px 8px;
  border-radius: 99px;
  color: var(--green-dark);
  background: var(--mint);
  font-size: 12px;
}

.sound-button {
  padding: 8px 14px;
}

.back-button {
  width: 48px;
  padding: 0;
  font-size: 24px;
}

.collection-button:hover,
.sound-button:hover,
.back-button:hover {
  border-color: #adccbd;
  background: #fff;
}

.hero,
.game-shell,
.result-card,
.collection-shell,
.qa-report {
  border: 3px solid var(--line);
  border-radius: 34px;
  background: rgba(255, 253, 247, .97);
  box-shadow: var(--shadow);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(390px, .92fr);
  align-items: center;
  gap: 42px;
  padding: 54px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--green-dark);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.hero h1,
.progress-heading h1,
.result-card h1,
.collection-heading h1,
.qa-report h1 {
  margin: 0;
  color: var(--ink);
  line-height: 1.04;
  letter-spacing: -.035em;
}

.hero h1 {
  max-width: 590px;
  font-size: clamp(42px, 5vw, 64px);
}

.hero-copy > p:not(.eyebrow) {
  max-width: 620px;
  margin: 22px 0 0;
  color: var(--muted);
  font-size: 19px;
  font-weight: 600;
  line-height: 1.55;
}

.hero-picture {
  margin: 0;
  border: 10px solid #fff;
  border-radius: 30px;
  overflow: hidden;
  background: var(--blue-soft);
  box-shadow: 0 22px 38px rgba(37, 76, 66, .17);
}

.hero-picture img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
  object-fit: contain;
}

.hero-actions {
  display: flex;
  align-items: stretch;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 30px;
}

.primary-button,
.secondary-button,
.hint-button,
.route-start,
.timer-toggle,
.reset-button {
  min-height: 50px;
  border-radius: 16px;
  cursor: pointer;
  font-weight: 800;
}

.primary-button {
  padding: 13px 22px;
  border: 0;
  color: #fff;
  background: var(--green);
  box-shadow: 0 8px 0 var(--green-dark);
}

.primary-button:hover {
  background: #419b75;
}

.primary-button:active {
  box-shadow: 0 4px 0 var(--green-dark);
}

.secondary-button,
.hint-button,
.reset-button {
  padding: 11px 18px;
  border: 2px solid var(--line);
  color: var(--ink);
  background: var(--cream);
}

.secondary-button:hover {
  border-color: #adccbd;
}

.hint-button {
  border-color: #e5c36b;
  color: #75531b;
  background: var(--mustard-soft);
}

.hint-button:hover {
  border-color: var(--mustard);
}

.hint-button:disabled {
  opacity: .5;
  cursor: default;
}

.timer-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 310px;
  padding: 10px 15px;
  border: 2px solid var(--line);
  color: var(--ink);
  text-align: left;
  background: var(--cream);
}

.timer-toggle[aria-pressed="true"] {
  border-color: #9fcdbd;
  background: var(--mint);
}

.timer-toggle span:first-child {
  font-size: 25px;
}

.timer-toggle b,
.timer-toggle small {
  display: block;
}

.timer-toggle small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.25;
}

.how-section,
.routes-section {
  padding-top: 62px;
}

.how-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.how-grid article {
  position: relative;
  min-height: 172px;
  padding: 28px 26px 24px;
  border: 2px solid var(--line);
  border-radius: 25px;
  background: rgba(255, 253, 247, .9);
}

.how-grid article > b {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: #fff;
  background: var(--green);
}

.how-grid h2 {
  margin: 18px 0 7px;
  font-size: 22px;
}

.how-grid p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 22px;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(34px, 4vw, 48px);
  line-height: 1.05;
}

.section-heading > p {
  max-width: 420px;
  margin: 0 0 4px;
  color: var(--muted);
  font-weight: 700;
  line-height: 1.45;
  text-align: right;
}

.route-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.route-card {
  display: flex;
  flex-direction: column;
  min-height: 360px;
  padding: 27px;
  border: 3px solid var(--line);
  border-radius: 28px;
  background: var(--cream);
  box-shadow: 0 10px 0 rgba(116, 99, 50, .14);
}

.route-card:nth-child(1) {
  background: #fff4e7;
}

.route-card:nth-child(2) {
  background: #eef8f0;
}

.route-card:nth-child(3) {
  background: #eaf5f8;
}

.route-icon {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background: rgba(255, 255, 255, .78);
  font-size: 29px;
}

.route-card > small {
  margin-top: 21px;
  color: #8a6a35;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.route-card h3 {
  margin: 8px 0;
  font-size: 28px;
}

.route-card > p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.route-card footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: auto;
  padding-top: 22px;
}

.route-stars {
  color: var(--mustard);
  font-size: 22px;
  letter-spacing: 2px;
}

.route-record {
  margin-top: 8px !important;
  font-size: 13px;
  font-weight: 800;
}

.route-start {
  align-self: flex-start;
  margin-top: 16px;
  padding: 10px 20px;
  border: 2px solid var(--green-dark);
  color: #fff;
  background: var(--green-dark);
}

.route-start:hover {
  color: var(--green-dark);
  background: #fff;
}

.game-shell {
  padding: 42px;
}

.progress-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.progress-heading h1 {
  font-size: clamp(34px, 4.5vw, 54px);
}

.game-stats {
  display: flex;
  gap: 10px;
}

.game-stats span {
  min-width: 118px;
  padding: 12px 14px;
  border: 2px solid #cadfd4;
  border-radius: 18px;
  text-align: center;
  background: var(--mint);
}

.game-stats small,
.game-stats b {
  display: block;
}

.game-stats small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.game-stats b {
  margin-top: 4px;
  font-size: 20px;
}

.race-track {
  position: relative;
  height: 108px;
  margin-top: 28px;
  padding: 42px 36px 0;
  border: 3px solid #cce2d8;
  border-radius: 26px;
  overflow: hidden;
  background:
    linear-gradient(180deg, #dff3f4 0 50%, #bad998 50% 100%);
}

.track-line {
  height: 18px;
  border: 3px solid #fff;
  border-radius: 99px;
  overflow: hidden;
  background: #d8d4c9;
  box-shadow: inset 0 2px 5px rgba(0, 0, 0, .12);
}

.track-line span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--green), var(--mustard));
}

.race-car {
  position: absolute;
  top: 10px;
  z-index: 2;
  font-size: 42px;
  line-height: 1;
  transition: left .22s ease;
}

.start-flag,
.finish-flag {
  position: absolute;
  top: 42px;
  z-index: 3;
  font-size: 27px;
}

.start-flag {
  left: 8px;
  color: var(--green-dark);
}

.finish-flag {
  right: 7px;
}

.typing-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(270px, .6fr);
  gap: 18px;
  margin-top: 18px;
}

.typing-card,
.coach-card {
  border: 3px solid var(--line);
  border-radius: 28px;
  background: var(--cream);
}

.typing-card {
  position: relative;
  min-height: 286px;
  padding: 34px;
}

.task-label {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.target-word {
  display: flex;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 10px 2px;
  margin-top: 24px;
}

.target-word .word-token {
  display: inline-flex;
  flex-wrap: nowrap;
}

.target-word i {
  width: clamp(25px, 2.7vw, 34px);
  height: clamp(40px, 4.2vw, 50px);
  display: grid;
  place-items: center;
  border: 2px solid #d7d2c4;
  border-radius: 10px;
  color: #85918f;
  background: #f5f2e9;
  font-size: clamp(20px, 2.5vw, 28px);
  font-style: normal;
  font-weight: 900;
}

.target-word i.is-space {
  width: 22px;
  margin-inline: 2px;
  border-style: dashed;
  color: #a49d8b;
  background: #fffdf7;
}

.target-word i.is-done {
  border-color: #83c5a8;
  color: var(--green-dark);
  background: var(--mint);
}

.target-word i.is-next {
  border-color: var(--mustard);
  color: #704d12;
  background: var(--mustard-soft);
  box-shadow: 0 0 0 5px rgba(239, 180, 58, .16);
}

.typing-note {
  max-width: 680px;
  margin: 24px 132px 0 0;
  color: var(--muted);
  line-height: 1.5;
}

.current-letter {
  position: absolute;
  right: 26px;
  bottom: 24px;
  text-align: center;
}

.current-letter small {
  display: block;
  max-width: 112px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.15;
  text-transform: uppercase;
}

.current-letter b {
  min-width: 66px;
  height: 66px;
  display: grid;
  place-items: center;
  margin: 7px auto 0;
  padding-inline: 12px;
  border-radius: 20px;
  color: #704d12;
  background: var(--mustard-soft);
  font-size: clamp(16px, 2vw, 30px);
}

.coach-card {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 28px;
  background: #eff8f0;
}

.coach-icon {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 18px;
  background: #fff;
  font-size: 28px;
}

.coach-card h2 {
  margin: 0;
  font-size: 25px;
  line-height: 1.15;
}

.coach-card p:not(.eyebrow) {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.5;
}

.screen-keyboard {
  display: grid;
  gap: 8px;
  margin-top: 18px;
  padding: 21px;
  border: 3px solid #cadfd4;
  border-radius: 27px;
  background: #eff7f1;
}

.keyboard-row {
  display: flex;
  justify-content: center;
  gap: 7px;
}

.key {
  width: clamp(38px, 4.8vw, 52px);
  height: 52px;
  border: 2px solid #cad4cd;
  border-radius: 13px;
  color: var(--ink);
  background: #fff;
  box-shadow: 0 4px 0 #c7d3cb;
  cursor: pointer;
  font-size: 19px;
  font-weight: 900;
}

.key.is-space-key {
  width: min(310px, 44vw);
  min-width: 160px;
  font-size: 14px;
  letter-spacing: .08em;
}

.key.is-punctuation-key {
  width: 104px;
  min-width: 104px;
  font-size: 13px;
  letter-spacing: .02em;
}

.key:hover {
  border-color: var(--green);
  background: #f7fffa;
}

.key:active {
  box-shadow: 0 2px 0 #c7d3cb;
}

.key.is-next {
  border-color: #7bb79e;
  background: var(--mint);
}

.key.is-hint {
  border-color: var(--mustard);
  color: #704d12;
  background: #fff0b5;
  box-shadow: 0 0 0 5px rgba(239, 180, 58, .2);
}

.key.is-wrong {
  border-color: var(--coral);
  color: #9b3d33;
  background: var(--coral-soft);
}

.game-actions {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  margin-top: 18px;
}

.feedback-space {
  min-height: 0;
}

.feedback {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  min-height: 108px;
  margin-top: 18px;
  padding: 22px 24px;
  border: 3px solid;
  border-radius: 25px;
}

.feedback > span {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  border-radius: 17px;
  color: #fff;
  font-size: 28px;
  font-weight: 900;
}

.feedback strong {
  font-size: 21px;
}

.feedback p {
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.45;
}

.feedback.is-error {
  border-color: #e69a91;
  background: var(--coral-soft);
}

.feedback.is-error > span {
  background: var(--coral);
}

.feedback.is-hint {
  border-color: #e4c36d;
  background: var(--mustard-soft);
}

.feedback.is-hint > span {
  background: var(--mustard);
}

.feedback.is-success {
  border-color: #8fc4a9;
  background: var(--mint);
}

.feedback.is-success > span {
  background: var(--green);
}

.next-word-button {
  min-width: 205px;
}

.result-card {
  padding: 68px 56px;
  text-align: center;
}

.result-badge {
  width: 92px;
  height: 92px;
  display: grid;
  place-items: center;
  margin: 0 auto 22px;
  border-radius: 29px;
  background: var(--mint);
  font-size: 47px;
}

.result-card h1 {
  font-size: clamp(42px, 5.5vw, 66px);
}

.result-lead {
  max-width: 740px;
  margin: 18px auto 0;
  color: var(--muted);
  font-size: 19px;
  line-height: 1.5;
}

.result-stars {
  margin-top: 24px;
  color: var(--mustard);
  font-size: 49px;
  letter-spacing: 7px;
}

.result-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-top: 30px;
}

.result-stats article {
  padding: 22px 14px;
  border: 2px solid #cfe0d3;
  border-radius: 21px;
  background: #f1f7ec;
}

.result-stats b,
.result-stats span {
  display: block;
}

.result-stats b {
  font-size: 29px;
}

.result-stats span {
  margin-top: 5px;
  color: var(--muted);
  font-weight: 800;
}

.result-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 34px;
}

.collection-shell {
  padding: 46px;
}

.collection-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  margin-bottom: 28px;
}

.collection-heading h1 {
  font-size: clamp(39px, 5vw, 60px);
}

.collection-heading p:not(.eyebrow) {
  margin: 12px 0 0;
  color: var(--muted);
}

.collection-heading > b {
  min-width: 112px;
  padding: 18px;
  border-radius: 24px;
  color: var(--green-dark);
  background: var(--mint);
  font-size: 34px;
  text-align: center;
}

.collection-heading > b small {
  display: block;
  margin-top: 3px;
  font-size: 12px;
  text-transform: uppercase;
}

.word-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
}

.word-card {
  min-height: 112px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border: 2px solid #d7ddd2;
  border-radius: 20px;
  color: #85918f;
  background: #f1f2ec;
}

.word-card > span {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 13px;
  background: #dde2da;
  font-size: 20px;
  font-weight: 900;
}

.word-card small,
.word-card strong {
  display: block;
}

.word-card small {
  font-size: 11px;
}

.word-card strong {
  margin-top: 4px;
  font-size: 15px;
  overflow-wrap: anywhere;
}

.word-card.is-open {
  border-color: #9bcbb2;
  color: var(--ink);
  background: var(--mint);
}

.word-card.is-open > span {
  color: #fff;
  background: var(--green);
}

.collection-actions {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  margin-top: 28px;
}

.reset-button {
  border-color: #e7b0a9;
  color: #9b3d33;
  background: var(--coral-soft);
}

.qa-report {
  margin-top: 60px;
  padding: 46px;
}

.qa-report h1 {
  font-size: 46px;
}

.qa-summary {
  font-size: 20px;
  font-weight: 800;
}

.qa-report ul {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 9px;
  padding: 0;
  list-style: none;
}

.qa-report li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 3px 9px;
  padding: 12px;
  border-radius: 14px;
  background: #f0f4ec;
}

.qa-report li > span {
  grid-row: 1 / span 2;
  font-size: 20px;
  font-weight: 900;
}

.qa-report li.failed {
  color: #9b3d33;
  background: var(--coral-soft);
}

.qa-report li small {
  color: var(--muted);
}

.qa-actions {
  display: flex;
  gap: 14px;
  margin-top: 24px;
}

@media (max-width: 1024px) {
  .hero {
    grid-template-columns: 1fr 360px;
    gap: 28px;
    padding: 38px;
  }

  .hero h1 {
    font-size: 47px;
  }

  .route-card {
    padding: 23px;
  }

  .game-shell {
    padding: 30px;
  }

  .typing-layout {
    grid-template-columns: 1fr;
  }

  .coach-card {
    min-height: 150px;
  }

  .key {
    width: clamp(34px, 5.9vw, 49px);
  }

  .word-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 768px) {
  .app {
    width: min(100% - 22px, 1120px);
    padding-top: 10px;
  }

  .topbar {
    align-items: flex-start;
  }

  .brand small,
  .collection-button > span:nth-child(2),
  .sound-button > span:last-child {
    display: none;
  }

  .collection-button {
    min-width: 84px;
    justify-content: center;
  }

  .hero {
    grid-template-columns: 1fr;
    padding: 29px;
  }

  .hero-picture {
    grid-row: 1;
    width: min(100%, 480px);
    justify-self: center;
  }

  .hero h1 {
    font-size: clamp(39px, 10vw, 55px);
  }

  .how-grid,
  .route-grid {
    grid-template-columns: 1fr;
  }

  .how-grid article {
    min-height: 0;
  }

  .section-heading {
    display: block;
  }

  .section-heading > p {
    margin-top: 12px;
    text-align: left;
  }

  .route-card {
    min-height: 315px;
  }

  .progress-heading {
    display: block;
  }

  .game-stats {
    margin-top: 18px;
  }

  .game-stats span {
    flex: 1;
  }

  .screen-keyboard {
    gap: 6px;
    padding: 13px 7px;
  }

  .keyboard-row {
    gap: 4px;
  }

  .key {
    width: clamp(25px, 6.9vw, 43px);
    height: 46px;
    border-radius: 10px;
    font-size: 16px;
  }

  .feedback {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .next-word-button {
    grid-column: 1 / -1;
    width: 100%;
  }

  .result-stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .word-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .qa-report ul {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .app {
    width: min(100% - 16px, 1120px);
  }

  .topbar {
    gap: 8px;
  }

  .brand {
    gap: 8px;
  }

  .brand-mark {
    width: 46px;
    height: 46px;
    font-size: 22px;
  }

  .brand strong {
    max-width: 135px;
    font-size: 17px;
  }

  .topbar-actions {
    gap: 6px;
  }

  .collection-button,
  .sound-button,
  .back-button {
    min-height: 44px;
    padding: 6px 9px;
  }

  .collection-button {
    min-width: 62px;
  }

  .collection-button b {
    min-width: 0;
    padding: 4px 6px;
  }

  .sound-button {
    width: 44px;
  }

  .back-button {
    width: 44px;
  }

  .hero,
  .game-shell,
  .result-card,
  .collection-shell,
  .qa-report {
    border-radius: 26px;
  }

  .hero {
    padding: 20px;
  }

  .hero h1 {
    font-size: 39px;
  }

  .hero-copy > p:not(.eyebrow) {
    font-size: 17px;
  }

  .hero-actions,
  .timer-toggle {
    width: 100%;
  }

  .primary-button {
    width: 100%;
  }

  .how-section,
  .routes-section {
    padding-top: 45px;
  }

  .route-card {
    min-height: 0;
  }

  .game-shell {
    padding: 18px;
  }

  .progress-heading h1 {
    font-size: 37px;
  }

  .game-stats span {
    min-width: 0;
    padding: 10px 7px;
  }

  .game-stats b {
    font-size: 17px;
  }

  .race-track {
    height: 96px;
    padding-inline: 27px;
  }

  .typing-card {
    min-height: 260px;
    padding: 24px 18px;
  }

  .target-word {
    gap: 4px;
  }

  .target-word i {
    width: 24px;
    height: 42px;
    border-radius: 9px;
    font-size: 19px;
  }

  .target-word i.is-space {
    width: 16px;
    margin-inline: 1px;
  }

  .typing-note {
    margin-right: 0;
    padding-bottom: 76px;
  }

  .current-letter {
    right: 18px;
    bottom: 17px;
  }

  .coach-card {
    display: block;
    padding: 22px;
  }

  .coach-card > div {
    margin-top: 14px;
  }

  .screen-keyboard {
    overflow: visible;
    padding: 14px 8px;
  }

  .keyboard-row {
    max-width: 292px;
    margin-inline: auto;
    flex-wrap: wrap;
    gap: 4px;
  }

  .key {
    flex: 0 0 44px;
    width: 44px;
    min-width: 44px;
    max-width: 44px;
    height: 44px;
    padding: 0;
    font-size: 14px;
  }

  .key.is-space-key {
    flex-basis: 176px;
    width: 176px;
    min-width: 176px;
    max-width: 176px;
  }

  .key.is-punctuation-key {
    flex-basis: 88px;
    width: 88px;
    min-width: 88px;
    max-width: 88px;
    font-size: 11px;
  }

  .game-actions,
  .collection-actions {
    flex-direction: column;
  }

  .game-actions > button,
  .collection-actions > button {
    width: 100%;
  }

  .feedback {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .feedback > span {
    margin: 0 auto;
  }

  .result-card {
    padding: 43px 18px;
  }

  .result-card h1 {
    font-size: 42px;
  }

  .result-stats {
    gap: 8px;
  }

  .result-stats article {
    padding: 17px 8px;
  }

  .collection-shell,
  .qa-report {
    padding: 23px 17px;
  }

  .collection-heading {
    align-items: flex-start;
  }

  .collection-heading > b {
    min-width: 82px;
  }

  .word-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .word-card {
    min-height: 96px;
    padding: 10px;
  }

  .qa-actions {
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
  }
}
