@font-face {
  font-family: Manrope;
  src: url("./assets/manrope-variable.ttf") format("truetype");
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
}

:root {
  color-scheme: dark;
  font-family: Manrope, "Segoe UI", sans-serif;
  font-synthesis: none;
  --page: #1e1f20;
  --text: #f0efeb;
  --muted: #96989a;
  --key-width: 286px;
}

* { box-sizing: border-box; }
html { min-width: 280px; scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  background: var(--page);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 5;
  background: url("./assets/grain.svg");
  opacity: .026;
}
button, a, summary { -webkit-tap-highlight-color: transparent; }
button { font: inherit; }
a { color: inherit; text-decoration: none; }
button:disabled { cursor: default; }
button:focus-visible, a:focus-visible, summary:focus-visible {
  outline: 2px solid #e5e4df;
  outline-offset: 7px;
  border-radius: 3px;
}
.svg-library { position: absolute; width: 0; height: 0; overflow: hidden; }
.site-header {
  width: min(100% - 128px, 1400px);
  min-height: 94px;
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 36px;
  position: relative;
  z-index: 6;
}
.wordmark {
  font-size: 25px;
  font-weight: 350;
  letter-spacing: .23em;
  line-height: 1;
  padding-block: 12px;
  white-space: nowrap;
}
.desktop-nav { display: flex; gap: 48px; align-items: center; }
.nav-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 0;
  border: 0;
  background: transparent;
  color: #8d8f91;
  font-size: 14px;
  font-weight: 400;
  white-space: nowrap;
}
.nav-link.is-current { color: var(--text); }
.nav-link.is-current::after {
  content: "";
  position: absolute;
  height: 1px;
  left: 0;
  right: 0;
  bottom: 0;
  background: #eeede8;
}
.lock { width: 12px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.35; }
.mobile-menu { display: none; }
.game {
  width: 100%;
  padding: clamp(24px, 5.5vh, 58px) 24px 36px;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  outline: none;
}
.balance { text-align: center; max-width: 100%; }
.balance h1 {
  margin: 0;
  color: var(--muted);
  font-size: 20px;
  font-weight: 400;
  line-height: 1.4;
}
.balance-value {
  display: inline-flex;
  align-items: baseline;
  justify-content: center;
  max-width: 100%;
  margin-top: 10px;
  font-size: clamp(58px, 6.4vw, 80px);
  line-height: 1.15;
  letter-spacing: -.045em;
  font-weight: 300;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.balance-currency { margin-left: .2em; font-weight: 300; }
.balance-value.is-large { font-size: clamp(30px, 5vw, 64px); }
.balance-value.is-very-large { font-size: clamp(20px, 3.8vw, 44px); }
.key-stage {
  position: relative;
  width: var(--key-width);
  height: calc(var(--key-width) + 24px);
  margin-top: clamp(34px, 6.2vh, 62px);
  flex-shrink: 0;
}
.key-shadow {
  position: absolute;
  left: 9%;
  right: 9%;
  bottom: -2px;
  height: 28px;
  border-radius: 50%;
  background: #000;
  opacity: .52;
  filter: blur(16px);
}
.earn-key {
  display: block;
  position: relative;
  padding: 0;
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 42px;
  background: transparent;
  cursor: pointer;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
  outline-offset: 13px;
}
.earn-key:focus-visible { border-radius: 43px; outline-color: #b0b3b6; }
.key-base {
  position: absolute;
  inset: 15px 0 0;
  border-radius: 44px 44px 40px 40px;
  background:
    linear-gradient(110deg, #2a2c2e 0%, #191b1d 13%, #111315 60%, #181a1c 100%);
  box-shadow:
    inset 1px 1px 1px #66686a,
    inset -1px 0 1px #08090a,
    inset 0 -2px 2px #08090a,
    0 4px 5px #0009,
    0 18px 30px #0003;
}
.key-base::after {
  content: "";
  position: absolute;
  inset: 3px;
  border-radius: inherit;
  background: url("./assets/grain.svg");
  opacity: .065;
  mix-blend-mode: soft-light;
}
.key-face {
  display: flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  inset: 0 12px 52px;
  border: 1px solid #555759;
  border-bottom-color: #151719;
  border-radius: 34px;
  background: linear-gradient(135deg, #454749, #303234 35%, #252729 90%);
  box-shadow:
    inset 1px 1px 2px #d2d2d27a,
    inset 0 2px 1px #ffffff24,
    inset -1px -2px 4px #0008,
    0 3px 2px #0009,
    0 8px 13px #0005;
  transition: transform 85ms ease-out, filter 140ms ease-out;
  will-change: transform;
}
.key-face::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: url("./assets/grain.svg");
  opacity: .32;
  mix-blend-mode: soft-light;
}
.key-symbol {
  position: relative;
  top: -3px;
  color: #e4e4df;
  font-size: calc(var(--key-width) * .49);
  line-height: 1;
  font-weight: 350;
  text-shadow: 0 -1px 1px #0008, 0 1px 0 #ffffff24;
}
@media (hover: hover) {
  .earn-key:hover .key-face { filter: brightness(1.065); }
}
.earn-key:active .key-face, .earn-key.is-pressed .key-face { transform: translateY(10px); }
.click-feedback { position: absolute; inset: 0; pointer-events: none; }
.click-particle {
  position: absolute;
  top: 4px;
  color: #f1f0eb;
  font-size: 25px;
  line-height: 1.2;
  letter-spacing: -.025em;
  font-weight: 400;
  white-space: nowrap;
  text-shadow: 0 0 16px #ffffff1a;
  opacity: 0;
}
.instructions { margin-top: 24px; text-align: center; }
.instructions p { margin: 0; }
.instruction-title { font-size: 20px; font-weight: 400; line-height: 1.5; }
.click-rule { color: var(--muted); font-size: 17px; line-height: 1.5; margin-top: 5px !important; }
.site-footer { text-align: center; padding: 20px 24px 28px; }
.site-footer p { margin: 0; color: var(--muted); font-size: 14px; font-weight: 400; line-height: 1.6; }
#total-clicks { margin-left: 5px; font-variant-numeric: tabular-nums; }
.site-footer .storage-message { margin-top: 8px; font-size: 12px; }
.no-script { max-width: 340px; color: var(--muted); text-align: center; }
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
@media (max-width: 900px) {
  .site-header { width: calc(100% - 64px); }
  .desktop-nav { gap: 26px; }
  .wordmark { font-size: 23px; }
}
@media (max-width: 600px) {
  :root { --key-width: 242px; }
  .site-header { width: calc(100% - 48px); min-height: 82px; gap: 20px; }
  .wordmark { font-size: 20px; }
  .desktop-nav { display: none; }
  .mobile-menu { display: block; font-size: 13px; color: #b4b6b9; }
  .mobile-menu summary { display: flex; align-items: center; gap: 10px; cursor: pointer; list-style: none; padding: 12px 0; }
  .mobile-menu summary::-webkit-details-marker { display: none; }
  .chevron { width: 6px; height: 6px; border-right: 1px solid; border-bottom: 1px solid; transform: rotate(45deg) translateY(-2px); }
  .mobile-menu[open] .chevron { transform: rotate(225deg) translate(-1px, -1px); }
  .mobile-menu-content {
    position: absolute;
    top: calc(100% - 8px);
    right: 0;
    width: min(268px, calc(100vw - 48px));
    display: flex;
    flex-direction: column;
    padding: 10px;
    background: #282a2c;
    border: 1px solid #3c3e40;
    border-radius: 14px;
    box-shadow: 0 16px 36px #0004;
  }
  .mobile-nav-link { display: flex; justify-content: space-between; align-items: center; padding: 13px 12px; color: #96989b; font-size: 14px; background: none; border: 0; text-align: left; }
  .mobile-nav-link.is-current { color: var(--text); }
  .menu-note { color: #96989b; border-top: 1px solid #3c3e40; font-size: 11px; margin: 4px 12px 0; padding: 13px 0 4px; }
  .game { padding: clamp(16px, 3.7vh, 34px) 24px 30px; }
  .balance h1 { font-size: 18px; }
  .balance-value { font-size: 68px; margin-top: 7px; }
  .key-stage { margin-top: clamp(40px, 7.2vh, 62px); }
  .key-face { inset-inline: 10px; bottom: 45px; border-radius: 29px; }
  .key-base { border-radius: 38px 38px 34px 34px; }
  .earn-key { border-radius: 38px; }
  .instructions { margin-top: 23px; }
  .instruction-title { font-size: 18px; }
  .click-rule { font-size: 15px; }
  .site-footer { padding-bottom: max(24px, env(safe-area-inset-bottom)); }
  .site-footer p { font-size: 13px; }
}
@media (max-height: 790px) and (min-width: 601px) {
  :root { --key-width: 242px; }
  .site-header { min-height: 80px; }
  .game { padding-top: 18px; padding-bottom: 22px; }
  .balance-value { font-size: 68px; }
  .key-stage { margin-top: 32px; }
  .key-face { bottom: 45px; }
  .instructions { margin-top: 16px; }
  .site-footer { padding: 12px 24px 22px; }
}
@media (max-height: 700px) and (max-width: 600px) {
  :root { --key-width: 210px; }
  .site-header { min-height: 70px; }
  .game { padding-top: 9px; padding-bottom: 20px; }
  .balance-value { font-size: 59px; }
  .key-stage { margin-top: 34px; }
  .key-face { bottom: 40px; border-radius: 26px; }
  .key-base { border-radius: 34px; }
  .instructions { margin-top: 16px; }
  .site-footer { padding-top: 10px; padding-bottom: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
.earn-key:disabled { cursor: wait; }
