@font-face {
  font-family: "F37 Kookie";
  src: url("assets/font/F37Kookie-Bold.ttf") format("truetype");
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}

@font-face {
  font-family: "Livvic";
  src: url("assets/font/Livvic-Regular.ttf") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Livvic";
  src: url("assets/font/Livvic-SemiBold.ttf") format("truetype");
  font-style: normal;
  font-weight: 600;
  font-display: swap;
}

:root {
  color-scheme: light;
  --orange: #f36d21;
  --red: #d8000b;
  --white: #ffffff;
  --brown: #56321e;
  --ink: #111827;
  --display-font: "F37 Kookie", "Trebuchet MS", "Segoe UI", sans-serif;
  --accent-font: "Livvic", "Segoe UI", Arial, sans-serif;
  --body-font: "Segoe UI", Arial, sans-serif;
  --landing-font: "Poppins", "Livvic", "Segoe UI", Arial, sans-serif;
  --letter-catcher-space: 82px;
  --letter-catch-label-height: 30px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  min-width: 320px;
  min-height: 100%;
  overflow-x: hidden;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--white);
  font-family: var(--body-font);
  background: var(--orange);
}

button,
input {
  font: inherit;
}

img {
  display: block;
  max-width: 100%;
}

.app {
  width: 100%;
  margin: 0 auto;
  padding: 0 0 34px;
}

.landing-hero {
  position: relative;
  min-height: 100svh;
  overflow: hidden;
  padding: 40px clamp(18px, 4vw, 42px) 58px;
  background: var(--orange);
}

.landing-nav {
  position: relative;
  z-index: 4;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: start;
  gap: 40px;
  width: min(1200px, 100%);
  height: 190px;
  margin: 0 auto;
}

.landing-brand {
  display: flex;
  align-items: flex-start;
  gap: 48px;
}

.landing-logo {
  width: 139px;
}

.landing-badge {
  width: 152px;
  margin-top: -40px;
}

.landing-menu,
.landing-auth {
  display: flex;
  align-items: center;
  gap: 40px;
  min-height: 74px;
  font-family: var(--landing-font);
  font-size: 18px;
  font-weight: 600;
  line-height: 1.22;
}

.landing-menu {
  justify-content: center;
}

.landing-auth {
  justify-content: flex-end;
  gap: 24px;
}

.landing-menu a,
.landing-auth a {
  color: var(--white);
  text-decoration: none;
  white-space: nowrap;
}

.landing-register {
  color: var(--red) !important;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.25);
}

.landing-login {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  filter: drop-shadow(1px 1px 2px rgba(0, 0, 0, 0.25));
}

.landing-login img {
  width: 22px;
  height: 22px;
}

.landing-content {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 520px) minmax(0, 623px);
  align-items: start;
  justify-content: space-between;
  gap: 40px;
  width: min(1200px, 100%);
  min-height: calc(100svh - 288px);
  margin: 0 auto;
}

.landing-copy {
  position: relative;
  z-index: 3;
  max-width: 760px;
  padding-top: 0;
}

.landing-copy h1 {
  max-width: none;
  margin: 0 0 16px;
  color: var(--white);
  font-family: var(--landing-font);
  font-size: clamp(46px, 4.1vw, 60px);
  font-weight: 700;
  line-height: 1.22;
  text-shadow: none;
}

.landing-kicker {
  max-width: 700px;
  margin: 0 0 16px;
  color: var(--white);
  font-family: var(--landing-font);
  font-size: clamp(27px, 2.45vw, 35px);
  font-weight: 700;
  line-height: 1.22;
}

.landing-text {
  max-width: 720px;
  margin: 0 0 30px;
  color: var(--white);
  font-family: var(--landing-font);
  font-size: clamp(22px, 2.1vw, 30px);
  font-weight: 500;
  line-height: 1.22;
}

.landing-actions {
  display: flex;
  flex-wrap: nowrap;
  gap: 20px;
}

.landing-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  min-height: 56px;
  padding: 12px 48px;
  border: 2px solid var(--white);
  border-radius: 999px;
  color: var(--white);
  font-family: var(--landing-font);
  font-size: 18px;
  font-weight: 700;
  line-height: 1.22;
  text-align: center;
  text-decoration: none;
}

.landing-button-primary {
  background: var(--red);
}

.landing-button-secondary {
  background: transparent;
}

.landing-visual {
  position: relative;
  align-self: end;
  min-height: 826px;
}

.landing-boy {
  position: absolute;
  right: 0;
  top: -62px;
  z-index: 2;
  width: 623px;
  max-width: 100%;
}

.landing-cookie-x {
  position: absolute;
  top: -18px;
  right: 0;
  z-index: 1;
  width: 221px;
  max-width: 100%;
  animation: landingCookieFloat 3.8s ease-in-out infinite alternate;
  transform-origin: center;
}

.game-shell {
  width: min(1200px, calc(100% - 28px));
  margin: 0 auto;
  padding-top: 0;
}

.game-shell {
  display: grid;
  gap: 0;
}

.game-shell > .play-area {
  width: min(680px, 100%);
  justify-self: center;
  margin-top: 100px;
}

.game-shell > .intro {
  display: none;
}

.game-picker {
  display: grid;
  justify-items: center;
  margin-top: -72px;
  scroll-margin-top: 40px;
}

.game-picker h2 {
  position: relative;
  z-index: 2;
  min-width: min(520px, calc(100% - 48px));
  margin: 0 0 -2px;
  padding: 30px 44px 28px;
  border-radius: 20px 20px 0 0;
  color: var(--white);
  background: var(--red);
  font-family: var(--landing-font);
  font-size: 34px;
  font-weight: 700;
  line-height: 1.22;
  text-align: center;
}

.intro {
  display: grid;
  gap: 12px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.brand-logo {
  width: clamp(78px, 18vw, 108px);
  filter: drop-shadow(0 8px 14px rgba(0, 0, 0, 0.22));
}

.eyebrow {
  margin: 0;
  color: var(--white);
  font-family: var(--accent-font);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0;
  text-align: right;
  text-transform: uppercase;
}

.hero-copy {
  display: grid;
  gap: 6px;
}

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

h1,
h2 {
  font-family: var(--display-font);
  font-weight: 700;
  letter-spacing: 0;
}

h1 {
  max-width: 620px;
  margin-bottom: 0;
  color: var(--white);
  font-size: clamp(2.15rem, 8vw, 3.45rem);
  line-height: 0.98;
  overflow-wrap: anywhere;
  text-shadow: 0 4px 8px rgba(0, 0, 0, 0.24);
}

.lead {
  max-width: 620px;
  margin-bottom: 0;
  color: var(--white);
  font-family: var(--accent-font);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.35;
}

.play-area {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}

.game-tabs {
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: clamp(14px, 1.8vw, 24px);
  width: 100%;
  padding: 18px 22px;
  border: 2px solid var(--white);
  border-radius: 999px;
  background: var(--orange);
  box-shadow: 0 14px 0 rgba(0, 0, 0, 0.25);
}

.tab-button {
  min-height: 72px;
  padding: 16px 20px;
  border: 0;
  border-radius: 999px;
  color: var(--red);
  background: var(--white);
  font-family: var(--landing-font);
  font-size: 18px;
  font-weight: 700;
  line-height: 1.22;
  cursor: pointer;
}

.tab-button.is-active {
  color: var(--white);
  background: var(--red);
}

.board-panel {
  display: grid;
  gap: 14px;
}

.score-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.score-row > div {
  min-width: 0;
  padding: 10px 12px;
  border: 2px solid rgba(255, 255, 255, 0.58);
  border-radius: 8px;
  color: var(--white);
  background: rgba(255, 255, 255, 0.1);
}

.score-label {
  display: block;
  margin-bottom: 2px;
  font-family: var(--accent-font);
  font-size: 0.72rem;
  font-weight: 600;
}

.score-row strong {
  display: block;
  font-family: var(--display-font);
  font-size: 2rem;
  line-height: 0.9;
}

.status {
  min-height: 48px;
  display: flex;
  align-items: center;
  padding: 10px 14px;
  border: 2px solid rgba(255, 255, 255, 0.7);
  border-radius: 8px;
  color: var(--white);
  font-family: var(--display-font);
  font-size: clamp(1.35rem, 6vw, 2rem);
  line-height: 1;
  background: var(--red);
  box-shadow: 6px 6px 0 rgba(86, 50, 30, 0.22);
}

.board {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  width: min(100%, 600px);
  margin: 0 auto;
  border: 4px solid var(--white);
  background: url("assets/tictactoe-cloth.png") center / cover no-repeat;
}

.game-start-overlay {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: clamp(14px, 4vw, 28px);
  background: rgba(243, 109, 33, 0.18);
}

.game-start-card,
.contest-form,
.result-card {
  position: relative;
  border: 8px solid #facdb7;
  border-radius: 8px;
  color: var(--red);
  text-align: center;
  background: var(--white);
  box-shadow: 8px 8px 0 rgba(86, 50, 30, 0.18);
}

.game-start-card {
  width: min(88%, 420px);
  padding: clamp(34px, 7vw, 46px) clamp(18px, 5vw, 34px) clamp(22px, 5vw, 30px);
}

.game-start-logo,
.modal-logo {
  position: absolute;
  left: 50%;
  top: 0;
  width: clamp(70px, 18vw, 104px);
  transform: translate(-50%, -48%);
  filter: drop-shadow(0 6px 5px rgba(86, 50, 30, 0.18));
}

.contest-form .eyebrow,
.result-card .eyebrow {
  margin: 0 0 8px;
  color: var(--red);
  font-family: var(--accent-font);
  font-size: 0.76rem;
  font-weight: 700;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0;
}

.game-start-card h3,
.contest-form h2,
.result-card h2 {
  max-width: 100%;
  margin: 0 auto;
  color: var(--red);
  font-family: var(--display-font);
  font-size: clamp(1.55rem, 4.4vw, 2.15rem);
  line-height: 1;
  overflow-wrap: anywhere;
  text-wrap: balance;
}

.game-start-card p {
  max-width: 280px;
  margin: 12px auto 18px;
  font-family: var(--accent-font);
  font-size: 0.98rem;
  font-weight: 700;
  line-height: 1.25;
}

.game-start-card .game-start-button,
.contest-form .primary-button,
.result-card .primary-button,
.result-card .secondary-button {
  min-width: 156px;
  border-color: var(--red);
  border-radius: 999px;
  box-shadow: none;
}

.game-start-card .game-start-button,
.contest-form .primary-button,
.result-card .primary-button {
  color: var(--white);
  background: var(--red);
}

.result-card .secondary-button {
  color: var(--red);
  background: var(--white);
}

.result-card .dialog-actions {
  justify-content: center;
}

.cell {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  min-width: 0;
  border: 0;
  border-right: 4px solid var(--white);
  border-bottom: 4px solid var(--white);
  border-radius: 0;
  background: transparent;
  cursor: pointer;
  transition: background-color 150ms ease, transform 150ms ease;
}

.cell:nth-child(3n) {
  border-right: 0;
}

.cell:nth-child(n + 7) {
  border-bottom: 0;
}

.cell:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.12);
}

.cell:disabled {
  cursor: default;
}

.cell img {
  width: 74%;
  height: 74%;
  object-fit: contain;
  animation: pop 220ms ease-out;
  filter: drop-shadow(7px 18px 5px rgba(0, 0, 0, 0.26));
}

.cell.win {
  background: rgba(216, 0, 11, 0.28);
}

.actions,
.dialog-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.primary-button,
.secondary-button {
  min-height: 46px;
  padding: 0 18px;
  border-radius: 8px;
  font-family: var(--accent-font);
  font-weight: 600;
  cursor: pointer;
}

.primary-button {
  border: 2px solid var(--red);
  color: var(--white);
  background: var(--red);
}

.secondary-button {
  color: var(--red);
  background: var(--white);
  border: 2px solid var(--white);
}

.primary-button:focus-visible,
.secondary-button:focus-visible {
  outline: 3px solid #facdb7;
  outline-offset: 3px;
}

.hidden {
  display: none;
}

.letter-panel {
  display: grid;
  gap: 14px;
}

.runner-panel {
  display: grid;
  gap: 14px;
}

.memory-panel,
.snake-panel,
.checkers-panel {
  display: grid;
  gap: 14px;
}

.letter-hud {
  display: grid;
  grid-template-columns: 1.25fr 1fr 1fr;
  gap: 8px;
}

.letter-hud > div,
.runner-hud > div,
.memory-hud > div,
.snake-hud > div,
.checkers-hud > div {
  min-width: 0;
  padding: 10px 12px;
  border: 2px solid rgba(255, 255, 255, 0.58);
  border-radius: 8px;
  color: var(--white);
  background: rgba(255, 255, 255, 0.1);
}

.letter-hud strong,
.runner-hud strong,
.memory-hud strong,
.snake-hud strong,
.checkers-hud strong {
  display: block;
  min-width: 3ch;
  font-family: var(--display-font);
  font-size: 1.85rem;
  font-variant-numeric: tabular-nums;
  line-height: 0.95;
}

.runner-hud,
.memory-hud,
.checkers-hud {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.snake-hud {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.letter-target {
  display: flex;
  align-items: flex-end;
  gap: 5px;
  min-height: 34px;
}

.queue-letter {
  display: inline-grid;
  place-items: center;
  font-family: var(--display-font);
  font-size: 1.05rem;
  line-height: 1;
  opacity: 0.3;
}

.queue-letter.is-current {
  min-width: 30px;
  font-size: 2rem;
  opacity: 1;
}

.letter-arena {
  position: relative;
  height: min(70vh, 520px);
  min-height: 360px;
  overflow: hidden;
  border: 2px solid var(--white);
  background: transparent;
  touch-action: none;
}

.letter-sky-zone {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  bottom: calc(var(--letter-catcher-space) + var(--letter-catch-label-height));
  z-index: 0;
  background-image: url("assets/pozadie_big.jpg");
  background-size: cover;
  background-position: center 0;
  animation: letterBackgroundDrift 30s ease-in-out infinite alternate;
  pointer-events: none;
}

.letter-catch-zone {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
  height: calc(var(--letter-catcher-space) + var(--letter-catch-label-height));
  background: var(--orange);
  pointer-events: none;
}

.letter-catch-zone::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 2px;
  background: repeating-linear-gradient(
    to right,
    rgba(255, 255, 255, 0.84) 0 10px,
    transparent 10px 24px
  );
}

.falling-letter {
  position: absolute;
  z-index: 2;
  top: -90px;
  width: clamp(58px, 18vw, 86px);
  height: clamp(58px, 18vw, 86px);
  padding: 0;
  border: 0;
  background: transparent;
  animation-name: letterFall;
  animation-timing-function: linear;
  animation-fill-mode: forwards;
  contain: layout paint;
  pointer-events: none;
  will-change: transform, opacity;
}

.falling-letter img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: none;
}

.falling-letter.is-collected {
  opacity: 0;
}

.catch-line {
  position: absolute;
  left: 0;
  right: 0;
  bottom: var(--letter-catcher-space);
  z-index: 4;
  display: grid;
  height: var(--letter-catch-label-height);
  place-items: center;
  padding: 0 12px;
  border-top: 0;
  color: rgba(255, 255, 255, 0.84);
  font-family: var(--accent-font);
  font-size: 0.75rem;
  font-weight: 600;
  text-align: center;
  background: transparent;
  pointer-events: none;
}

.letter-catcher {
  position: absolute;
  left: 50%;
  bottom: 18px;
  z-index: 5;
  width: clamp(104px, 29vw, 148px);
  height: auto;
  border: 0;
  background: transparent;
  transform: translateX(-50%);
  pointer-events: none;
}

.letter-catcher img {
  width: 100%;
  height: auto;
  object-fit: contain;
}

.runner-arena {
  position: relative;
  --runner-ground-offset: 76px;
  height: min(58vh, 430px);
  min-height: 310px;
  overflow: hidden;
  border: 2px solid var(--white);
  background: #70c8ee;
  touch-action: manipulation;
}

.runner-sky,
.runner-floor {
  position: absolute;
  left: 0;
  right: 0;
  pointer-events: none;
}

.runner-sky {
  top: 0;
  z-index: 0;
  height: 70%;
  background-image: url("assets/runner/bg-kopia.jpg");
  background-repeat: repeat-x;
  background-position: var(--runner-sky-x, 0) top;
  background-size: auto 100%;
}

.runner-floor {
  bottom: 0;
  z-index: 1;
  height: 30%;
  background-image: url("assets/runner/bg-podlaha.jpg");
  background-repeat: repeat-x;
  background-position: var(--runner-floor-x, 0) bottom;
  background-size: auto 100%;
}

.runner-dog {
  position: absolute;
  z-index: 2;
  top: 24px;
  left: 0;
  width: clamp(118px, 18vw, 210px);
  height: auto;
  pointer-events: none;
  will-change: transform;
}

.runner-logo {
  position: absolute;
  z-index: 3;
  top: 18px;
  left: 0;
  width: clamp(62px, 9vw, 108px);
  height: auto;
  opacity: 0;
  pointer-events: none;
  transition: opacity 220ms ease;
  will-change: transform, opacity;
}

.runner-logo.is-visible {
  opacity: 1;
}

.runner-road {
  position: absolute;
  left: 0;
  right: 0;
  bottom: calc(var(--runner-ground-offset) - 4px);
  z-index: 2;
  height: 4px;
  background: rgba(255, 255, 255, 0.74);
  box-shadow: none;
}

.runner-cookie {
  position: absolute;
  z-index: 6;
  left: 42px;
  bottom: var(--runner-ground-offset);
  width: clamp(62px, 18vw, 92px);
  height: clamp(62px, 18vw, 92px);
  object-fit: contain;
  filter: drop-shadow(0 12px 14px rgba(92, 39, 8, 0.28));
  transform-origin: center;
  will-change: transform, bottom;
}

.runner-cookie.is-running {
  animation: runnerSpin 850ms linear infinite;
}

.runner-obstacle {
  position: absolute;
  z-index: 5;
  left: 0;
  bottom: var(--runner-ground-offset);
  display: grid;
  place-items: end center;
  width: clamp(62px, 14vw, var(--runner-obstacle-width));
  height: clamp(78px, 20vw, var(--runner-obstacle-height));
  background: transparent;
  will-change: transform;
}

.runner-obstacle img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center bottom;
  filter: drop-shadow(6px 9px 4px rgba(103, 54, 20, 0.22));
  pointer-events: none;
}

.runner-obstacle.is-single img {
  transform: translateY(2px);
}

.runner-obstacle.is-double img {
  transform: translateY(1px);
}

.memory-board {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  align-items: center;
  place-content: center;
  gap: clamp(8px, 2.6vw, 16px);
  width: min(100%, 596px);
  aspect-ratio: 596 / 510;
  margin: 0 auto;
  padding: clamp(12px, 3vw, 24px);
  border: 4px solid var(--white);
  background: var(--orange);
  overflow: hidden;
}

.memory-card {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  min-width: 0;
  padding: 0;
  border: 0;
  border-radius: 8px;
  color: var(--red);
  background: transparent;
  box-shadow: none;
  cursor: pointer;
  overflow: hidden;
  transition: transform 160ms ease;
}

.memory-card:hover:not(:disabled) {
  transform: translateY(-2px);
}

.memory-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: url("assets/pexeso.png") center / cover no-repeat;
  transition: opacity 160ms ease, transform 160ms ease;
}

.memory-card::after {
  content: none;
}

.memory-card img {
  position: relative;
  z-index: 2;
  width: 86%;
  height: 86%;
  object-fit: contain;
  opacity: 0;
  transform: scale(0.75);
  transition: opacity 160ms ease, transform 160ms ease;
  filter: drop-shadow(0 12px 14px rgba(92, 39, 8, 0.28));
}

.memory-card.is-open::before,
.memory-card.is-matched::before,
.memory-card.is-open::after,
.memory-card.is-matched::after {
  opacity: 0;
  transform: scale(1.15);
}

.memory-card.is-open img,
.memory-card.is-matched img {
  opacity: 1;
  transform: scale(1);
}

.memory-card.is-open,
.memory-card.is-matched {
  border: 4px solid #facdb7;
  background: var(--white);
}

.snake-arena {
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 0;
  background: transparent;
  touch-action: none;
}

.snake-board {
  display: grid;
  grid-template-columns: repeat(14, 1fr);
  grid-template-rows: repeat(14, 1fr);
  width: min(100%, 596px);
  aspect-ratio: 1;
  gap: 0;
  padding: 0;
  border: 2px solid rgba(255, 255, 255, 0.86);
  border-radius: 8px;
  background: transparent;
  filter: none;
  overflow: hidden;
}

.snake-tile {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  box-shadow:
    inset -1px 0 rgba(255, 255, 255, 0.74),
    inset 0 -1px rgba(255, 255, 255, 0.74);
}

.snake-tile.is-cream {
  background: transparent;
}

.snake-tile.is-orange {
  background: transparent;
}

.snake-tile.has-food::before {
  content: "";
  position: absolute;
  inset: 5%;
  z-index: 1;
  border-radius: 4px;
  background: var(--white);
  box-shadow: inset 0 0 0 2px #facdb7;
}

.snake-segment,
.snake-food,
.snake-obstacle {
  position: relative;
  width: 88%;
  height: 88%;
  object-fit: contain;
  filter: none;
}

.snake-head {
  transform: scale(1.08);
}

.snake-food {
  z-index: 2;
  width: 66%;
  height: 66%;
  animation: snakeFoodBounce 620ms ease-in-out infinite alternate;
  will-change: transform;
}

.snake-segment {
  z-index: 3;
}

.snake-obstacle {
  z-index: 1;
  width: 96%;
  height: 96%;
}

.snake-obstacle.is-tall {
  width: 88%;
  height: 88%;
}

.snake-controls {
  display: grid;
  grid-template-columns: repeat(3, 52px);
  justify-content: center;
  gap: 8px;
}

.snake-control {
  display: grid;
  place-items: center;
  width: 52px;
  height: 46px;
  border: 2px solid var(--white);
  border-radius: 8px;
  color: var(--red);
  background: var(--white);
  font-family: var(--display-font);
  font-size: 1.75rem;
  line-height: 1;
  cursor: pointer;
}

.snake-control[data-snake-dir="up"] {
  grid-column: 2;
}

.snake-control[data-snake-dir="left"] {
  grid-column: 1;
}

.snake-control[data-snake-dir="down"] {
  grid-column: 2;
}

.snake-control[data-snake-dir="right"] {
  grid-column: 3;
}

.scoreboard {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 2px solid rgba(255, 255, 255, 0.58);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
}

.scoreboard h3 {
  margin: 0;
  color: var(--white);
  font-family: var(--display-font);
  font-size: 1.55rem;
  line-height: 1;
}

.scoreboard ol {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.scoreboard li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 34px;
  padding: 7px 9px;
  border-radius: 8px;
  color: var(--white);
  background: rgba(255, 255, 255, 0.12);
  font-family: var(--accent-font);
  font-weight: 600;
}

.scoreboard .score-rank {
  opacity: 0.72;
}

.scoreboard .score-value {
  font-family: var(--display-font);
  font-size: 1.45rem;
  line-height: 0.9;
}

.checkers-board {
  position: relative;
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  width: min(100%, 596px);
  margin: 0 auto;
  aspect-ratio: 1;
  padding: 1.9%;
  border: 0;
  border-radius: 8px;
  background: url("assets/dama/sachovnica.png") center / contain no-repeat;
  filter: drop-shadow(8px 10px 0 rgba(86, 50, 30, 0.18));
  overflow: hidden;
}

#start-letters,
#start-runner,
#start-snake {
  display: none;
}

.checkers-cell {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  min-width: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  cursor: default;
  background: transparent;
}

.checkers-cell.is-light {
  background: transparent;
}

.checkers-cell.is-dark {
  background: transparent;
  cursor: pointer;
}

.checkers-cell.is-selected {
  outline: 4px solid rgba(216, 0, 11, 0.82);
  outline-offset: -8px;
}

.checkers-cell.is-move::after {
  content: "";
  width: 24%;
  height: 24%;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 0 0 3px rgba(216, 0, 11, 0.28);
}

.checkers-piece {
  position: relative;
  width: 88%;
  height: 88%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  filter: none;
}

.checkers-piece img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.checkers-piece.is-player img {
  transform: scale(1.07) translateY(-1%);
}

.checkers-piece.is-king::after {
  content: "D";
  position: absolute;
  right: -2px;
  top: -4px;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border: 2px solid var(--white);
  border-radius: 50%;
  color: var(--white);
  background: var(--red);
  font-family: var(--display-font);
  font-size: 1rem;
  line-height: 1;
}

.rules {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    "title button"
    "list button";
  align-items: center;
  column-gap: clamp(24px, 5vw, 56px);
  width: min(980px, calc(100vw - 28px));
  margin-left: calc((100% - min(980px, calc(100vw - 28px))) / 2);
  padding: clamp(22px, 3.2vw, 28px) clamp(28px, 5vw, 44px);
  border-radius: 20px;
  background: var(--white);
  color: var(--red);
  box-shadow: 14px 14px 0 rgba(0, 0, 0, 0.12);
}

.rules h2 {
  grid-area: title;
  margin: 0 0 16px;
  font-family: var(--landing-font);
  font-size: clamp(1.35rem, 3.2vw, 1.55rem);
  font-weight: 700;
  line-height: 1.22;
}

.rules ol {
  grid-area: list;
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 24px;
  font-family: var(--landing-font);
  font-size: 18px;
  font-weight: 400;
  line-height: 1.32;
}

.rules li::marker {
  font-weight: 400;
}

.rules-button {
  grid-area: button;
  justify-self: end;
  min-width: min(100%, 210px);
  min-height: 58px;
  margin-top: 0;
  padding: 14px 40px;
  border-color: var(--red);
  border-radius: 999px;
  background: var(--red);
  color: var(--white);
  font-family: var(--landing-font);
  font-size: 18px;
  font-weight: 700;
}

.prizes-section {
  display: grid;
  gap: clamp(44px, 7vw, 70px);
  width: min(1200px, calc(100% - 28px));
  margin: clamp(70px, 8vw, 110px) auto 0;
  scroll-margin-top: 40px;
}

.prize-card {
  display: grid;
  justify-items: center;
  padding: clamp(28px, 5vw, 46px) clamp(22px, 5vw, 56px) clamp(26px, 5vw, 42px);
  border: 8px solid #facdb7;
  border-radius: 40px;
  background: var(--white);
  box-shadow: 14px 14px 0 rgba(0, 0, 0, 0.12);
}

.prize-card h2 {
  margin: 0 0 clamp(16px, 3vw, 26px);
  color: var(--red);
  font-family: var(--landing-font);
  font-size: clamp(2rem, 4.6vw, 2.7rem);
  font-weight: 700;
  line-height: 1.22;
  text-align: center;
}

.prize-card img {
  width: min(100%, 840px);
  height: auto;
}

.prize-card:nth-child(2) img {
  width: min(100%, 860px);
}

.faq-section {
  display: grid;
  gap: 18px;
  width: min(1200px, calc(100% - 28px));
  margin: clamp(58px, 8vw, 96px) auto 0;
}

.faq-item {
  border: 3px solid #facdb7;
  border-radius: 40px;
  background: var(--white);
  box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.25);
  overflow: hidden;
}

.faq-item summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 24px;
  min-height: 72px;
  padding: 14px clamp(22px, 5vw, 48px);
  color: var(--red);
  cursor: pointer;
  font-family: var(--display-font);
  font-size: 24px;
  font-weight: 700;
  line-height: 1.12;
  list-style: none;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-icon {
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
  background: url("assets/acc/plus.svg") center / contain no-repeat;
}

.faq-item[open] .faq-icon {
  background-image: url("assets/acc/minus.svg");
}

.faq-answer {
  padding: 0 clamp(22px, 5vw, 48px) 22px;
}

.faq-answer p {
  max-width: 900px;
  margin: 0;
  color: var(--orange);
  font-family: var(--landing-font);
  font-size: 18px;
  font-weight: 400;
  line-height: 1.52;
}

.site-footer {
  width: 100%;
  padding: clamp(78px, 12vw, 150px) clamp(18px, 4vw, 42px) clamp(42px, 7vw, 76px);
  background: var(--orange);
}

.site-footer-inner {
  display: grid;
  gap: 60px;
  width: min(1200px, 100%);
  margin: 0 auto;
}

.footer-brand-row {
  display: grid;
  grid-template-columns: 1fr 194px 31px;
  align-items: center;
  gap: clamp(34px, 5vw, 58px);
}

.footer-logo-link {
  display: block;
  grid-column: 2;
}

.footer-logo {
  width: 194px;
  height: auto;
}

.footer-socials {
  display: grid;
  grid-column: 3;
  gap: 22px;
  justify-items: center;
}

.footer-socials a {
  display: grid;
  width: 31px;
  height: 30px;
  place-items: center;
}

.footer-socials img {
  max-width: 31px;
  max-height: 30px;
}

.footer-links-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 194px 31px;
  align-items: center;
  gap: clamp(34px, 5vw, 58px);
}

.footer-legal {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.footer-legal,
.footer-legal a {
  color: var(--white);
  font-family: var(--landing-font);
  font-size: 13px;
  font-weight: 400;
  line-height: 1.35;
  letter-spacing: 0.08em;
  text-decoration: none;
}

.footer-visit {
  color: var(--white);
  font-family: var(--landing-font);
  font-size: 20px;
  font-weight: 600;
  line-height: 1.22;
  text-align: left;
  text-decoration: none;
}

.footer-links-row::after {
  content: "";
}

.contest-dialog,
.result-dialog,
.registration-dialog,
.login-dialog {
  width: min(520px, calc(100% - 28px));
  padding: 0;
  border: 0;
  background: transparent;
}

.registration-dialog,
.login-dialog {
  width: min(760px, calc(100% - 28px));
}

.contest-dialog::backdrop,
.result-dialog::backdrop,
.registration-dialog::backdrop,
.login-dialog::backdrop {
  background: rgba(86, 50, 30, 0.54);
  backdrop-filter: blur(4px);
}

.contest-form,
.result-card {
  display: grid;
  gap: 14px;
  padding: clamp(46px, 8vw, 58px) clamp(18px, 5vw, 30px) clamp(22px, 5vw, 30px);
}

.result-card {
  padding-top: clamp(22px, 5vw, 30px);
}

.contest-form {
  text-align: left;
}

.contest-form h2 {
  text-align: center;
}

.registration-form .modal-logo {
  display: none;
}

.registration-form h2 {
  margin: 0;
  color: var(--red);
  font-family: var(--landing-font);
  font-size: 40px;
  font-weight: 700;
  line-height: 1.22;
}

.registration-form {
  gap: 30px;
  padding: clamp(30px, 5vw, 44px) 140px;
  border: 8px solid #facdb7;
  border-radius: 26px;
  box-shadow: 16px 16px 0 rgba(86, 50, 30, 0.12);
}

.registration-subtitle {
  margin: -4px 0 6px;
  color: var(--orange);
  font-family: var(--landing-font);
  font-size: 24px;
  font-weight: 400;
  line-height: 1.22;
  text-align: center;
  white-space: nowrap;
}

.registration-form label {
  gap: 8px;
  color: #32343e;
  font-family: var(--landing-font);
  font-size: 18px;
  font-weight: 600;
}

.registration-form input {
  min-height: 56px;
  padding: 13px 18px;
  border: 3px solid #facdb7;
  border-radius: 14px;
  color: #32343e;
  font-family: var(--landing-font);
  font-size: 18px;
  outline: 0;
}

.registration-form input:focus {
  border-color: var(--orange);
}

.registration-form .primary-button {
  min-height: 58px;
  margin-top: 4px;
  border-color: var(--orange);
  border-radius: 999px;
  background: var(--orange);
  font-family: var(--landing-font);
  font-size: 18px;
  font-weight: 700;
}

.registration-form .close-button {
  top: 14px;
  right: 14px;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 3px solid #facdb7;
  border-radius: 50%;
  color: var(--red);
  background: var(--white);
  font-size: 1.4rem;
}

.dialog-copy,
.result-card p {
  margin-bottom: 2px;
  color: var(--red);
  font-family: var(--accent-font);
  font-weight: 700;
  line-height: 1.45;
  text-align: center;
}

.result-visual {
  width: clamp(74px, 22vw, 104px);
  margin: 0 auto -2px;
}

.result-score {
  padding: 10px 14px;
  border: 3px solid var(--red);
  border-radius: 999px;
  color: var(--red) !important;
  background: var(--white);
}

.result-note {
  margin-top: -6px;
  font-size: 0.9rem;
}

.close-button {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 34px;
  height: 34px;
  border: 2px solid var(--red);
  border-radius: 50%;
  background: var(--white);
  color: var(--red);
  cursor: pointer;
  font-size: 1.35rem;
  line-height: 1;
}

.prize-visual {
  position: relative;
  height: 104px;
  border-radius: 8px;
  background: var(--orange);
  overflow: hidden;
}

.console {
  position: absolute;
  left: 50%;
  top: 18px;
  width: 78px;
  height: 76px;
  border-radius: 10px;
  background: linear-gradient(90deg, #f7f9fb 0 58%, #111827 58% 100%);
  transform: translateX(-70%);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.22);
}

.controller {
  position: absolute;
  left: 50%;
  bottom: 18px;
  width: 128px;
  height: 48px;
  border-radius: 28px 28px 20px 20px;
  background: #f9fafb;
  transform: translateX(-5%);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.22);
}

.controller::before,
.controller::after {
  content: "";
  position: absolute;
  top: 18px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #111827;
}

.controller::before {
  left: 28px;
}

.controller::after {
  right: 30px;
}

label {
  display: grid;
  gap: 7px;
  color: var(--red);
  font-family: var(--accent-font);
  font-size: 0.92rem;
  font-weight: 600;
}

input {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid rgba(86, 50, 30, 0.24);
  border-radius: 8px;
  color: var(--ink);
  background: var(--white);
}

.checkbox-row {
  grid-template-columns: 18px 1fr;
  align-items: start;
  line-height: 1.35;
}

.checkbox-row input {
  min-height: 18px;
  margin-top: 2px;
}

.form-message {
  min-height: 20px;
  margin: 0;
  color: var(--red);
  font-family: var(--accent-font);
  font-weight: 600;
}

@keyframes pop {
  from {
    opacity: 0;
    transform: scale(0.65) rotate(-8deg);
  }
  to {
    opacity: 1;
    transform: scale(1) rotate(0deg);
  }
}

@keyframes letterFall {
  to {
    transform: translateY(calc(min(85.57vw, 510px) + 170px));
  }
}

@keyframes letterBackgroundDrift {
  from {
    background-position: center 0;
  }
  to {
    background-position: center 12%;
  }
}

@keyframes catchPop {
  to {
    opacity: 0;
    transform: scale(1.25) rotate(-8deg);
  }
}

@keyframes missShake {
  30% {
    transform: translateX(-8px) rotate(-6deg);
  }
  65% {
    transform: translateX(8px) rotate(6deg);
  }
  to {
    opacity: 0;
    transform: scale(0.85);
  }
}

@keyframes runnerSpin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes snakeFoodBounce {
  to {
    transform: translateY(-8%) scale(1.06);
  }
}

@keyframes landingCookieFloat {
  from {
    transform: translateY(-10px) rotate(-15deg);
  }
  to {
    transform: translateY(12px) rotate(15deg);
  }
}

@media (max-width: 1180px) {
  .landing-hero {
    padding-inline: clamp(20px, 5vw, 70px);
  }

  .landing-nav {
    grid-template-columns: 1fr;
    height: auto;
    gap: 14px;
  }

  .landing-brand,
  .landing-menu,
  .landing-auth {
    justify-content: center;
  }

  .landing-menu {
    flex-wrap: wrap;
    gap: 16px 32px;
  }

  .landing-content {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .landing-copy {
    max-width: 820px;
    margin: 0 auto;
    padding-top: 34px;
    text-align: center;
  }

  .landing-actions {
    justify-content: center;
  }

  .landing-visual {
    min-height: min(86vw, 826px);
  }

  .landing-boy {
    right: 50%;
    width: min(82vw, 623px);
    transform: translateX(50%);
  }

  .landing-cookie-x {
    right: 8%;
    width: min(28vw, 221px);
  }
}

@media (max-width: 720px) {
  .landing-hero {
    min-height: auto;
    padding: 24px 18px 34px;
  }

  .landing-brand {
    gap: 16px;
  }

  .landing-logo {
    width: min(106px, 34vw);
  }

  .landing-badge {
    width: min(112px, 34vw);
    margin-top: -24px;
  }

  .landing-menu,
  .landing-auth {
    gap: 16px;
    min-height: auto;
    font-size: 16px;
  }

  .landing-auth {
    flex-wrap: wrap;
  }

  .landing-copy h1 {
    font-size: clamp(38px, 11vw, 48px);
  }

  .landing-kicker {
    font-size: clamp(24px, 7vw, 30px);
  }

  .landing-text {
    font-size: clamp(19px, 5.6vw, 24px);
  }

  .landing-button {
    flex: 1 1 0;
    width: auto;
    min-width: 0;
    min-height: 52px;
    padding: 12px 16px;
  }

  .landing-visual {
    min-height: 380px;
  }

  .landing-cookie-x {
    top: 0;
    right: 0;
    width: min(116px, 30vw);
  }

  .registration-form {
    padding: 32px 28px;
  }

  .registration-subtitle {
    font-size: 20px;
    white-space: normal;
  }

  .game-picker {
    margin-top: -12px;
  }

  .game-shell > .play-area {
    margin-top: 64px;
  }

  .game-picker h2 {
    min-width: min(360px, calc(100% - 34px));
    padding: 22px 24px 20px;
    font-size: 28px;
  }

  .game-tabs {
    gap: 12px;
    padding: 14px;
    border-radius: 34px;
  }

  .tab-button {
    min-height: 58px;
    padding: 12px 14px;
    font-size: 16px;
  }

  .rules {
    grid-template-columns: 1fr;
    grid-template-areas:
      "title"
      "list"
      "button";
  }

  .rules-button {
    justify-self: start;
    margin-top: 22px;
  }

  .faq-section {
    gap: 16px;
  }

  .faq-item {
    border-radius: 28px;
  }

  .faq-item summary {
    min-height: 66px;
    gap: 16px;
    font-size: 21px;
  }

  .faq-answer {
    padding-bottom: 20px;
  }

  .site-footer {
    padding-top: 72px;
  }

  .site-footer-inner {
    gap: 54px;
  }

  .footer-brand-row {
    grid-template-columns: auto auto;
    justify-content: center;
    gap: 26px;
  }

  .footer-logo-link,
  .footer-socials {
    grid-column: auto;
  }

  .footer-logo {
    width: 160px;
  }

  .footer-links-row {
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 22px;
    text-align: center;
  }

  .footer-legal {
    justify-content: center;
  }

  .footer-visit {
    min-width: 0;
    text-align: center;
  }
}

@media (max-width: 520px) {
  .brand-logo {
    width: 76px;
  }

  .eyebrow {
    max-width: 160px;
    font-size: 0.74rem;
  }

  h1 {
    font-size: 2.08rem;
    line-height: 1;
  }

  .lead {
    font-size: 0.92rem;
  }

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

  .score-row > div {
    padding: 8px;
  }

  .score-row strong {
    font-size: 1.65rem;
  }

  .letter-hud {
    grid-template-columns: 1fr 0.8fr 0.8fr;
  }

  .letter-hud > div,
  .runner-hud > div,
  .memory-hud > div,
  .snake-hud > div,
  .checkers-hud > div {
    padding: 8px;
  }

  .letter-hud strong,
  .runner-hud strong,
  .memory-hud strong,
  .snake-hud strong,
  .checkers-hud strong {
    font-size: 1.55rem;
  }

  .letter-target {
    gap: 3px;
  }

  .queue-letter {
    font-size: 0.9rem;
  }

  .queue-letter.is-current {
    min-width: 26px;
    font-size: 1.55rem;
  }

  .letter-arena {
    height: 360px;
    min-height: 360px;
  }

  .runner-arena {
    height: 330px;
    min-height: 330px;
  }

  .cell img {
    width: 82%;
    height: 82%;
  }
}
