:root {
  color-scheme: light;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #15231a;
  background: #f4f7f1;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* {
  box-sizing: border-box;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
}

a {
  color: inherit;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  max-width: 1120px;
  margin: 0 auto;
  padding: 1.25rem 1.5rem;
}

.brand {
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  text-decoration: none;
}

.header-note {
  margin: 0;
  color: #536259;
  font-size: 0.9rem;
}

.page {
  width: min(100% - 3rem, 1040px);
  margin: 0 auto;
  padding: clamp(3rem, 10vh, 7rem) 0 2.5rem;
}

.welcome {
  max-width: 680px;
  margin-bottom: 2.5rem;
}

.eyebrow,
.game-tag {
  color: #386447;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.12em;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  max-width: 620px;
  margin-bottom: 1rem;
  font-size: clamp(2.4rem, 6vw, 4.6rem);
  letter-spacing: -0.065em;
  line-height: 1.02;
}

.intro {
  max-width: 560px;
  margin-bottom: 0;
  color: #536259;
  font-size: 1.1rem;
  line-height: 1.6;
}

.game-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
}

.game-card {
  display: flex;
  min-height: 290px;
  flex-direction: column;
  align-items: flex-start;
  padding: clamp(1.4rem, 4vw, 2rem);
  border: 1px solid #dce5da;
  border-radius: 1.2rem;
  background: #fff;
  text-decoration: none;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.game-card:hover,
.game-card:focus-visible {
  transform: translateY(-3px);
  border-color: #8bbf96;
  box-shadow: 0 1rem 2.5rem #20392814;
}

.game-card:focus-visible,
.brand:focus-visible,
.home-link:focus-visible {
  outline: 3px solid #22663a;
  outline-offset: 4px;
}

.game-icon {
  margin-bottom: 1.1rem;
  font-size: 2.5rem;
  line-height: 1;
}

.game-tag {
  margin-bottom: 0.55rem;
  font-size: 0.67rem;
}

.game-card h2 {
  margin-bottom: 0.6rem;
  font-size: 1.65rem;
  letter-spacing: -0.04em;
}

.game-card p {
  max-width: 38ch;
  margin-bottom: 1.5rem;
  color: #536259;
  line-height: 1.55;
}

.card-action {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  color: #22663a;
  font-weight: 750;
}

.privacy-note {
  margin: 1.5rem 0 0;
  color: #647168;
  font-size: 0.84rem;
  line-height: 1.5;
}

.game-page {
  display: flex;
  min-height: 100vh;
  flex-direction: column;
  padding: 1rem clamp(1rem, 4vw, 3rem) 2rem;
  background: #f4f7f1;
}

.game-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: min(100%, 1000px);
  margin: 0 auto;
}

.home-link {
  color: #315840;
  font-size: 0.95rem;
  font-weight: 700;
  text-decoration: none;
}

.game-name {
  margin: 0;
  color: #647168;
  font-size: 0.9rem;
}

.simon-content {
  display: grid;
  width: min(100%, 820px);
  flex: 1;
  align-content: center;
  gap: 1.5rem;
  margin: 0 auto;
  padding: 2rem 0;
}

.simon-heading {
  margin: 0;
  font-size: clamp(2.3rem, 7vw, 4.2rem);
  letter-spacing: -0.07em;
  line-height: 1;
  text-align: center;
}

.simon-instructions {
  margin: 0;
  color: #536259;
  font-size: 1.05rem;
  line-height: 1.6;
  text-align: center;
}

.command-card {
  display: grid;
  min-height: 280px;
  align-content: center;
  justify-items: center;
  gap: 1rem;
  padding: clamp(1.5rem, 6vw, 3.5rem);
  border: 1px solid #dce5da;
  border-radius: 1.5rem;
  background: #fff;
  box-shadow: 0 1rem 2.5rem #2039280c;
  text-align: center;
}

.prompt-prefix {
  min-height: 1.5rem;
  color: #22663a;
  font-size: 0.95rem;
  font-weight: 850;
  letter-spacing: 0.16em;
}

.prompt-prefix.is-trick {
  color: #ab4e2b;
}

.english-command {
  margin: 0;
  font-size: clamp(2rem, 7vw, 4rem);
  letter-spacing: -0.055em;
  line-height: 1.1;
}

.german-command {
  margin: 0;
  color: #536259;
  font-size: 1.15rem;
}

.simon-controls {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
}

.game-button {
  min-height: 48px;
  padding: 0.75rem 1.2rem;
  border: 1px solid #cbd7cb;
  border-radius: 0.75rem;
  background: #fff;
  color: #183b24;
  font: inherit;
  font-weight: 750;
  cursor: pointer;
}

.game-button:hover {
  background: #edf5ed;
}

.game-button:focus-visible {
  outline: 3px solid #22663a;
  outline-offset: 3px;
}

.game-button.primary {
  border-color: #22663a;
  background: #22663a;
  color: #fff;
}

.game-button.primary:hover {
  background: #174b29;
}

.round-count {
  margin: 0;
  color: #647168;
  font-size: 0.88rem;
  text-align: center;
}

@media (max-width: 640px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.25rem;
    padding-inline: 1rem;
  }

  .page {
    width: min(100% - 2rem, 1040px);
    padding-top: 3.5rem;
  }

  .game-grid {
    grid-template-columns: 1fr;
  }

  .game-card {
    min-height: 250px;
  }

  .game-name {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
