@font-face {
  font-family: "Fredoka";
  font-style: normal;
  font-weight: 500 700;
  font-display: swap;
  src: url("../fonts/fredoka-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Fredoka";
  font-style: normal;
  font-weight: 500 700;
  font-display: swap;
  src: url("../fonts/fredoka-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

html,
body {
  width: 100%;
  height: auto;
  min-height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  touch-action: pan-y;
}

body { display: block; }

.game-stage {
  position: relative;
  width: 100%;
  height: 100vh;
  height: 100svh;
  min-height: 520px;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.game-stage:fullscreen,
.game-stage:-webkit-full-screen {
  width: 100%;
  height: 100%;
  min-height: 0;
  background: var(--bg, #0a1633);
}

.game-stage canvas {
  display: block;
  margin: 0;
  touch-action: none;
}

.game-stage-tools { display: none; }

@media (min-width: 900px) and (min-aspect-ratio: 1/1) {
  .game-stage-tools {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 3;
    display: flex;
    flex-direction: column;
    gap: 10px;
  }

  .game-stage-tools button,
  .game-stage-tools a {
    width: 46px;
    height: 46px;
    padding: 0;
    display: grid;
    place-items: center;
    border: 1px solid rgba(220, 235, 255, 0.28);
    border-radius: 6px;
    background: rgba(6, 18, 42, 0.72);
    color: #eef6ff;
    box-shadow: 0 8px 24px rgba(3, 10, 24, 0.22);
    font: 700 24px/1 "Segoe UI Symbol", "Segoe UI", sans-serif;
    text-decoration: none;
    cursor: pointer;
    backdrop-filter: blur(8px);
  }

  .game-stage-tools button:hover,
  .game-stage-tools a:hover,
  .game-stage-tools button:focus-visible,
  .game-stage-tools a:focus-visible {
    border-color: rgba(110, 225, 255, 0.9);
    background: rgba(15, 42, 78, 0.92);
    outline: 2px solid rgba(110, 225, 255, 0.72);
    outline-offset: 2px;
  }
}

.game-content {
  --page-accent: #2d60d7;
  --page-ink: #17202a;
  --page-muted: #596675;
  --page-line: #d9e0e8;
  position: relative;
  z-index: 2;
  width: 100%;
  padding: 72px 24px 80px;
  background: #ffffff;
  color: var(--page-ink);
  font-family: "Fredoka", "Segoe UI", system-ui, sans-serif;
  user-select: text;
  touch-action: pan-y;
}

.sort-page .game-content { --page-accent: #087f98; }
.arrow-page .game-content { --page-accent: #087b65; }

.game-content-inner {
  width: min(880px, 100%);
  margin: 0 auto;
}

.game-breadcrumb {
  display: inline-block;
  margin-bottom: 22px;
  color: var(--page-accent);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}

.game-breadcrumb:hover,
.game-breadcrumb:focus-visible { text-decoration: underline; }

.game-content h1 {
  max-width: 15em;
  margin: 0 0 18px;
  font-size: 48px;
  line-height: 1.12;
  letter-spacing: 0;
}

.game-intro {
  max-width: 48em;
  color: var(--page-muted);
  font-size: 19px;
  line-height: 1.7;
}

.game-copy-grid {
  margin-top: 54px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 42px 54px;
}

.game-copy-section h2,
.related-games h2 {
  margin-bottom: 13px;
  font-size: 25px;
  line-height: 1.25;
  letter-spacing: 0;
}

.game-copy-section p,
.game-copy-section li {
  color: var(--page-muted);
  font-size: 16px;
  line-height: 1.7;
}

.game-copy-section ol,
.game-copy-section ul { padding-left: 21px; }
.game-copy-section li + li { margin-top: 8px; }

.game-faq {
  margin-top: 52px;
  padding-top: 44px;
  border-top: 1px solid var(--page-line);
}

.game-faq details { border-bottom: 1px solid var(--page-line); }
.game-faq summary {
  padding: 18px 28px 18px 0;
  font-size: 17px;
  font-weight: 700;
  cursor: pointer;
}
.game-faq details p { padding: 0 0 18px; }

.related-games {
  margin-top: 54px;
  padding-top: 44px;
  border-top: 1px solid var(--page-line);
}

.related-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--page-line);
}

.related-links a {
  padding: 18px 0;
  color: var(--page-ink);
  font-size: 17px;
  font-weight: 700;
  text-decoration: none;
  border-bottom: 1px solid var(--page-line);
}

.related-links a:nth-child(odd) { margin-right: 24px; }
.related-links a:hover,
.related-links a:focus-visible { color: var(--page-accent); }

#analytics-consent {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 1000;
  width: min(420px, calc(100% - 36px));
  padding: 18px;
  background: #ffffff;
  color: #17202a;
  border: 1px solid #d9e0e8;
  border-radius: 6px;
  box-shadow: 0 16px 44px rgba(6, 20, 45, 0.3);
  font-family: "Fredoka", "Segoe UI", system-ui, sans-serif;
  user-select: text;
  touch-action: pan-y;
}
#analytics-consent p { font-size: 15px; line-height: 1.5; }
#analytics-consent > a { display: inline-block; margin-top: 7px; color: #245cc7; font-size: 13px; }
#analytics-consent div { margin-top: 14px; display: flex; justify-content: flex-end; gap: 8px; }
#analytics-consent button {
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid #d9e0e8;
  border-radius: 5px;
  background: #ffffff;
  color: #17202a;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
#analytics-consent [data-consent="granted"] { border-color: #42e575; background: #42e575; color: #07321a; }

.game-privacy { margin-top: 28px; color: var(--page-muted); font-size: 14px; }
.game-privacy a { color: var(--page-accent); }

@media (min-width: 681px) {
  .game-content { padding: 56px 24px 68px; }
  .game-content-inner { width: min(1040px, 100%); }
  .game-breadcrumb { margin-bottom: 17px; font-size: 13px; }
  .game-content h1 {
    margin-bottom: 14px;
    font-size: 38px;
    line-height: 1.15;
  }
  .game-intro {
    max-width: 58em;
    font-size: 16px;
    line-height: 1.6;
  }
  .game-copy-grid {
    margin-top: 40px;
    gap: 34px 64px;
  }
  .game-copy-section h2,
  .related-games h2 {
    margin-bottom: 10px;
    font-size: 20px;
  }
  .game-copy-section p,
  .game-copy-section li {
    font-size: 15px;
    line-height: 1.6;
  }
  .game-copy-section li + li { margin-top: 6px; }
  .game-faq,
  .related-games {
    margin-top: 42px;
    padding-top: 34px;
  }
  .game-faq summary { padding: 15px 28px 15px 0; font-size: 16px; }
  .related-links a { padding: 15px 0; font-size: 16px; }
}

@media (max-width: 680px) {
  .game-content { padding: 54px 20px 64px; }
  .game-content h1 { font-size: 36px; }
  .game-intro { font-size: 17px; }
  .game-copy-grid { margin-top: 42px; grid-template-columns: 1fr; gap: 36px; }
  .related-links { grid-template-columns: 1fr; }
  .related-links a:nth-child(odd) { margin-right: 0; }
}
