/* Evan's Daily Brain Playground
   Large, calm touch targets for iPad first; mint green + warm yellow. */

.game-hero,
.game-view-shell {
  --game-green: #276b5b;
  --game-green-deep: #174e43;
  --game-green-bright: #3e987a;
  --game-mint: #e7f6ef;
  --game-mint-strong: #c9eadb;
  --game-yellow: #ffd66b;
  --game-yellow-soft: #fff6d7;
  --game-orange: #f3a85e;
  --game-red: #d96b5f;
  --game-blue: #66a4c8;
  --game-ink: #293f38;
  --game-muted: #647970;
  --game-line: #dce8e2;
  --game-shadow: 0 12px 32px rgba(38, 89, 73, .11);
}

.game-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 28px;
  align-items: center;
  min-height: 218px;
  padding: 32px 36px;
  overflow: hidden;
  border-radius: 26px;
  background:
    radial-gradient(circle at 84% 14%, rgba(255, 214, 107, .42), transparent 29%),
    linear-gradient(125deg, var(--game-green-deep), var(--game-green) 56%, #3d9277);
  color: #fff;
  box-shadow: 0 18px 42px rgba(31, 84, 68, .2);
}

.game-hero::before,
.game-hero::after {
  content: '';
  position: absolute;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 50%;
  pointer-events: none;
}

.game-hero::before {
  right: 92px;
  top: -92px;
  width: 310px;
  height: 310px;
}

.game-hero::after {
  right: 16px;
  bottom: -128px;
  width: 255px;
  height: 255px;
}

.game-hero-copy {
  position: relative;
  z-index: 1;
  min-width: 0;
}

.game-hero-copy > small,
.game-hero-copy > span:first-child {
  display: block;
  margin-bottom: 8px;
  color: #bdebdc;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 1.8px;
  text-transform: uppercase;
}

.game-hero-copy h2 {
  margin: 0 0 10px;
  font-size: clamp(28px, 3vw, 38px);
  line-height: 1.25;
}

.game-hero-copy p {
  max-width: 680px;
  margin: 0;
  color: #dcf0e9;
  font-size: 15px;
  line-height: 1.75;
}

.game-hero-copy button,
.game-daily-card button,
.game-card button,
.game-workbench button,
.game-result button {
  min-height: 52px;
  padding: 0 20px;
  border: 0;
  border-radius: 15px;
  font-size: 15px;
  font-weight: 900;
  line-height: 1.25;
  cursor: pointer;
  touch-action: manipulation;
  transition: transform .16s ease, box-shadow .16s ease, background-color .16s ease;
}

.game-hero-copy button {
  margin-top: 21px;
  background: var(--game-yellow);
  color: #3d4e3e;
  box-shadow: 0 9px 20px rgba(17, 61, 49, .24);
}

.game-hero-art {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 190px;
  height: 154px;
  justify-self: end;
}

.game-hero-art > span,
.game-hero-art > b {
  display: grid;
  place-items: center;
  width: 104px;
  height: 104px;
  border: 4px solid rgba(255, 255, 255, .65);
  border-radius: 30px;
  background: var(--game-yellow);
  color: #365f52;
  font-size: 57px;
  box-shadow: 0 15px 30px rgba(15, 58, 47, .25);
  transform: rotate(6deg);
}

.game-hero-art > i,
.game-hero-art > em {
  position: absolute;
  display: grid;
  place-items: center;
  width: 47px;
  height: 47px;
  border-radius: 15px;
  background: #fff;
  color: var(--game-green);
  font-size: 24px;
  font-style: normal;
  box-shadow: 0 8px 18px rgba(15, 58, 47, .18);
}

.game-hero-art > i { left: 3px; bottom: 5px; transform: rotate(-8deg); }
.game-hero-art > em { right: 0; top: 0; transform: rotate(9deg); }

.game-stats {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  margin: -18px 24px 22px;
  overflow: hidden;
  border: 1px solid var(--game-line, #dce8e2);
  border-radius: 19px;
  background: var(--game-line, #dce8e2);
  box-shadow: 0 11px 27px rgba(36, 81, 67, .1);
}

.game-stats > div {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  grid-template-rows: auto auto;
  column-gap: 11px;
  align-items: center;
  min-height: 84px;
  padding: 15px 18px;
  background: #fff;
}

.game-stats > div > span {
  grid-row: 1 / 3;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: var(--game-mint, #e7f6ef);
  font-size: 24px;
}

.game-stats b,
.game-stats strong {
  overflow: hidden;
  color: var(--game-ink, #293f38);
  font-size: 20px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.game-stats small {
  margin-top: 3px;
  color: var(--game-muted, #647970);
  font-size: 13px;
}

.game-view-shell {
  display: grid;
  gap: 20px;
  min-width: 0;
}

.game-daily-card {
  position: relative;
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr) auto;
  gap: 17px;
  align-items: center;
  min-height: 152px;
  padding: 24px 26px;
  overflow: hidden;
  border: 2px solid #efd274;
  border-radius: 22px;
  background:
    radial-gradient(circle at 92% 5%, rgba(255, 214, 107, .37), transparent 27%),
    linear-gradient(145deg, #fffef9, var(--game-yellow-soft));
  box-shadow: var(--game-shadow);
}

.game-daily-card::after {
  content: 'TODAY';
  position: absolute;
  right: 22px;
  top: 10px;
  color: rgba(132, 98, 21, .08);
  font-size: 50px;
  font-weight: 1000;
  letter-spacing: 3px;
  pointer-events: none;
}

.game-daily-card > span:first-child {
  display: grid;
  place-items: center;
  width: 76px;
  height: 76px;
  border-radius: 22px;
  background: var(--game-yellow);
  font-size: 40px;
  box-shadow: 0 9px 20px rgba(134, 97, 17, .16);
}

.game-daily-card > div { position: relative; z-index: 1; min-width: 0; }
.game-daily-card small { color: #8a6b22; font-size: 13px; font-weight: 900; }
.game-daily-card h2,
.game-daily-card h3 { margin: 5px 0 7px; color: var(--game-ink); font-size: 23px; }
.game-daily-card p { margin: 0; color: #70664b; font-size: 14px; line-height: 1.65; }
.game-daily-card button { position: relative; z-index: 1; background: var(--game-green); color: #fff; box-shadow: 0 8px 17px rgba(39, 107, 91, .18); }

.game-lobby-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 17px;
}

.game-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 265px;
  padding: 22px;
  overflow: hidden;
  border: 1px solid var(--game-line);
  border-radius: 22px;
  background: #fff;
  color: var(--game-ink);
  box-shadow: 0 9px 24px rgba(40, 83, 70, .08);
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.game-card::before {
  content: '';
  position: absolute;
  inset: 0 0 auto;
  height: 6px;
  background: linear-gradient(90deg, var(--game-green-bright), var(--game-yellow));
}

.game-card:hover {
  border-color: #a7d1c0;
  box-shadow: 0 14px 31px rgba(40, 94, 75, .13);
  transform: translateY(-3px);
}

.game-card > span:first-child {
  display: grid;
  place-items: center;
  width: 62px;
  height: 62px;
  margin: 5px 0 13px;
  border-radius: 19px;
  background: linear-gradient(145deg, var(--game-mint), #fff7d9);
  font-size: 34px;
}

.game-card h3 { margin: 0 0 7px; font-size: 21px; line-height: 1.35; }
.game-card p { margin: 0; color: var(--game-muted); font-size: 14px; line-height: 1.65; }
.game-card small { display: block; margin-top: 10px; color: #4d8674; font-size: 13px; font-weight: 800; }
.game-card button { width: 100%; margin-top: auto; background: var(--game-mint); color: var(--game-green-deep); }
.game-card button:hover { background: var(--game-mint-strong); }
.game-card.complete { border-color: #93c8b1; background: linear-gradient(145deg, #fff 55%, var(--game-mint)); }
.game-card.locked { opacity: .68; filter: saturate(.6); }

.game-workbench {
  display: grid;
  gap: 18px;
  min-width: 0;
  padding: 22px;
  border: 1px solid var(--game-line);
  border-radius: 24px;
  background: #fff;
  box-shadow: var(--game-shadow);
}

.game-workbench-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-width: 0;
  padding-bottom: 17px;
  border-bottom: 1px solid var(--game-line);
}

.game-workbench-head > div { min-width: 0; }
.game-workbench-head small { color: var(--game-green-bright); font-size: 13px; font-weight: 900; letter-spacing: .7px; }
.game-workbench-head h2 { margin: 4px 0 3px; color: var(--game-ink); font-size: 25px; line-height: 1.35; }
.game-workbench-head p { margin: 0; color: var(--game-muted); font-size: 14px; line-height: 1.55; }
.game-workbench-head > button { flex: none; border: 1px solid #b9d5ca; background: #fff; color: var(--game-green); }

.game-stage {
  position: relative;
  display: grid;
  place-items: center;
  min-width: 0;
  min-height: 420px;
  padding: 26px;
  overflow: auto;
  border: 2px solid #dce9e3;
  border-radius: 22px;
  background:
    linear-gradient(rgba(39, 107, 91, .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(39, 107, 91, .035) 1px, transparent 1px),
    #f8fcfa;
  background-size: 24px 24px;
  -webkit-overflow-scrolling: touch;
}

.game-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  min-width: 0;
  padding: 13px 15px;
  border-radius: 17px;
  background: var(--game-mint);
}

.game-toolbar > div { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.game-toolbar span,
.game-toolbar small { color: var(--game-muted); font-size: 13px; font-weight: 800; }
.game-toolbar b,
.game-toolbar strong { color: var(--game-green-deep); font-size: 18px; }
.game-toolbar button { min-width: 52px; padding-inline: 16px; border: 1px solid #a9cdbf; background: #fff; color: var(--game-green); }
.game-toolbar button.primary { border-color: transparent; background: var(--game-green); color: #fff; }

/* Memory pairs */
.game-memory-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(74px, 112px));
  gap: 13px;
  justify-content: center;
  width: 100%;
  perspective: 1000px;
}

.game-memory-card {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 1 / 1;
  min-width: 74px;
  min-height: 74px;
  padding: 0;
  border: 3px solid #94c9b5;
  border-radius: 19px;
  background:
    radial-gradient(circle at 30% 24%, rgba(255, 255, 255, .32), transparent 27%),
    linear-gradient(145deg, var(--game-green-bright), var(--game-green));
  color: transparent;
  font-size: clamp(29px, 4vw, 44px);
  box-shadow: 0 7px 15px rgba(39, 107, 91, .14);
  transform-style: preserve-3d;
  transition: transform .36s cubic-bezier(.2, .75, .25, 1.2), background .2s ease, border-color .2s ease;
  cursor: pointer;
  touch-action: manipulation;
}

.game-memory-card::after {
  content: '?';
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #fff8da;
  font-size: 34px;
  font-weight: 1000;
  backface-visibility: hidden;
}

.game-memory-card.flipped,
.game-memory-card.open,
.game-memory-card[aria-pressed="true"] {
  border-color: #eac34d;
  background: #fff7d8;
  color: var(--game-ink);
  transform: rotateY(180deg);
}

.game-memory-card.flipped::after,
.game-memory-card.open::after,
.game-memory-card[aria-pressed="true"]::after { opacity: 0; }

.game-memory-card.matched {
  border-color: #57a982;
  background: #def3e7;
  color: var(--game-green-deep);
  transform: rotateY(180deg) scale(.94);
  box-shadow: 0 0 0 5px rgba(87, 169, 130, .12);
  cursor: default;
}

.game-memory-card:disabled { opacity: 1; }

/* Child-sized 4x4 Sudoku */
.game-sudoku-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(58px, 86px));
  grid-template-rows: repeat(4, minmax(58px, 86px));
  gap: 3px;
  padding: 6px;
  border: 4px solid var(--game-green-deep);
  border-radius: 17px;
  background: var(--game-green-deep);
  box-shadow: 0 10px 24px rgba(31, 83, 68, .16);
}

.game-sudoku-cell {
  position: relative;
  display: grid;
  place-items: center;
  min-width: 58px;
  min-height: 58px;
  padding: 0;
  border: 0;
  border-radius: 9px;
  background: #fff;
  color: var(--game-ink);
  font-size: clamp(23px, 3vw, 32px);
  font-weight: 900;
  cursor: pointer;
  touch-action: manipulation;
}

.game-sudoku-cell:nth-child(2),
.game-sudoku-cell:nth-child(6),
.game-sudoku-cell:nth-child(10),
.game-sudoku-cell:nth-child(14) { margin-right: 4px; }

.game-sudoku-cell:nth-child(n+5):nth-child(-n+8) { margin-bottom: 4px; }
.game-sudoku-cell.given { background: var(--game-mint); color: var(--game-green-deep); cursor: default; }
.game-sudoku-cell.selected,
.game-sudoku-cell[aria-selected="true"] { outline: 4px solid var(--game-yellow); outline-offset: -4px; background: #fffbea; }
.game-sudoku-cell.related { background: #eef8f3; }
.game-sudoku-cell.correct { background: #dff3e7; color: #216347; }
.game-sudoku-cell.wrong { background: #fff0eb; color: #a74f44; animation: game-shake .28s ease; }

.game-number-pad {
  display: grid;
  grid-template-columns: repeat(4, minmax(58px, 76px));
  gap: 10px;
  justify-content: center;
  margin-top: 18px;
}

.game-number-pad button {
  min-width: 58px;
  min-height: 58px;
  padding: 0;
  border: 2px solid #bad8cc;
  background: #fff;
  color: var(--game-green-deep);
  font-size: 22px;
}

.game-number-pad button:hover,
.game-number-pad button.active { border-color: var(--game-green-bright); background: var(--game-mint); }
.game-number-pad button:last-child{grid-column:1/-1;color:#7c5f22;background:var(--game-yellow-soft)}

/* Tap-to-walk maze */
.game-maze-grid {
  --maze-columns: 7;
  display: grid;
  grid-template-columns: repeat(var(--maze-columns), minmax(52px, 60px));
  gap: 3px;
  justify-content: center;
  padding: 7px;
  border: 3px solid var(--game-green-deep);
  border-radius: 18px;
  background: var(--game-green-deep);
  box-shadow: 0 10px 24px rgba(31, 83, 68, .15);
}

.game-maze-cell {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 1 / 1;
  min-width: 52px;
  min-height: 52px;
  border-radius: 9px;
  background: #fff;
  color: var(--game-green-deep);
  font-size: clamp(19px, 2.7vw, 28px);
  font-weight: 900;
}

.game-maze-cell.wall,
.game-maze-cell[data-cell="wall"] {
  background: linear-gradient(145deg, #2e705f, #1c5447);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .07);
}

.game-maze-cell.path { background: #fffdf4; }
.game-maze-cell.visited { background: #e6f5ed; }
.game-maze-cell.player { z-index: 1; background: var(--game-yellow); animation: game-player-pop .28s ease; }
.game-maze-cell.goal { background: #dff3e7; box-shadow: inset 0 0 0 3px #64ad89; }

.game-maze-controls {
  display: grid;
  grid-template-columns: repeat(3, 62px);
  grid-template-rows: repeat(2, 62px);
  gap: 9px;
  justify-content: center;
  margin-top: 19px;
}

.game-maze-controls button {
  display: grid;
  place-items: center;
  min-width: 62px;
  min-height: 62px;
  padding: 0;
  border: 2px solid #aed3c4;
  background: #fff;
  color: var(--game-green-deep);
  font-size: 25px;
  box-shadow: 0 5px 12px rgba(39, 107, 91, .08);
}

.game-maze-controls button:nth-child(1) { grid-column: 2; }
.game-maze-controls button:nth-child(2) { grid-column: 1; grid-row: 2; }
.game-maze-controls button:nth-child(3) { grid-column: 2; grid-row: 2; }
.game-maze-controls button:nth-child(4) { grid-column: 3; grid-row: 2; }
.game-maze-controls button:active { background: var(--game-yellow-soft); transform: scale(.94); }

/* Find the rule */
.game-pattern-card {
  width: min(100%, 760px);
  padding: 27px;
  border: 2px solid #d9e8e1;
  border-radius: 23px;
  background: #fff;
  text-align: center;
  box-shadow: 0 10px 27px rgba(39, 85, 70, .09);
}

.game-pattern-card > small { color: var(--game-green-bright); font-size: 13px; font-weight: 900; letter-spacing: 1px; }
.game-pattern-card h2,
.game-pattern-card h3 { margin: 6px 0 8px; color: var(--game-ink); font-size: 24px; }
.game-pattern-card p { margin: 0; color: var(--game-muted); font-size: 14px; line-height: 1.65; }
.game-pattern-card > div:first-of-type {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 11px;
  flex-wrap: wrap;
  min-height: 92px;
  margin: 22px 0;
  padding: 15px;
  border-radius: 18px;
  background: var(--game-yellow-soft);
  color: var(--game-ink);
  font-size: clamp(25px, 4vw, 38px);
  font-weight: 1000;
}

.game-pattern-options {
  display: grid;
  grid-template-columns: repeat(4, minmax(62px, 1fr));
  gap: 11px;
}

.game-pattern-options button {
  min-width: 62px;
  min-height: 62px;
  padding: 8px;
  border: 2px solid #c8dfd5;
  background: #fff;
  color: var(--game-ink);
  font-size: 21px;
}

.game-pattern-options button:hover,
.game-pattern-options button.selected { border-color: var(--game-green-bright); background: var(--game-mint); }
.game-pattern-options button.correct { border-color: #55a97f; background: #dff3e7; color: #245b3e; }
.game-pattern-options button.wrong { border-color: #dc8b78; background: #fff0eb; color: #8b493f; }

.game-result {
  position: relative;
  width: min(100%, 680px);
  margin: 0 auto;
  padding: 28px;
  overflow: hidden;
  border: 2px solid #8fc9af;
  border-radius: 24px;
  background:
    radial-gradient(circle at 90% 10%, rgba(255, 214, 107, .48), transparent 25%),
    linear-gradient(145deg, #fff, #eaf7f1);
  color: var(--game-ink);
  text-align: center;
  box-shadow: 0 14px 34px rgba(36, 93, 73, .13);
  animation: game-result-pop .38s cubic-bezier(.2, .9, .28, 1.35);
}

.game-result > span:first-child { display: block; font-size: 54px; }
.game-result h2,
.game-result h3 { margin: 8px 0 6px; font-size: 27px; }
.game-result p { margin: 0 auto 17px; max-width: 520px; color: var(--game-muted); font-size: 15px; line-height: 1.7; }
.game-result strong { color: var(--game-green); font-size: 29px; }
.game-result button { margin: 6px 4px 0; background: var(--game-green); color: #fff; }
.game-result button.secondary { border: 1px solid #b4d4c7; background: #fff; color: var(--game-green); }

.game-confetti {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.game-confetti > i,
.game-confetti > span {
  position: absolute;
  top: -18px;
  width: 10px;
  height: 17px;
  border-radius: 3px;
  background: var(--game-yellow);
  animation: game-confetti-fall 1.75s ease-in forwards;
}

.game-confetti > :nth-child(1) { left: 8%; animation-delay: .05s; transform: rotate(8deg); }
.game-confetti > :nth-child(2) { left: 20%; width: 13px; background: #57ae8c; animation-delay: .22s; }
.game-confetti > :nth-child(3) { left: 35%; background: #f29e5c; animation-delay: .12s; }
.game-confetti > :nth-child(4) { left: 52%; width: 14px; background: #70a9ca; animation-delay: .33s; }
.game-confetti > :nth-child(5) { left: 68%; background: #e66d67; animation-delay: .18s; }
.game-confetti > :nth-child(6) { left: 82%; width: 13px; background: #7dbb79; animation-delay: .28s; }
.game-confetti > :nth-child(7) { left: 93%; background: #f3c84d; animation-delay: .09s; }

.game-hero button:hover,
.game-daily-card button:hover,
.game-workbench button:hover,
.game-result button:hover { transform: translateY(-2px); }

.game-hero button:active,
.game-daily-card button:active,
.game-card button:active,
.game-workbench button:active,
.game-result button:active { transform: scale(.97); }

.game-view-shell button:focus-visible,
.game-hero button:focus-visible,
.game-memory-card:focus-visible,
.game-sudoku-cell:focus-visible {
  outline: 4px solid #f0c84f;
  outline-offset: 3px;
}

.game-view-shell button:disabled,
.game-hero button:disabled {
  opacity: .55;
  cursor: not-allowed;
  transform: none;
}

@keyframes game-result-pop {
  from { opacity: 0; transform: translateY(12px) scale(.94); }
  to { opacity: 1; transform: none; }
}

@keyframes game-confetti-fall {
  0% { opacity: 0; translate: 0 -8px; rotate: 0deg; }
  14% { opacity: 1; }
  100% { opacity: 0; translate: 16px 430px; rotate: 520deg; }
}

@keyframes game-shake {
  25% { transform: translateX(-4px); }
  50% { transform: translateX(4px); }
  75% { transform: translateX(-2px); }
}

@keyframes game-player-pop {
  from { transform: scale(.65); }
  to { transform: scale(1); }
}

@media (max-width: 960px) {
  .game-hero { grid-template-columns: minmax(0, 1fr) 150px; min-height: 200px; padding: 28px; }
  .game-hero-art { width: 145px; height: 132px; }
  .game-hero-art > span,
  .game-hero-art > b { width: 88px; height: 88px; font-size: 47px; }
  .game-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .game-daily-card { grid-template-columns: 72px minmax(0, 1fr); }
  .game-daily-card > button { grid-column: 1 / -1; width: 100%; }
  .game-lobby-grid { grid-template-columns: 1fr; }
  .game-card { display: grid; grid-template-columns: 68px minmax(0, 1fr) auto; gap: 0 17px; align-items: center; min-height: 156px; }
  .game-card > span:first-child { grid-row: 1 / 5; margin: 0; }
  .game-card h3 { grid-column: 2; }
  .game-card p,
  .game-card small { grid-column: 2; }
  .game-card button { grid-column: 3; grid-row: 1 / 5; width: auto; min-width: 132px; margin: 0; }
  .game-workbench { padding: 19px; }
  .game-stage { min-height: 390px; padding: 22px 15px; }
}

@media (max-width: 640px) {
  .game-hero { display: block; min-height: 0; padding: 24px 20px; border-radius: 21px; }
  .game-hero-copy > small,
  .game-hero-copy > span:first-child { font-size: 13px; letter-spacing: 1.2px; }
  .game-hero-copy h2 { font-size: 27px; }
  .game-hero-copy p { font-size: 14px; }
  .game-hero-copy button { width: 100%; }
  .game-hero-art { display: none; }
  .game-stats { margin: 12px 0 18px; border-radius: 16px; }
  .game-stats > div { grid-template-columns: 40px minmax(0, 1fr); min-height: 76px; padding: 12px; }
  .game-stats > div > span { width: 40px; height: 40px; font-size: 21px; }
  .game-stats b,
  .game-stats strong { font-size: 17px; }
  .game-stats small { font-size: 13px; }
  .game-daily-card { display: grid; grid-template-columns: 58px minmax(0, 1fr); gap: 13px; min-height: 0; padding: 19px 17px; border-radius: 19px; }
  .game-daily-card::after { display: none; }
  .game-daily-card > span:first-child { width: 58px; height: 58px; border-radius: 17px; font-size: 31px; }
  .game-daily-card h2,
  .game-daily-card h3 { font-size: 20px; }
  .game-daily-card p { font-size: 13px; }
  .game-card { display: flex; min-height: 235px; padding: 19px; }
  .game-card > span:first-child { margin-bottom: 12px; }
  .game-card h3,
  .game-card p,
  .game-card small,
  .game-card button { width: 100%; min-width: 0; }
  .game-card button { margin-top: auto; }
  .game-workbench { padding: 15px; border-radius: 19px; }
  .game-workbench-head { align-items: flex-start; flex-direction: column; }
  .game-workbench-head h2 { font-size: 22px; }
  .game-workbench-head > button { width: 100%; }
  .game-stage { display: block; min-height: 345px; padding: 18px 10px; border-radius: 17px; }
  .game-toolbar { align-items: stretch; flex-direction: column; }
  .game-toolbar > div { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .game-toolbar button { width: 100%; }
  .game-memory-grid { grid-template-columns: repeat(4, minmax(58px, 1fr)); gap: 8px; }
  .game-memory-card { min-width: 58px; min-height: 58px; border-radius: 14px; font-size: 28px; }
  .game-memory-card::after { font-size: 27px; }
  .game-sudoku-grid { grid-template-columns: repeat(4, minmax(52px, 1fr)); grid-template-rows: repeat(4, minmax(52px, 1fr)); width: min(100%, 330px); margin: 0 auto; }
  .game-sudoku-cell { min-width: 52px; min-height: 52px; font-size: 24px; }
  .game-number-pad { grid-template-columns: repeat(4, minmax(52px, 1fr)); width: min(100%, 330px); margin-inline: auto; }
  .game-number-pad button { min-width: 52px; min-height: 52px; }
  .game-maze-grid { grid-template-columns: repeat(var(--maze-columns), 52px); width: max-content; min-width: 100%; margin: 0 auto; }
  .game-maze-cell { min-width: 52px; min-height: 52px; border-radius: 7px; font-size: 21px; }
  .game-maze-controls { grid-template-columns: repeat(3, 58px); grid-template-rows: repeat(2, 58px); }
  .game-maze-controls button { min-width: 58px; min-height: 58px; }
  .game-pattern-card { padding: 21px 15px; }
  .game-pattern-card h2,
  .game-pattern-card h3 { font-size: 21px; }
  .game-pattern-options { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .game-pattern-options button { min-height: 56px; }
  .game-result { padding: 23px 17px; }
  .game-result h2,
  .game-result h3 { font-size: 23px; }
  .game-result button { width: 100%; margin-inline: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .game-hero-copy button,
  .game-daily-card button,
  .game-card,
  .game-card button,
  .game-workbench button,
  .game-memory-card,
  .game-result,
  .game-result button,
  .game-sudoku-cell.wrong,
  .game-maze-cell.player,
  .game-confetti > i,
  .game-confetti > span {
    animation: none !important;
    scroll-behavior: auto !important;
    transition: none !important;
  }

  .game-confetti { display: none; }
}
.game-memory-card:disabled,.game-sudoku-cell.given:disabled,.game-pattern-options button:disabled{opacity:1}
