:root {
  --pink: #ff5aa5;
  --coral: #ff7a59;
  --yellow: #ffd83d;
  --mint: #40d6a8;
  --sky: #48b5ff;
  --violet: #8f65ff;
  --ink: #37204f;
  --muted: #6d5f7f;
  --white: #fffaf4;
  --shadow: 0 18px 35px rgba(82, 40, 125, 0.22);
}

.seo-content,
.ad-slot-game-end {
  width: min(860px, 100%);
  margin: 22px auto 0;
}

.seo-content {
  padding: 20px;
  border: 4px solid rgba(255, 255, 255, 0.84);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.76);
  box-shadow: 0 14px 28px rgba(88, 49, 132, 0.12);
}

.seo-content h2 {
  margin: 0 0 8px;
  color: var(--ink);
  font-size: 1.45rem;
}

.seo-content p {
  margin: 0 0 16px;
  color: var(--muted);
  font-weight: 700;
  line-height: 1.5;
}

.seo-content p:last-child {
  margin-bottom: 0;
}

.seo-content ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 22px;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.related-card {
  display: grid;
  gap: 5px;
  min-height: 118px;
  padding: 14px;
  border: 3px solid #ffffff;
  border-radius: 18px;
  background: linear-gradient(145deg, #ffffff, #fff0bd);
  color: var(--ink);
  text-decoration: none;
  box-shadow: 0 7px 0 rgba(88, 42, 112, 0.12);
}

.related-card span {
  font-size: 1.8rem;
  font-weight: 900;
  line-height: 1;
}

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

.related-card small {
  color: var(--muted);
  font-weight: 800;
  line-height: 1.25;
}

.seo-content a,
.legal-footer a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0.35rem 0.5rem;
  color: var(--violet);
  font-weight: 900;
  text-decoration: none;
}

.seo-content a:hover,
.legal-footer a:hover {
  text-decoration: underline;
}

.ad-slot-game-end {
  min-height: 90px;
  border: 3px dashed rgba(109, 76, 255, 0.26);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.42);
}

.ad-slot {
  display: none;
}

body.ads-enabled .ad-slot {
  display: block;
}

.legal-footer {
  width: min(860px, 100%);
  margin: 22px auto 0;
  padding: 18px;
  border: 4px solid rgba(255, 255, 255, 0.84);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.76);
  color: var(--muted);
  text-align: center;
  font-weight: 800;
}

.legal-footer strong {
  color: var(--ink);
}

.legal-footer nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 14px;
  margin-top: 10px;
}

* {
  box-sizing: border-box;
}

button,
a,
input {
  -webkit-tap-highlight-color: transparent;
}

html {
  overflow-x: hidden;
}

body {
  min-height: 100vh;
  margin: 0;
  font-family: "Baloo 2", system-ui, sans-serif;
  color: var(--ink);
  overflow-x: hidden;
  background:
    radial-gradient(circle at 12% 18%, rgba(255, 216, 61, 0.9) 0 8%, transparent 9%),
    radial-gradient(circle at 88% 12%, rgba(72, 181, 255, 0.8) 0 10%, transparent 11%),
    radial-gradient(circle at 82% 82%, rgba(64, 214, 168, 0.75) 0 9%, transparent 10%),
    linear-gradient(135deg, #fff1aa 0%, #ffd1e8 45%, #b8edff 100%);
}

.fireworks-canvas {
  position: fixed;
  inset: 0;
  z-index: 20;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0;
  transition: opacity 220ms ease;
}

.fireworks-canvas.is-active {
  opacity: 1;
}

button,
select,
input {
  font: inherit;
}

button:focus-visible,
a:focus-visible,
select:focus-visible,
input:focus-visible {
  outline: 5px solid rgba(255, 90, 165, 0.35);
  outline-offset: 3px;
}

.is-hidden {
  display: none !important;
}

.game-shell {
  width: min(1120px, 100%);
  min-height: 100vh;
  margin: 0 auto;
  padding: 22px clamp(16px, 4vw, 38px) 34px;
}

.hero {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(18px, 4vw, 34px);
  max-width: 960px;
  margin: 0 auto 18px;
  text-align: left;
}

.brand-logo {
  width: clamp(92px, 12vw, 132px);
  height: clamp(92px, 12vw, 132px);
  border: 6px solid var(--white);
  border-radius: 50%;
  box-shadow: var(--shadow);
  object-fit: contain;
  background: var(--white);
}

.hero-copy {
  max-width: 640px;
}

.eyebrow {
  display: inline-block;
  margin: 0 0 2px;
  padding: 4px 14px;
  border-radius: 999px;
  background: var(--yellow);
  color: #6c3f00;
  font-size: clamp(1rem, 2.5vw, 1.15rem);
  font-weight: 800;
}

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

h1 {
  margin-bottom: 4px;
  font-size: clamp(2.25rem, 4.8vw, 4rem);
  line-height: 1.02;
  overflow-wrap: anywhere;
  word-break: break-word;
}

h1 span {
  display: inline-block;
  max-width: 100%;
  overflow-wrap: anywhere;
}

.intro {
  margin-bottom: 0;
  font-size: clamp(1rem, 2vw, 1.18rem);
  font-weight: 700;
  overflow-wrap: anywhere;
}

.game-panel {
  padding: clamp(16px, 3vw, 26px);
  border: 7px solid rgba(255, 250, 244, 0.92);
  border-radius: 26px;
  background: rgba(255, 250, 244, 0.84);
  box-shadow: var(--shadow);
}

.start-panel {
  max-width: 860px;
  margin: 0 auto;
  padding: clamp(18px, 3vw, 26px);
  border: 7px solid rgba(255, 250, 244, 0.92);
  border-radius: 26px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.82), rgba(255, 255, 255, 0.42)),
    linear-gradient(120deg, rgba(255, 90, 165, 0.22), rgba(255, 216, 61, 0.2), rgba(72, 181, 255, 0.18));
  text-align: center;
  box-shadow: var(--shadow);
}

.start-panel h2 {
  margin-bottom: 8px;
  font-size: clamp(1.8rem, 4vw, 2.7rem);
  line-height: 1;
}

.start-panel p {
  max-width: 660px;
  margin: 0 auto 18px;
  color: #6b587f;
  font-size: 1.08rem;
  font-weight: 800;
  line-height: 1.35;
}

.player-control {
  display: grid;
  gap: 8px;
  max-width: 520px;
  margin: 0 auto 16px;
  text-align: left;
}

.player-control span,
.difficulty-cards legend {
  color: var(--ink);
  font-weight: 900;
}

.player-control input {
  min-height: 56px;
  padding: 12px 16px;
  border: 3px solid #ffffff;
  border-radius: 18px;
  background: var(--white);
  color: var(--ink);
  font-weight: 900;
  outline: none;
  box-shadow: 0 8px 18px rgba(82, 40, 125, 0.1);
}

.difficulty-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 0 0 18px;
  padding: 0;
  border: 0;
}

.difficulty-cards legend {
  grid-column: 1 / -1;
  text-align: left;
}

.difficulty-cards label {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  min-height: 104px;
  align-items: center;
  padding: 14px;
  border: 3px solid #ffffff;
  border-radius: 20px;
  background: linear-gradient(145deg, #ffffff, #fff0bd);
  text-align: left;
  cursor: pointer;
  box-shadow: 0 8px 0 rgba(88, 42, 112, 0.13);
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.difficulty-cards label:hover {
  transform: translateY(-2px);
}

.difficulty-cards label:has(input:checked) {
  border-color: var(--pink);
  box-shadow:
    0 8px 0 rgba(88, 42, 112, 0.13),
    0 0 0 5px rgba(255, 90, 165, 0.15);
}

.difficulty-cards input {
  width: 18px;
  height: 18px;
  accent-color: var(--pink);
}

.difficulty-cards strong,
.difficulty-cards small {
  display: block;
}

.difficulty-cards small {
  margin-top: 5px;
  color: #7b5795;
  font-weight: 800;
  line-height: 1.25;
}

.toolbar,
.stats {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.toolbar {
  margin-bottom: 16px;
}

.game-pill {
  display: grid;
  gap: 3px;
  min-width: min(100%, 180px);
  padding: 10px 14px;
  border: 3px solid #ffffff;
  border-radius: 18px;
  background: linear-gradient(180deg, #ffffff, #e9fff8);
  text-align: center;
  box-shadow: 0 8px 0 rgba(64, 214, 168, 0.24);
}

.level-pill {
  background: linear-gradient(180deg, #ffffff, #fff0bd);
  box-shadow: 0 8px 0 rgba(255, 194, 71, 0.38);
}

.game-pill span {
  color: #6b587f;
  font-size: 0.9rem;
  font-weight: 900;
}

.game-pill strong {
  font-size: 1.1rem;
  line-height: 1;
}

.reset-button,
.menu-button,
.subscribe-button {
  border: 0;
  border-radius: 18px;
  cursor: pointer;
  color: #ffffff;
  font-weight: 800;
  text-decoration: none;
  box-shadow: 0 8px 0 rgba(88, 42, 112, 0.28);
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.reset-button {
  padding: 12px 18px;
  background: linear-gradient(135deg, var(--pink), var(--violet));
}

.reset-button.secondary {
  background: linear-gradient(135deg, var(--mint), var(--sky));
}

.start-actions,
.winner-actions,
.main-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.main-actions {
  align-items: center;
  margin-top: 22px;
}

.start-button,
.podium-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 56px;
  padding: 13px 20px;
  border: 0;
  border-radius: 999px;
  color: #ffffff;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 8px 0 rgba(88, 42, 112, 0.28);
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.start-button {
  background: linear-gradient(135deg, var(--mint), var(--sky), var(--violet));
}

.podium-button {
  background: linear-gradient(135deg, var(--coral), var(--pink));
}

.start-button:hover,
.podium-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 0 rgba(88, 42, 112, 0.22);
}

.menu-button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: min(100%, 360px);
  min-height: 52px;
  margin: 22px auto 0;
  padding: 12px 18px;
  background: linear-gradient(135deg, var(--mint), var(--sky));
  font-size: clamp(1.05rem, 3vw, 1.2rem);
}

.subscribe-button {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  justify-content: center;
  width: min(100%, 420px);
  min-height: 68px;
  margin: 24px auto 0;
  padding: 16px 24px;
  border: 5px solid #ffffff;
  background: linear-gradient(135deg, #ff001f 0%, #ff5aa5 48%, #8f65ff 100%);
  font-size: clamp(1.18rem, 3.8vw, 1.55rem);
  overflow: hidden;
  box-shadow:
    0 12px 0 #b6004b,
    0 18px 32px rgba(255, 0, 80, 0.38);
  animation: subscribePulse 1.45s ease-in-out infinite;
}

.subscribe-button::before {
  content: "";
  position: absolute;
  inset: -35% auto -35% -45%;
  z-index: -1;
  width: 42%;
  transform: rotate(18deg);
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.72),
    transparent
  );
  animation: subscribeShine 2.4s ease-in-out infinite;
}

.subscribe-button::after {
  content: "▶";
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  margin-left: 12px;
  border-radius: 50%;
  background: #ffffff;
  color: #ff001f;
  font-size: 0.82em;
  line-height: 1;
  animation: subscribeIconBounce 900ms ease-in-out infinite;
}

.reset-button:hover,
.menu-button:hover,
.subscribe-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 0 rgba(88, 42, 112, 0.22);
}

.reset-button:active,
.menu-button:active,
.subscribe-button:active {
  transform: translateY(3px);
  box-shadow: 0 4px 0 rgba(88, 42, 112, 0.28);
}

.stats {
  margin-bottom: 18px;
}

.game-message {
  width: min(760px, 100%);
  margin: 0 auto 12px;
  padding: 12px 16px;
  border: 3px solid #ffffff;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--ink);
  text-align: center;
  font-size: clamp(1.02rem, 2.8vw, 1.22rem);
  font-weight: 900;
  box-shadow: 0 8px 18px rgba(82, 40, 125, 0.1);
}

.game-message.is-success {
  background: linear-gradient(135deg, #e4ffd7, #d7fff3);
}

.game-message.is-warning {
  background: linear-gradient(135deg, #fff4bd, #ffe2d7);
}

.progress-track {
  width: min(760px, 100%);
  height: 16px;
  margin: 0 auto 18px;
  padding: 3px;
  border: 3px solid #ffffff;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
  box-shadow: inset 0 2px 8px rgba(82, 40, 125, 0.12);
}

.progress-track span {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(135deg, var(--mint), var(--sky), var(--violet));
  transition: width 240ms ease;
}

.stat {
  position: relative;
  min-width: 132px;
  padding: 10px 14px;
  border: 4px solid #ffffff;
  border-radius: 18px;
  background: linear-gradient(180deg, #ffffff, #fff0bd);
  text-align: center;
}

.stat::before {
  display: block;
  margin-bottom: 2px;
  font-size: 1.15rem;
}

.stat:nth-child(1)::before {
  content: "🏆";
}

.stat:nth-child(2)::before {
  content: "↻";
}

.stat:nth-child(3)::before {
  content: "⏱";
}

.stat:nth-child(4)::before {
  content: "✓";
}

.stat-label {
  display: block;
  font-size: 0.92rem;
  font-weight: 800;
  color: #7b5795;
}

.stat strong {
  display: block;
  font-size: 1.55rem;
  line-height: 1;
}

.board-wrap {
  display: flex;
  justify-content: center;
}

.memory-board {
  display: grid;
  width: min(100%, 680px);
  gap: clamp(10px, 1.8vw, 16px);
}

.memory-board.easy {
  grid-template-columns: repeat(4, minmax(58px, 1fr));
}

.memory-board.medium {
  grid-template-columns: repeat(4, minmax(58px, 1fr));
}

.memory-board.hard {
  grid-template-columns: repeat(4, minmax(58px, 1fr));
}

.card {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  border: 0;
  border-radius: clamp(16px, 3vw, 24px);
  background: transparent;
  cursor: pointer;
  perspective: 900px;
}

.card:focus-visible {
  outline: 5px solid var(--yellow);
  outline-offset: 4px;
}

.card-inner {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
  transition: transform 420ms cubic-bezier(0.22, 1, 0.36, 1);
}

.card.is-flipped .card-inner,
.card.is-matched .card-inner {
  transform: rotateY(180deg);
}

.card-face {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 5px solid #ffffff;
  border-radius: inherit;
  backface-visibility: hidden;
  box-shadow: 0 10px 0 rgba(88, 42, 112, 0.18);
}

.card-back {
  background:
    linear-gradient(45deg, rgba(255, 255, 255, 0.24) 25%, transparent 25% 50%, rgba(255, 255, 255, 0.24) 50% 75%, transparent 75%),
    linear-gradient(135deg, var(--sky), var(--pink));
  background-size: 24px 24px, auto;
}

.card-back::before {
  content: "?";
  display: grid;
  place-items: center;
  width: 52%;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  background: var(--white);
  color: var(--violet);
  font-size: clamp(2rem, 8vw, 4rem);
  font-weight: 800;
}

.card-front {
  transform: rotateY(180deg);
  background: linear-gradient(145deg, #ffffff, #fff0c0);
  font-size: clamp(2.25rem, 10vw, 5rem);
}

.card-logo {
  width: 78%;
  height: 78%;
  border: 4px solid #ffffff;
  border-radius: 50%;
  background: #ffffff;
  object-fit: contain;
  padding: 4px;
  box-shadow: 0 8px 16px rgba(82, 40, 125, 0.18);
}

.card.is-matched {
  pointer-events: none;
  cursor: default;
}

.card.is-matched .card-front {
  animation: matchedPop 620ms ease;
  background: linear-gradient(145deg, #d9ff87, #66e7bd);
}

.card.is-hidden-mismatch .card-inner {
  animation: mismatchShake 360ms ease;
}

.game-panel.match-flash {
  animation: panelMatchFlash 520ms ease;
}

.winner-message {
  display: none;
  margin: 22px auto 0;
  padding: clamp(18px, 4vw, 28px);
  border: 5px solid #ffffff;
  border-radius: 24px;
  background: linear-gradient(135deg, #fff06c, #ff8cc8);
  text-align: center;
  box-shadow: 0 12px 0 rgba(88, 42, 112, 0.18);
}

.winner-message.is-visible {
  display: block;
  animation: winnerBounce 650ms ease;
}

.winner-message h2 {
  margin-bottom: 6px;
  font-size: clamp(1.8rem, 6vw, 3.4rem);
  line-height: 1.05;
}

.winner-message p {
  margin-bottom: 0;
  font-size: clamp(1.1rem, 3vw, 1.35rem);
  font-weight: 800;
}

.record-message {
  margin: 8px 0 14px !important;
  color: #6b587f;
  font-weight: 900;
}

.record-message.is-record {
  color: #8a5b00;
  text-shadow: 0 0 16px rgba(255, 216, 61, 0.6);
}

@keyframes panelMatchFlash {
  45% {
    box-shadow:
      var(--shadow),
      0 0 0 8px rgba(64, 214, 168, 0.22);
  }
}

@keyframes matchedPop {
  0%,
  100% {
    transform: rotateY(180deg) scale(1);
  }
  45% {
    transform: rotateY(180deg) scale(1.12);
  }
}

@keyframes mismatchShake {
  0%,
  100% {
    transform: rotateY(180deg) translateX(0);
  }
  25% {
    transform: rotateY(180deg) translateX(-7px);
  }
  75% {
    transform: rotateY(180deg) translateX(7px);
  }
}

@keyframes winnerBounce {
  0% {
    transform: scale(0.88);
    opacity: 0;
  }
  70% {
    transform: scale(1.04);
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

.podium-modal {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(55, 32, 79, 0.66);
}

.podium-card {
  width: min(920px, 100%);
  max-height: min(88vh, 760px);
  overflow-y: auto;
  padding: clamp(22px, 5vw, 34px);
  border: 6px solid #ffffff;
  border-radius: 28px;
  background: linear-gradient(145deg, #ffffff, #fff1ce);
  text-align: center;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
  animation: modalIn 240ms ease-out;
}

.podium-card h2 {
  margin-bottom: 16px;
  font-size: clamp(1.9rem, 5vw, 3rem);
  line-height: 1;
}

.podium-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
  text-align: left;
}

.podium-section {
  padding: 14px;
  border: 3px solid #ffffff;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 8px 18px rgba(82, 40, 125, 0.1);
}

.podium-section h3 {
  margin: 0 0 10px;
  font-size: 1.1rem;
}

.podium-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style-position: inside;
}

.podium-list li {
  padding: 9px;
  border-radius: 12px;
  background: #fff7dc;
  font-weight: 900;
}

.podium-list span {
  display: block;
  margin-top: 3px;
  color: #7b5795;
  font-size: 0.86rem;
}

.podium-medal {
  display: inline-grid;
  width: 28px;
  height: 28px;
  place-items: center;
  margin-right: 6px;
  border-radius: 50%;
  background: #ffffff;
}

.empty-podium {
  margin: 0;
  color: #7b5795;
  font-weight: 900;
}

@keyframes modalIn {
  from {
    transform: translateY(16px) scale(0.96);
    opacity: 0;
  }

  to {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}

@keyframes subscribePulse {
  0%,
  100% {
    transform: translateY(0) scale(1);
    box-shadow: 0 8px 0 rgba(88, 42, 112, 0.28), 0 0 0 rgba(255, 47, 70, 0);
  }
  50% {
    transform: translateY(-3px) scale(1.035);
    box-shadow: 0 12px 0 rgba(88, 42, 112, 0.2), 0 0 28px rgba(255, 47, 70, 0.48);
  }
}

@keyframes subscribeShine {
  0% {
    left: -50%;
  }
  45%,
  100% {
    left: 115%;
  }
}

@keyframes subscribeIconBounce {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.16);
  }
}

@media (prefers-reduced-motion: reduce) {
  .subscribe-button,
  .subscribe-button::before,
  .subscribe-button::after {
    animation: none;
  }
}

@media (max-width: 720px) {
  .game-shell {
    width: min(100%, 370px);
    margin: 0;
  }

  .game-shell {
    padding-top: 18px;
  }

  .hero {
    flex-direction: column;
    gap: 10px;
    margin-bottom: 16px;
    text-align: center;
  }

  .hero-copy {
    width: 100%;
    min-width: 0;
  }

  h1 {
    max-width: 340px;
    margin-right: auto;
    margin-left: auto;
    font-size: clamp(1.45rem, 6.4vw, 2rem);
    line-height: 1.08;
  }

  .brand-logo {
    width: 96px;
    height: 96px;
    border-width: 5px;
  }

  .game-panel {
    padding: 14px;
    border-width: 5px;
    border-radius: 22px;
  }

  .toolbar {
    align-items: stretch;
  }

  .difficulty-cards,
  .podium-grid {
    grid-template-columns: 1fr;
  }

  .reset-button,
  .start-button,
  .podium-button,
  .menu-button,
  .subscribe-button {
    width: 100%;
  }

  .memory-board.medium {
    grid-template-columns: repeat(3, minmax(72px, 1fr));
    max-width: 520px;
  }
}

@media (max-width: 480px) {
  .game-shell {
    padding: 14px 10px 26px;
  }

  h1 {
    max-width: 310px;
  }

  .intro {
    font-size: 1rem;
    line-height: 1.2;
  }

  .toolbar,
  .stats {
    gap: 9px;
  }

  .game-pill,
  .reset-button {
    font-size: 1rem;
  }

  .reset-button {
    padding: 11px 14px;
  }

  .memory-board {
    gap: 9px;
  }

  .memory-board.easy {
    grid-template-columns: repeat(2, minmax(112px, 1fr));
    max-width: 330px;
  }

  .memory-board.hard {
    grid-template-columns: repeat(4, minmax(68px, 1fr));
  }

  .memory-board.medium {
    grid-template-columns: repeat(3, minmax(68px, 1fr));
  }

  .card {
    border-radius: 16px;
  }

  .card-face {
    border-width: 3px;
    box-shadow: 0 6px 0 rgba(88, 42, 112, 0.18);
  }

  .card-logo {
    width: 82%;
    height: 82%;
    border-width: 3px;
  }

  .stat {
    flex: 1 1 96px;
    min-width: 96px;
    padding: 8px 6px;
    border-width: 3px;
  }

  .stat strong {
    font-size: 1.34rem;
  }

  .winner-message {
    border-width: 4px;
  }

  .subscribe-button {
    min-height: 54px;
    padding: 12px 16px;
    line-height: 1.05;
  }

  .main-actions {
    align-items: stretch;
    flex-direction: column;
  }
}

@media (max-width: 360px) {
  .game-panel {
    padding: 10px;
    border-width: 4px;
  }

  .memory-board {
    gap: 7px;
  }

  .card {
    border-radius: 14px;
  }

  .stat {
    min-width: 88px;
  }

  .stat-label {
    font-size: 0.82rem;
  }

  .stat strong {
    font-size: 1.18rem;
  }
}
