@font-face {
  font-family: Manrope;
  src: url("/manrope-cyrillic.woff2") format("woff2");
  font-weight: 200 800;
  font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: Manrope;
  src: url("/manrope-latin.woff2") format("woff2");
  font-weight: 200 800;
  font-display: swap;
  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+2074, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --bg: #f6f9fa;
  --text: #141821;
  --dark: #252d3a;
  --accent: #244ba8;
  --ease: cubic-bezier(0.19, 1, 0.22, 1);
  font-family: Manrope, Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  font-synthesis: none;
  font-variant-numeric: tabular-nums;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  min-width: 0;
}
a {
  color: inherit;
  text-decoration: none;
}
button,
input,
select {
  font: inherit;
  color: inherit;
}
button,
a,
input,
select,
summary {
  -webkit-tap-highlight-color: transparent;
}
button,
a,
summary {
  touch-action: manipulation;
}
button,
summary {
  cursor: pointer;
}
:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 4px;
}
p,
h1,
h2,
h3 {
  margin: 0;
}
p {
  line-height: 1.65;
}
h1 {
  font-size: clamp(32px, 6vw, 44px);
  line-height: 1.12;
  letter-spacing: -0.055em;
}
h2 {
  font-size: 24px;
  letter-spacing: -0.035em;
  line-height: 1.2;
}
h3 {
  font-size: 16px;
}
.shell {
  max-width: 1280px;
  width: calc(100% - 32px);
  margin-inline: auto;
}
.bar {
  border-bottom: 1px solid color-mix(in srgb, var(--text) 17%, transparent);
}
.bar-inner {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding-block: 12px;
}
.brand,
.wallet-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
}
.brand {
  font-size: 24px;
  letter-spacing: -0.06em;
}
.logo {
  display: grid;
  place-items: center;
  background: var(--accent);
  color: var(--bg);
  width: 36px;
  height: 36px;
  border-radius: 8px;
  font-size: 28px;
  line-height: 1;
}
nav {
  display: flex;
  gap: 4px;
  align-items: center;
}
nav a,
.tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 8px 12px;
  border-radius: 7px;
  font-weight: 600;
}
nav a[aria-current],
.tab.active {
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 9%, transparent);
}
.wallet-link {
  border: 1px solid var(--accent);
  color: var(--accent);
  padding: 10px 12px;
  border-radius: 8px;
  min-height: 44px;
}
.wallet-link span:first-child {
  white-space: nowrap;
}
main {
  min-height: 69vh;
  padding-block: 38px 30px;
}
.hero {
  display: grid;
  gap: 22px;
  padding: 26px;
  background: var(--dark);
  color: var(--bg);
  border-radius: 12px;
  overflow: hidden;
}
.hero-copy {
  display: grid;
  align-content: center;
  gap: 15px;
  max-width: 640px;
}
.hero-copy p {
  max-width: 520px;
}
.hero a {
  justify-self: start;
}
.eyebrow {
  font-size: 14px;
  letter-spacing: 0.065em;
  font-weight: 700;
}
.hero canvas {
  width: 100%;
  max-height: 204px;
  object-fit: contain;
  align-self: center;
}
.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  margin: 36px 0 15px;
}
.cards {
  display: grid;
  gap: 16px;
}
.card,
.panel {
  border: 1px solid color-mix(in srgb, var(--text) 18%, transparent);
  border-radius: 10px;
  overflow: hidden;
}
.card {
  display: grid;
  grid-template-rows: auto 1fr;
  transition: transform 200ms var(--ease);
}
.card:active,
.btn:active {
  transform: scale(0.98);
}
.art {
  width: 100%;
  height: auto;
  display: block;
  aspect-ratio: 16/8;
  background: var(--dark);
  transform-origin: bottom;
}
.card-content {
  display: grid;
  gap: 8px;
  padding: 15px;
}
.card-title {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.035em;
}
.card-content p,
.muted,
.hint {
  font-size: 14px;
}
.muted,
.hint {
  color: color-mix(in srgb, var(--text) 86%, var(--bg));
}
.heading {
  display: grid;
  gap: 9px;
  margin-bottom: 20px;
}
.crumb {
  justify-self: start;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  color: var(--accent);
  font-weight: 700;
}
.game-layout,
.split {
  display: grid;
  gap: 18px;
  align-items: start;
}
.panel {
  padding: 18px;
  overflow: visible;
}
.stack {
  display: grid;
  gap: 14px;
}
.board {
  min-height: 300px;
  background: var(--dark);
  border-radius: 12px;
  color: var(--bg);
  display: grid;
  place-items: center;
  position: relative;
  padding: 18px;
  gap: 12px;
  align-content: center;
  overflow: hidden;
}
.board canvas {
  width: 100%;
  max-height: 330px;
  object-fit: contain;
  display: block;
}
.board .large {
  font-size: clamp(32px, 9vw, 72px);
  letter-spacing: -0.065em;
  font-weight: 700;
  line-height: 1;
}
.grid-game {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 7px;
  width: min(100%, 400px);
}
.grid-game.tower {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.cell {
  min-height: 44px;
  aspect-ratio: 1;
  border: 1px solid var(--bg);
  color: var(--bg);
  background: transparent;
  border-radius: 7px;
  font-weight: 700;
}
.cell:focus-visible,
.hero a:focus-visible {
  outline-color: var(--bg);
}
.cell.hit {
  background: var(--bg);
  color: var(--dark);
}
.cell[disabled] {
  opacity: 0.75;
  cursor: default;
}
.field {
  display: grid;
  gap: 7px;
  font-weight: 600;
}
input:not([type="checkbox"]),
select {
  width: 100%;
  min-width: 0;
  min-height: 46px;
  border: 1px solid color-mix(in srgb, var(--text) 42%, transparent);
  border-radius: 7px;
  background: var(--bg);
  padding: 8px 10px;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: var(--bg);
  padding: 9px 15px;
  border-radius: 7px;
  font-weight: 700;
  transition:
    transform 200ms var(--ease),
    opacity 200ms;
}
.btn.alt {
  background: var(--bg);
  color: var(--accent);
}
.btn:disabled {
  opacity: 0.55;
  cursor: wait;
}
.hero .btn {
  background: var(--bg);
  color: var(--dark);
  border-color: var(--bg);
}
.horizontal,
.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.tab {
  border: 0;
  background: transparent;
}
.metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(92px, 1fr));
  gap: 9px;
  margin: 0;
}
.metrics div {
  border-top: 1px solid color-mix(in srgb, var(--text) 20%, transparent);
  padding-top: 8px;
}
.metrics dt {
  font-size: 14px;
}
.metrics dd {
  margin: 4px 0 0;
  font-weight: 700;
  overflow-wrap: anywhere;
}
.stats {
  padding: 10px;
  border-radius: 8px;
  background: color-mix(in srgb, var(--accent) 7%, transparent);
  overflow-wrap: anywhere;
}
.history {
  display: grid;
  gap: 8px;
  padding: 0;
  margin: 0;
  list-style: none;
}
.history li {
  display: grid;
  gap: 4px;
  border-top: 1px solid color-mix(in srgb, var(--text) 20%, transparent);
  padding: 12px 0;
  overflow-wrap: anywhere;
}
.history .horizontal {
  justify-content: space-between;
}
details summary {
  padding-block: 10px;
  font-weight: 700;
}
details dl {
  overflow-wrap: anywhere;
}
.inventory {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
}
.inventory canvas {
  max-height: 120px;
  object-fit: contain;
  background: var(--dark);
  width: 100%;
  border-radius: 7px;
}
.feedback {
  min-height: 42px;
  color: var(--accent);
  font-weight: 700;
  overflow-wrap: anywhere;
}
body:has(.feedback-inline) .feedback {
  position: absolute;
  width: 1px;
  height: 1px;
  min-height: 0;
  overflow: hidden;
  clip-path: inset(50%);
}
.feedback-inline:empty {
  display: none;
}
.feedback-inline {
  color: var(--accent);
  font-weight: 700;
  overflow-wrap: anywhere;
}
.footer {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
  border-top: 1px solid color-mix(in srgb, var(--text) 20%, transparent);
  padding-block: 18px;
  font-size: 14px;
}
.skip {
  position: absolute;
  left: 12px;
  top: 12px;
  transform: translateY(-160%);
  background: var(--bg);
  padding: 12px;
  z-index: 2;
}
.skip:focus {
  transform: none;
}
.intro {
  animation: intro 1s var(--ease) both;
  animation-delay: var(--delay, 0s);
}
@keyframes intro {
  from {
    opacity: 0;
    transform: translateY(50px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@media (hover: hover) {
  .btn:not(:disabled):hover {
    opacity: 0.86;
    transform: translateY(-2px);
  }
  .card:hover {
    transform: translateY(-3px);
  }
  nav a:hover,
  .crumb:hover,
  .footer a:hover {
    color: var(--accent);
    text-decoration: underline;
  }
  .cell:not(:disabled):hover {
    opacity: 0.7;
  }
}
@media (max-width: 639px) {
  .bar-inner {
    gap: 8px;
  }
  .bar-inner nav {
    order: 3;
    flex: 1 0 100%;
    justify-content: space-between;
  }
  .wallet-link {
    font-size: 14px;
    gap: 4px;
    flex-direction: column;
    padding: 5px 8px;
  }
  .hero {
    padding: 20px;
  }
  .hero canvas {
    max-height: 132px;
  }
  main {
    padding-top: 22px;
  }
}
@media (min-width: 640px) {
  .shell {
    width: calc(100% - 64px);
  }
  .cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .hero {
    grid-template-columns: 1.2fr 1fr;
    padding: 34px;
  }
}
@media (min-width: 980px) {
  .shell {
    width: calc(100% - 96px);
  }
  .cards {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .hero {
    padding: 48px;
  }
  .game-layout {
    grid-template-columns: minmax(0, 1fr) minmax(300px, 0.43fr);
  }
  .game-controls {
    grid-column: 2;
    grid-row: 1 / span 2;
  }
  .game-details {
    grid-column: 1;
  }
  .split {
    grid-template-columns: minmax(0, 0.75fr) minmax(0, 1fr);
  }
  .board {
    min-height: 450px;
  }
  .panel {
    padding: 22px;
  }
}
@media (max-width: 979px) {
  .game-layout .board {
    min-height: 224px;
  }
  .game-layout .board canvas {
    max-height: 215px;
  }
}
@media (max-width: 639px) {
  .hero {
    gap: 8px;
  }
  .hero canvas {
    max-height: 104px;
  }
  .board {
    padding: 14px;
  }
  .cell {
    min-height: 44px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-delay: 0s !important;
    transition-duration: 0.01ms !important;
  }
}
.reduce *,
.reduce *::before,
.reduce *::after {
  animation-duration: 0.01ms !important;
  animation-delay: 0s !important;
  transition-duration: 0.01ms !important;
}
