/* =========================================================================
   SUNDERZ // landing
   ========================================================================= */

/* ---------- fonts ---------- */
@font-face {
  font-family: 'Golos Text';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url('assets/fonts/golos-cyrillic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Golos Text';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url('assets/fonts/golos-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: 'Golos Text';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url('assets/fonts/golos-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-20C4, U+2113, U+2C60-2C7F,
    U+A720-A7FF;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url('assets/fonts/inter-latin-300.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: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('assets/fonts/jetbrains-cyrillic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('assets/fonts/jetbrains-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: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('assets/fonts/jetbrains-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-20C4, U+2113, U+2C60-2C7F,
    U+A720-A7FF;
}
@font-face {
  font-family: 'Tektur';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('assets/fonts/tektur-cyrillic-ext.woff2') format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F,
    U+FE2E-FE2F;
}
@font-face {
  font-family: 'Tektur';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('assets/fonts/tektur-cyrillic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Tektur';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('assets/fonts/tektur-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-20C4, U+2113, U+2C60-2C7F,
    U+A720-A7FF;
}
@font-face {
  font-family: 'Tektur';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('assets/fonts/tektur-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;
}

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

:root {
  --bg: #050505;
  --ink: #f1efed;
  --ink-soft: #c9c5c2;
  --muted: #8f8b88;
  --muted-2: #6c6967;
  --line: rgba(255, 255, 255, 0.14);
  --line-strong: rgba(255, 255, 255, 0.3);
  --white: #f0eeec;
  --glass: rgba(20, 17, 17, 0.78);
  --cyan: #67e7f1;
  --green: #55e07e;
  --red: #c00d1f;
  --gold: #e8b83f;
  --brand-size: 70.72px;
  --brand-radius: 10px;
  --font-body: 'Golos Text', 'Segoe UI', system-ui, sans-serif;
  --font-light: 'Inter', 'Golos Text', 'Segoe UI', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'Cascadia Mono', monospace;
  --font-display: 'Tektur', 'JetBrains Mono', ui-monospace, monospace;
  --topbar-shift: calc(26.6875px + 0.25 * clamp(44px, 6.5vw, 125px));
  --content-w: 800px;
  --card-w: clamp(240px, 29.5vh, calc((var(--content-w) - var(--row-gap) * 2) / 3));
  --card-radius: 20px;
  --row-gap: 12px;
  --cards-w: calc(var(--card-w) * 3 + var(--row-gap) * 2);
  --flow-gap: clamp(30px, 4.6vh, 48px);
}

html {
  min-height: 100%;
  background: #050505;
  color-scheme: dark;
  scrollbar-color: rgba(255, 255, 255, 0.28) transparent;
  /* Font fitting and the boot gate change block heights; anchoring those
     changes would move the restored scroll position. */
  overflow-anchor: none;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  color: var(--ink);
  background: var(--bg);
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.modal-open {
  overflow: hidden;
}

button,
input {
  font: inherit;
}

button {
  color: inherit;
}

img,
svg {
  display: block;
}

[hidden] {
  display: none !important;
}

::selection {
  color: #090909;
  background: #e7e2dd;
}

/* ---------- animated smoke backdrop ---------- */
.backdrop {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  background: radial-gradient(120% 100% at 50% 20%, #141416 0%, #070708 48%, #020202 100%);
}

.backdrop canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.92;
  filter: blur(1.2px);
}

.backdrop__tint {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(46% 54% at 50% 53%, rgba(0, 0, 0, 0.58) 0%, rgba(0, 0, 0, 0.14) 58%, transparent 82%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.22) 0%, transparent 26%, transparent 66%, rgba(0, 0, 0, 0.46) 100%),
    radial-gradient(130% 120% at 50% 50%, transparent 52%, rgba(0, 0, 0, 0.46) 100%);
}

.backdrop__grain {
  position: absolute;
  inset: -60%;
  opacity: 0.055;
  mix-blend-mode: screen;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.92' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.6'/%3E%3C/svg%3E");
  animation: grainShift 7s steps(7) infinite;
  will-change: transform;
}

.backdrop__dim {
  position: absolute;
  inset: 0;
  background: #000;
  opacity: 0;
  pointer-events: none;
}

@keyframes grainShift {
  0% { transform: translate3d(0, 0, 0); }
  14% { transform: translate3d(-2.1%, 1.3%, 0); }
  28% { transform: translate3d(1.7%, -2.2%, 0); }
  42% { transform: translate3d(-1.2%, -1.1%, 0); }
  56% { transform: translate3d(2.4%, 1.8%, 0); }
  70% { transform: translate3d(1.1%, -1.6%, 0); }
  84% { transform: translate3d(-2.4%, 0.7%, 0); }
  100% { transform: translate3d(0, 0, 0); }
}

/* soft moving fog layers (fallback + atmosphere) */
.backdrop__fog {
  position: absolute;
  inset: -20%;
  opacity: 0.34;
  filter: blur(30px);
  background:
    radial-gradient(38% 36% at 16% 22%, rgba(150, 150, 152, 0.32), transparent 70%),
    radial-gradient(30% 34% at 84% 16%, rgba(120, 120, 123, 0.22), transparent 72%),
    radial-gradient(34% 30% at 78% 82%, rgba(100, 100, 104, 0.24), transparent 72%),
    radial-gradient(30% 34% at 12% 82%, rgba(125, 125, 128, 0.2), transparent 70%);
  animation: fogDrift 36s ease-in-out infinite alternate;
}

@keyframes fogDrift {
  0% { transform: translate3d(-2%, -1%, 0) scale(1.04) rotate(-1deg); }
  50% { transform: translate3d(1.6%, 1.2%, 0) scale(1.09) rotate(1deg); }
  100% { transform: translate3d(-1%, 2%, 0) scale(1.05) rotate(-0.5deg); }
}

/* ---------- page scaffold ---------- */
.page {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.topbar {
  position: relative;
  z-index: 20;
  flex: none;
  height: auto;
  padding: 28px 0 0;
}

main {
  display: contents;
}

.flow-gap {
  flex: 1.22 1 0;
  min-height: var(--flow-gap);
}

/* The first two spacers are 10% tighter than the original equal spacing;
   both stay identical, so the download-to-cards gap matches the logo gap. */
.flow-gap--top {
  flex-grow: 1;
  min-height: calc(var(--flow-gap) * 0.9);
}

.topbar__inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: start;
  column-gap: clamp(44px, 6.5vw, 125px);
}

.online {
  display: flex;
  align-items: center;
  justify-content: center;
  justify-self: end;
  gap: 5px;
  width: min(118px, 100%);
  height: 44px;
  margin-top: 13.36px;
  margin-right: calc(-1 * var(--topbar-shift));
  padding: 0;
  border: 0;
  background: none;
  color: #e7e3e0;
  font: 300 13px/1 var(--font-light);
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: color 0.18s ease;
}

.online svg {
  width: 16px;
  height: 16px;
  flex: none;
  opacity: 0.95;
}

.online:hover {
  color: #fff;
}

.brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7.5px;
  width: 104px;
  color: #f3f1ed;
  text-decoration: none;
}

.brand__mark {
  display: grid;
  place-items: center;
  width: var(--brand-size);
  height: var(--brand-size);
  border-radius: var(--brand-radius);
  background: rgba(8, 8, 8, 0.74);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: background 0.2s ease;
}

/* The logo rises out of this clipped window, so it appears from under the
   mark's bottom edge instead of sliding over the page. */
.brand__logo-window {
  display: block;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: inherit;
}

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

.brand:hover .brand__mark {
  background: rgba(12, 12, 12, 0.86);
}

/* inverted mark: dark silhouette on a light tile */
.brand--inverted .brand__mark {
  background: #f2efeb;
}

.brand--inverted .brand__mark img {
  filter: invert(1);
}

.brand--inverted:hover .brand__mark {
  background: #fff;
}

/* The wordmark falls in from above; the clip keeps it invisible until the
   delayed animation starts. */
.brand__wordmark-clip {
  display: block;
  height: 11px;
  overflow: hidden;
}

.brand__wordmark {
  display: block;
  height: 11px;
  padding-left: 0.24em;
  color: #d8d4d1;
  font: 400 11px/11px var(--font-display);
  letter-spacing: 0.24em;
  text-transform: uppercase;
  white-space: nowrap;
}

.login {
  display: flex;
  align-items: center;
  justify-content: center;
  justify-self: start;
  width: min(101px, 100%);
  height: 44px;
  margin-top: 13.36px;
  margin-left: calc(-1 * var(--topbar-shift));
  padding: 0;
  border: 0;
  background: none;
  color: #e7e3e0;
  font: 300 13px/1 var(--font-light);
  letter-spacing: 0.03em;
  cursor: pointer;
  transition: color 0.18s ease;
}

.login:hover {
  color: #fff;
}

/* ---------- personal account (signed-in header) ---------- */
.account {
  --account-panel-bg: linear-gradient(180deg, rgba(22, 21, 22, 0.6) 0%, rgba(8, 8, 9, 0.74) 100%);
  --account-panel-border: rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: stretch;
  justify-self: start;
  gap: 10px;
  height: var(--brand-size);
  margin-left: calc(-1 * var(--topbar-shift));
  padding-left: 29.7px;
}

.account__name {
  align-self: center;
  max-width: 100px;
  margin-right: 20px;
  overflow: hidden;
  color: #e6dfe4;
  font: 400 13px/1 var(--font-mono);
  font-variant-ligatures: none;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: pre;
  text-overflow: ellipsis;
}

.account__level {
  position: relative;
  display: flex;
  flex: none;
  flex-direction: column;
  justify-content: flex-start;
  width: 137px;
  height: 100%;
  padding: 9px 12px 12px;
  border: 1px solid var(--account-panel-border);
  border-radius: var(--brand-radius);
  background: var(--account-panel-bg);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.account__level-row {
  position: relative;
  top: 2px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px;
  color: rgba(235, 230, 226, 0.55);
  font: 700 10px/1 var(--font-mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
}

.account__level-state {
  display: flex;
  align-items: baseline;
  gap: 4px;
  color: #e6dfe4;
}

.account__level-value {
  color: inherit;
  font-weight: inherit;
}

.account__level-next-group {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.account__level-arrow {
  color: rgba(235, 230, 226, 0.38);
  font: 700 11px/1 var(--font-light);
  letter-spacing: 0;
}

.account__level-next {
  color: rgba(235, 230, 226, 0.68);
  font-weight: inherit;
}

.account__progress {
  position: static;
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 12.65px;
  margin-top: auto;
  outline: none;
  cursor: default;
}

.account__bar {
  width: auto;
  min-width: 0;
  height: 100%;
  flex: 1 1 0;
  border-radius: 1px;
  background: rgba(255, 255, 255, 0.22);
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.account__bar.is-filled {
  background: #f1efed;
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.26);
}

.account__bar.is-next {
  background: rgba(255, 255, 255, 0.46);
}

.account__progress:hover .account__bar.is-filled {
  background: #fff;
}

.account__progress:hover .account__bar.is-next {
  background: rgba(255, 255, 255, 0.62);
}

.account__progress:focus-visible {
  outline: 1px solid rgba(255, 255, 255, 0.6);
  outline-offset: 4px;
  border-radius: 2px;
}

.account__tip {
  position: absolute;
  top: calc(100% + 9px);
  left: 50%;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  padding: 1px 10px 0;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 5px;
  background: rgba(10, 9, 9, 0.94);
  color: #f3efec;
  font: 700 9px/1 var(--font-mono);
  letter-spacing: 0.08em;
  text-align: center;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translate(-50%, -3px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: opacity 0.15s ease, transform 0.15s ease, visibility 0s linear 0.15s;
}

.account__progress:hover .account__tip,
.account__progress:focus-visible .account__tip {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
  transition: opacity 0.15s ease, transform 0.15s ease, visibility 0s;
}

.account__signout {
  display: flex;
  flex: none;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0;
  height: 100%;
  min-width: 101px;
  padding: 12px 14px 13px;
  border: 1px solid var(--account-panel-border);
  border-radius: var(--brand-radius);
  background: var(--account-panel-bg);
  color: #e6dfe4;
  font: 700 10px/1 var(--font-mono);
  letter-spacing: 0.12em;
  text-align: left;
  text-transform: uppercase;
  white-space: nowrap;
  cursor: pointer;
  transition: border-color 0.18s ease, background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.account__signout svg {
  width: 13px;
  height: 13px;
  flex: none;
  opacity: 0.92;
  transform: translateY(2px);
}

.account__signout span {
  display: block;
}

.account__signout:hover {
  border-color: rgba(255, 255, 255, 0.16);
  background: linear-gradient(180deg, rgba(35, 33, 33, 0.66) 0%, rgba(12, 12, 13, 0.8) 100%);
  color: #fff;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.24);
}

.account__signout:active {
  transform: translateY(1px);
}

/* menu labels: text decode + a short pixel-glitch mosaic on hover */
.glitch-defs {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
  pointer-events: none;
}

.pixel-label {
  position: relative;
  display: inline-block;
}

.pixel-label[data-scramble] {
  --pixel-glitch-duration: 209ms;
  color: #e6dfe4;
  font-family: var(--font-mono);
  font-weight: 400;
  font-variant-ligatures: none;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: pre;
}

.is-pixel-glitching {
  animation: pixelTextGlitch var(--pixel-glitch-duration, 209ms) step-end both;
  will-change: filter;
}

/* ambient interference: slow decode + a longer 3-frame pixel mosaic */
.is-idle-scrambling,
.is-text-morphing {
  font-variant-ligatures: none;
  text-transform: uppercase;
  white-space: pre;
}

.games__tagline span.is-idle-scrambling,
.games__tagline span.is-text-morphing {
  white-space: pre;
}

.text-noise-cell {
  display: inline-block;
  font: inherit;
  font-synthesis: none;
  line-height: inherit;
  letter-spacing: inherit;
  text-align: left;
  white-space: pre;
  vertical-align: baseline;
}

.games__tagline .text-noise-cell {
  position: static;
  top: auto;
  white-space: pre;
}

.is-idle-glitching {
  animation: pixelTextGlitch var(--idle-glitch-duration, 240ms) step-end both;
  will-change: filter;
}

@keyframes pixelTextGlitch {
  0% { filter: url(#pixelGlitchA); }
  33.333% { filter: url(#pixelGlitchB); }
  66.666% { filter: url(#pixelGlitchC); }
  100% { filter: none; }
}

.lang {
  position: absolute;
  top: 41.4px;
  right: 40px;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.2);
  color: #d8d4d1;
  font: 300 11px/1 var(--font-light);
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: border-color 0.18s ease, color 0.18s ease, background 0.18s ease;
}

.lang:hover {
  border-color: rgba(255, 255, 255, 0.6);
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
}

/* ---------- hero / download ---------- */
/* the button sits in the space between the logo and the game cards */
.hero {
  display: flex;
  flex: none;
  justify-content: center;
  margin: 0;
}

.download {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 40.28px;
  min-width: 143px;
  padding: 0 24px;
  border: 0;
  border-radius: 10px;
  background: #f2efeb;
  color: #16171a;
  font: 500 12px/1 var(--font-body);
  letter-spacing: 0.08em;
  cursor: pointer;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.95),
    inset 0 -1px 0 rgba(0, 0, 0, 0.1),
    0 10px 30px rgba(0, 0, 0, 0.26);
  white-space: nowrap;
  transition:
    background-color 0.4s cubic-bezier(0.22, 0.31, 0, 1),
    box-shadow 0.4s cubic-bezier(0.22, 0.31, 0, 1);
}

.download::after {
  content: '';
  position: absolute;
  top: -50%;
  bottom: -50%;
  left: -45%;
  z-index: 2;
  width: 36px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.55) 30%, rgba(255, 255, 255, 0.55) 70%, rgba(255, 255, 255, 0) 100%);
  transform: rotate(15deg);
  pointer-events: none;
}

.download > * {
  position: relative;
  z-index: 1;
}

.download:focus-visible {
  outline: 1px solid #16171a;
  outline-offset: -3px;
}

.download svg {
  width: 11px;
  height: 12px;
  flex: none;
}

@keyframes downloadShine {
  from { left: -45%; }
  to { left: 125%; }
}

@media (min-width: 1025px) {
  .download:hover {
    background-color: #fff;
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.98),
      inset 0 -1px 0 rgba(0, 0, 0, 0.1),
      0 16px 38px rgba(0, 0, 0, 0.38),
      0 0 24px rgba(255, 255, 255, 0.18);
  }

  .download:hover::after {
    animation: downloadShine 0.9s cubic-bezier(0.22, 0.31, 0, 1) forwards;
  }
}

/* ---------- games ---------- */
/* the title row aligns with the reference line above the cards */
.games {
  flex: none;
  width: var(--cards-w);
  max-width: 100%;
  margin: 0 auto;
}

.game-row {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  width: 100%;
  gap: var(--row-gap);
}

.games__tagline {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: var(--cards-w);
  max-width: 100%;
  margin: 0 auto;
  padding: 0;
  color: #f1efed;
  font: 400 clamp(22px, 5.5vw, 58px)/0.74 var(--font-display);
  letter-spacing: 0;
  text-align: center;
  text-transform: uppercase;
  white-space: nowrap;
}

.games__tagline span {
  position: relative;
  top: 1px;
  display: inline-block;
  white-space: nowrap;
}

.game {
  display: flex;
  flex: 0 0 var(--card-w);
  flex-direction: column;
  width: var(--card-w);
}

.game__name {
  margin: 0 0 8px 6px;
  color: #cecac6;
  font: 500 10.5px/1 var(--font-mono);
  letter-spacing: 0.135em;
  text-transform: uppercase;
  transition: color 0.2s ease;
}

.game--active .game__name {
  color: #f0edeb;
}

.game__card {
  --tilt-x: 0deg;
  --tilt-y: 0deg;
  position: relative;
  width: 100%;
  height: calc(var(--card-w) * 1.54);
  overflow: hidden;
  border: 0;
  border-radius: var(--card-radius);
  background: #101010;
  transform: perspective(1000px) rotateX(var(--tilt-x)) rotateY(var(--tilt-y));
  transform-origin: 50% 50%;
  transition: transform 0.45s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
}

.game__card[data-game-card] {
  cursor: pointer;
}

/* the card reacts to the cursor almost instantly while it is being tracked,
   then eases back into place once the pointer leaves */
.game__card.is-tilting {
  z-index: 2;
  transition: transform 0.09s linear;
}

.game__card::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 2;
  border-radius: var(--card-radius);
  background: radial-gradient(130% 105% at 50% 48%, transparent 45%, rgba(0, 0, 0, 0.22) 72%, rgba(0, 0, 0, 0.55) 100%);
  box-shadow: inset 0 0 38px rgba(0, 0, 0, 0.5);
  pointer-events: none;
}

.game__top,
.game__rating {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  z-index: 3;
  height: 82px;
  padding: 14px 16px 0;
  overflow: hidden;
  border-radius: var(--card-radius) var(--card-radius) 0 0;
  background: linear-gradient(180deg, rgba(8, 9, 11, 0.62) 0%, rgba(8, 9, 11, 0.32) 64%, rgba(8, 9, 11, 0.04) 100%);
  -webkit-mask-image: linear-gradient(180deg, #000 0%, #000 88%, transparent 100%);
  mask-image: linear-gradient(180deg, #000 0%, #000 88%, transparent 100%);
}

.game__status {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 6px;
  height: 24px;
  color: #f7f4f1;
  font: 400 11px/1 var(--font-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.32);
}

.game__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 9px rgba(103, 231, 241, 0.9);
}

.game__dot--green {
  background: var(--green);
  box-shadow: 0 0 9px rgba(85, 224, 126, 0.82);
}

.game__art {
  position: absolute;
  inset: 0;
  z-index: 1;
  overflow: hidden;
  background: #121212;
  /* flatten the artwork and its scrim so the rounded card clip doesn't
     leave a light antialiased fringe along the corners */
  filter: brightness(1);
}

.game__art-img {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transform: translate(-50%, -50%);
  user-select: none;
  -webkit-user-drag: none;
}

/* reading scrims for the status row and the select strip */
.game__art::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  /* the lower fade is unchanged; toward the top the scrim ramps up to 0.78
     (50% stronger than the previous 0.52 limit) */
  background:
    linear-gradient(180deg,
      rgba(0, 0, 0, 0.78) 0%,
      rgba(0, 0, 0, 0.56) 9%,
      rgba(0, 0, 0, 0.36) 15%,
      rgba(0, 0, 0, 0.18) 22%,
      rgba(0, 0, 0, 0.07) 28%,
      transparent 36%),
    linear-gradient(0deg, rgba(0, 0, 0, 0.62) 0%, rgba(0, 0, 0, 0.24) 16%, transparent 34%);
  pointer-events: none;
}

/* APEX — dark brand tile with the red mark centred inside it */
.game--apex .game__art {
  background: #211e1e;
}

.game--apex .game__art-img {
  top: 53%;
  width: 72%;
  height: auto;
  object-fit: contain;
}

/* POINT BLANK — portrait key art, keep the faces in frame */
.game--pointblank .game__art-img {
  object-position: center 20%;
}

.rating__line,
.rating__meta {
  position: relative;
  z-index: 1;
}

.rating__line {
  display: flex;
  align-items: baseline;
  gap: 6px;
  line-height: 1;
}

.rating__value {
  font: 600 24px/1 var(--font-body);
  letter-spacing: -0.04em;
  color: #f7f4f1;
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.38);
}

.rating__of {
  font: 500 10px/1 var(--font-mono);
  color: rgba(255, 255, 255, 0.56);
}

.rating__meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 9px;
  color: rgba(245, 241, 238, 0.8);
}

.rating__stars {
  display: flex;
  gap: 2px;
  color: #e9b940;
  font-size: 10px;
  letter-spacing: 0;
  text-shadow: 0 1px 5px rgba(0, 0, 0, 0.35);
}

.rating__badge {
  position: relative;
  top: 1px;
  display: inline-flex;
  align-items: center;
  height: 19px;
}

.rating__badge i {
  display: grid;
  place-items: center;
  width: 19px;
  height: 19px;
  padding: 1px 0 0;
  border: 1px solid rgba(255, 255, 255, 0.17);
  border-radius: 50%;
  background: rgba(14, 13, 13, 0.9);
  color: #f1eeeb;
  font: 600 6.5px/1 var(--font-mono);
  font-style: normal;
  letter-spacing: 0;
}

.rating__badge i span {
  display: block;
  transform: translateY(-0.25px);
}

.rating__badge i:first-child span {
  transform: translate(-1px, -0.25px);
}

.rating__badge i + i {
  margin-left: -5px;
}

.rating__reviews {
  position: relative;
  top: 2px;
  padding: 0;
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.62);
  background: none;
  color: rgba(247, 243, 240, 0.92);
  font: 600 9px/1.25 var(--font-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.42);
  cursor: pointer;
}

.rating__free {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 6px;
  height: 24px;
  color: #f7f4f1;
  font: 400 11px/1 var(--font-mono);
  letter-spacing: 0.08em;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.32);
}

/* select strip */
.game__select {
  position: absolute;
  right: 16px;
  bottom: 0;
  left: 16px;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 53px;
  padding: 0;
  border: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.42);
  background: transparent;
  color: #cecac6;
  font: 500 10.5px/1 var(--font-mono);
  letter-spacing: 0.135em;
  text-transform: uppercase;
  cursor: pointer;
  transition: color 0.18s ease;
}

.game__select::before {
  content: '';
  position: absolute;
  inset: -1px -16px 0;
  z-index: -1;
  background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.3) 50%, rgba(0, 0, 0, 0.62) 100%);
  pointer-events: none;
}

/* focus frame stays inside the card so the rounded clip cannot cut it */
.game__select::after {
  content: '';
  position: absolute;
  inset: -1px -9px 9px;
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 0 0 6px 6px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.16s ease;
}

.game__select:focus-visible {
  outline: none;
  color: #fff;
}

.game__select:focus-visible::after {
  opacity: 1;
}

.game__select span {
  position: relative;
  z-index: 1;
}

.game__select .arrow {
  font-family: var(--font-body);
  font-size: 13px;
  line-height: 1;
  letter-spacing: 0;
}

.game--active .game__select {
  color: #f0edeb;
}

.game__select:hover {
  color: #fff;
}

/* ---------- footer ---------- */
.footer {
  display: flex;
  flex-direction: column;
  flex: none;
  margin-top: 0;
  padding: 0 40px 14px;
}

.footer__line {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  width: min(var(--cards-w), 100%);
  margin: 0 auto;
  color: #e7e3e0;
  font: 300 13px/1 var(--font-light);
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.footer__spacer {
  justify-self: start;
}

.footer__about {
  justify-self: start;
  padding: 3px 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  cursor: pointer;
  transition: color 0.18s ease;
}

.footer__socials {
  display: flex;
  align-items: center;
  justify-content: center;
  justify-self: center;
  gap: 18px;
}

.footer__social {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  color: #e7e3e0;
  opacity: 0.88;
  transition: color 0.18s ease, opacity 0.18s ease;
}

.footer__social svg {
  width: 20px;
  height: 20px;
}

.footer__social:hover {
  color: #fff;
  opacity: 1;
}

.footer__social:focus-visible {
  outline: 1px solid rgba(255, 255, 255, 0.8);
  outline-offset: 4px;
  border-radius: 2px;
}

.footer__copy {
  justify-self: end;
  padding: 3px 0;
}

.footer__about:hover {
  color: #fff;
}

/* ---------- UI boot-in ---------- */
/* Set by an inline script on <html> before the stylesheet loads. Visibility
   (not display) keeps every block in flow while fonts and the scene load. */
.ui-boot .topbar__inner,
.ui-boot .topbar > .lang,
.ui-boot .footer__line,
.ui-boot .games__tagline,
.ui-boot .download {
  visibility: hidden;
}

.ui-boot .download {
  opacity: 0;
}

@media (max-width: 860px) {
  /* The carousel is centred by JS; hide its first, uncentred frame. */
  .ui-boot .game-row {
    visibility: hidden;
  }
}

/* Removing the run class and re-adding the gate resets every animation for
   the back-navigation replay. */
.ui-boot--run .brand__logo {
  animation: bootLogoRise 0.6s cubic-bezier(0.22, 0.31, 0, 1) both;
}

.ui-boot--run .brand__wordmark {
  animation: bootWordmarkDrop 0.6s cubic-bezier(0.69, 0, 0, 1) 0.2s both;
}

.ui-boot--run .download[data-boot-ready='true'] {
  animation: bootDownloadIn 0.5s cubic-bezier(0.22, 0.31, 0, 1) both;
}

@keyframes bootLogoRise {
  from { transform: translate3d(0, 110%, 0); }
  to { transform: translate3d(0, 0, 0); }
}

@keyframes bootWordmarkDrop {
  from { transform: translate3d(0, -120%, 0); }
  to { transform: translate3d(0, 0, 0); }
}

@keyframes bootDownloadIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .ui-boot--run .brand__logo,
  .ui-boot--run .brand__wordmark,
  .ui-boot--run .download {
    animation: none;
  }
}

/* ---------- modal shell ---------- */
.modal-layer {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  place-items: center;
  padding: 24px;
  overflow-y: auto;
  background: rgba(0, 0, 0, 0.12);
  backdrop-filter: blur(13.5px) brightness(0.6) saturate(1.15);
  -webkit-backdrop-filter: blur(13.5px) brightness(0.6) saturate(1.15);
  animation: layerIn 0.22s ease both;
}

.modal-layer[hidden] {
  display: none !important;
}

@keyframes layerIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal {
  position: relative;
  width: min(500px, calc(100vw - 48px));
  max-width: 100%;
  min-width: 0;
  border: 1px solid rgba(255, 255, 255, 0.1);
  outline: none;
  border-radius: 18px;
  background:
    linear-gradient(155deg, rgba(30, 26, 25, 0.84) 0%, rgba(16, 13, 14, 0.9) 42%, rgba(10, 7, 8, 0.92) 100%);
  box-shadow:
    0 45px 130px rgba(0, 0, 0, 0.72),
    0 0 0 1px rgba(0, 0, 0, 0.36) inset,
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(24px) saturate(1.16);
  -webkit-backdrop-filter: blur(24px) saturate(1.16);
  animation: modalIn 0.28s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

@keyframes modalIn {
  from { opacity: 0; transform: translateY(12px) scale(0.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.modal::before {
  content: '';
  position: absolute;
  inset: -0.5px;
  z-index: 0;
  border-radius: inherit;
  background:
    radial-gradient(46% 58% at 57% 39%, rgba(255, 139, 26, 0.38) 0%, rgba(255, 112, 16, 0.13) 48%, transparent 76%),
    radial-gradient(47% 62% at 74% 66%, rgba(255, 5, 41, 0.32) 0%, rgba(191, 0, 32, 0.11) 50%, transparent 78%),
    radial-gradient(44% 50% at 39% 78%, rgba(255, 102, 0, 0.12) 0%, transparent 74%);
  filter: blur(14px);
  clip-path: inset(0 round 18px);
  pointer-events: none;
}

.modal::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  border-radius: inherit;
  opacity: 0.06;
  mix-blend-mode: screen;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='m'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.75' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23m)' opacity='.7'/%3E%3C/svg%3E");
  pointer-events: none;
}

.modal > * {
  position: relative;
  z-index: 1;
}

.modal__close {
  position: absolute;
  top: -30px;
  right: 13px;
  z-index: 5;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  padding: 0;
  border: 0;
  background: none;
  color: #cfcbc7;
  font-size: 0;
  line-height: 0;
  cursor: pointer;
  transition: color 0.18s ease;
}

.modal__close::before,
.modal__close::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 1px;
  border-radius: 1px;
  background: currentColor;
  transition: transform 0.22s ease;
}

.modal__close::before {
  transform: translate(-50%, -50%) rotate(45deg);
}

.modal__close::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}

.modal__close:hover {
  color: #fff;
}

.modal__close:hover::before {
  transform: translate(-50%, -50%) rotate(135deg);
}

.modal__close:hover::after {
  transform: translate(-50%, -50%) rotate(45deg);
}

.modal__close:focus-visible,
button:focus-visible,
input:focus-visible,
a:focus-visible {
  outline: 1px solid rgba(255, 255, 255, 0.8);
  outline-offset: 3px;
}

/* ---------- auth modal ---------- */
.auth {
  width: min(504px, calc(100vw - 48px));
  padding: 24px 24px 20px;
}

.auth__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  padding-top: 2px;
}

.auth__title {
  margin: 0;
  color: #f3efec;
  font: 500 16px/1 var(--font-mono);
  letter-spacing: 0.045em;
  text-transform: uppercase;
}

.auth__kicker {
  color: rgba(235, 230, 226, 0.55);
  font: 300 13px/1 var(--font-light);
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.auth__tabs {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  height: 39px;
  margin-top: 20px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.08);
}

.auth__thumb {
  position: absolute;
  top: 0;
  left: 0;
  width: 50%;
  height: 100%;
  border-radius: 11px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.09));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14);
  pointer-events: none;
  transition: transform 0.24s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.auth--signup .auth__thumb {
  transform: translateX(100%);
}

.auth__tab {
  position: relative;
  z-index: 1;
  border: 0;
  border-radius: 11px;
  background: transparent;
  color: rgba(235, 230, 226, 0.46);
  font: 300 13px/1 var(--font-light);
  letter-spacing: 0.03em;
  cursor: pointer;
  transition: color 0.18s ease;
}

.auth__tab[aria-selected='true'] {
  color: #f4f0ed;
}

.auth__tab:hover {
  color: #fff;
}

.auth__form {
  display: flex;
  flex-direction: column;
  margin-top: 26px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-top: 6px;
}

.field:first-child {
  margin-top: 0;
}

.field > span,
.field label {
  color: rgba(235, 230, 226, 0.58);
  font: 300 13px/1 var(--font-light);
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.field__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  height: 13px;
  min-width: 0;
}

.field__head label {
  flex: none;
}

.field__head .field__error {
  min-width: 0;
  overflow: hidden;
  line-height: 1.2;
  letter-spacing: 0.02em;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.field__control {
  position: relative;
  display: flex;
}

.field input {
  width: 100%;
  height: 37px;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.045);
  color: #f4f0ed;
  font: 300 13px/1 var(--font-light);
  letter-spacing: 0.03em;
  outline: none;
  transition: border-color 0.16s ease, background 0.16s ease;
}

.field input::placeholder {
  color: rgba(235, 230, 226, 0.3);
}

.field input:hover {
  border-color: rgba(255, 255, 255, 0.36);
}

.field input:focus {
  border-color: rgba(255, 255, 255, 0.58);
  background: rgba(255, 255, 255, 0.06);
}

.field__eye {
  position: absolute;
  top: 0;
  right: 0;
  display: grid;
  place-items: center;
  width: 40px;
  height: 37px;
  padding: 0;
  border: 0;
  background: none;
  color: rgba(235, 230, 226, 0.58);
  cursor: pointer;
}

.field__eye:hover {
  color: #fff;
}

.field__eye svg {
  width: 14px;
  height: 14px;
}

.field__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 20px;
  min-width: 0;
}

.field,
.field__control {
  min-width: 0;
}

.field__grid .field {
  margin-top: 0;
}

.field__error {
  min-height: 0;
  color: #ff9c92;
  font: 400 9.5px/1.35 var(--font-mono);
  letter-spacing: 0.06em;
}

.auth__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 14px;
  margin-top: 10px;
}

.check {
  display: flex;
  align-items: center;
  gap: 9px;
  color: rgba(235, 230, 226, 0.72);
  font: 300 12px/1 var(--font-light);
  letter-spacing: 0.03em;
  text-transform: uppercase;
  cursor: pointer;
  user-select: none;
}

.check input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.check__box {
  position: relative;
  width: 13px;
  height: 13px;
  flex: none;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 2px;
  background: transparent;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.check__box::after {
  content: '';
  position: absolute;
  top: 1px;
  left: 4px;
  width: 3px;
  height: 6px;
  border-right: 1.5px solid #111;
  border-bottom: 1.5px solid #111;
  opacity: 0;
  transform: rotate(42deg) scale(0.7);
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.check input:checked + .check__box {
  border-color: #eeeae6;
  background: #eeeae6;
}

.check input:checked + .check__box::after {
  opacity: 1;
  transform: rotate(42deg) scale(1);
}

.check input:focus-visible + .check__box {
  outline: 1px solid #fff;
  outline-offset: 3px;
}

.check:hover .check__box {
  border-color: #fff;
}

.auth__submit {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  height: 42px;
  margin-top: 15px;
  padding: 0;
  border: 0;
  border-radius: 12px;
  background: #f0eeeb;
  color: #171514;
  font: 600 13px/1 var(--font-mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  transition: color 0.16s ease;
}

.auth__submit:hover {
  color: #000;
}

.auth__submit:active {
  color: #000;
}

.auth__submit[disabled] {
  cursor: wait;
  opacity: 0.7;
}

.auth__submit .arrow {
  font-family: var(--font-body);
  font-size: 13px;
  line-height: 1;
  letter-spacing: 0;
}

.auth__alt {
  margin-top: 21px;
  text-align: center;
  color: rgba(235, 230, 226, 0.5);
  font: 300 13px/1 var(--font-light);
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.auth__alt button {
  padding: 0;
  border: 0;
  border-bottom: 1px solid rgba(244, 240, 237, 0.9);
  background: none;
  color: #f2eeeb;
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  cursor: pointer;
}

.auth__alt button:hover {
  color: #fff;
}

.auth__message {
  margin-top: 10px;
  min-height: 12px;
  color: rgba(235, 230, 226, 0.56);
  font: 400 8px/1.4 var(--font-mono);
  letter-spacing: 0.06em;
  text-align: center;
}

.auth__message:empty {
  display: none;
}

.auth__message.is-error {
  color: #ff9c92;
}

.auth__message.is-ok {
  color: #6fe596;
}

/* Session status sits in the REMEMBER ME row so showing it never changes
   the height of the sign-in dialog. */
.auth__row .auth__message {
  position: relative;
  top: 0.5px;
  min-height: 0;
  margin: 0;
  text-align: right;
  white-space: nowrap;
}

.auth--signup .auth__row--signup-message {
  justify-content: space-between;
  align-items: center;
}

.auth__row .auth__message--wrap {
  max-width: 66%;
  white-space: normal;
  line-height: 1.45;
  text-align: right;
}

.auth__message--wrap {
  max-width: 86%;
  white-space: normal;
  line-height: 1.5;
}

/* create account screen */
.auth--signup .auth__form {
  margin-top: 26px;
}

/* All auth fields reserve the same bottom slot, so login and signup keep
   identical field heights and vertical rhythm. */
.auth .field {
  padding-bottom: 5px;
}

.auth--signup .field__grid + .field__grid {
  margin-top: 6px;
}

.auth--signup .auth__row {
  margin-top: 10px;
  justify-content: space-between;
}

.auth--signup .auth__submit {
  margin-top: 15px;
}

/* ---------- about modal ---------- */
.about {
  width: min(400px, calc(100vw - 48px));
  padding: 24px 24px 32px;
}

.about__kicker {
  display: block;
  margin: 4px 0 0;
  text-align: right;
  color: rgba(235, 230, 226, 0.55);
  font: 300 13px/1 var(--font-light);
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.about__text {
  margin: 31px 0 0;
  color: rgba(231, 226, 222, 0.55);
  font: 500 12.5px/1.48 var(--font-body);
  letter-spacing: 0.012em;
  text-wrap: pretty;
}

.about__text strong {
  color: #f2eeeb;
  font-weight: 600;
}

.about__text .line {
  display: inline;
  white-space: nowrap;
}

.about__social {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  margin: 32px auto 0;
  border-radius: 50%;
  background: #f0eeeb;
  color: #171514;
  box-shadow:
    0 10px 28px rgba(0, 0, 0, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.85);
  transition: background 0.16s ease, transform 0.16s ease, box-shadow 0.16s ease;
}

.about__social svg {
  display: block;
  width: 20px;
  height: 20px;
}

.about__social:hover {
  background: #fff;
  transform: translateY(-1px);
  box-shadow:
    0 14px 34px rgba(0, 0, 0, 0.34),
    inset 0 1px 0 rgba(255, 255, 255, 0.95);
}

.about__social:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}

/* ---------- online modal ---------- */
.online-modal {
  width: min(400px, calc(100vw - 48px));
  height: min(468px, calc(100vh - 88px));
  display: flex;
  flex-direction: column;
  padding: 22px 22px 22px;
}

.online-modal__count {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 1px;
  color: #e7e3e0;
  font: 300 13px/1 var(--font-light);
  letter-spacing: 0.02em;
}

.online-modal__count svg {
  width: 16px;
  height: 16px;
  opacity: 0.95;
}

.online-modal__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-top: 26px;
}

.online-modal__title {
  margin: 0;
  color: rgba(235, 230, 226, 0.55);
  font: 300 13px/1 var(--font-light);
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.online-modal__sub {
  color: rgba(238, 233, 229, 0.34);
  font: 300 13px/1 var(--font-light);
  letter-spacing: 0.03em;
  white-space: nowrap;
}

.online-scroll {
  position: relative;
  flex: 1;
  min-height: 0;
  margin-top: 20px;
  padding: 0 6px 0 9px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.025) 0%, transparent 18%),
    rgba(0, 0, 0, 0.18);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
  overflow: hidden;
}

.online-list {
  width: 100%;
  height: 100%;
  padding-right: 4px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
  outline: none;
}

.online-list::-webkit-scrollbar {
  display: none;
}

.online-scrollbar {
  position: absolute;
  top: 14px;
  right: 2px;
  bottom: 14px;
  width: 12px;
  border-radius: 3px;
  background: transparent;
  pointer-events: auto;
  cursor: grab;
  touch-action: none;
}

.online-scrollbar::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 5px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.055);
  pointer-events: none;
}

.online-scrollbar__thumb {
  position: absolute;
  top: 0;
  right: 0.5px;
  left: auto;
  width: 4px;
  min-height: 42px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.55);
  cursor: grab;
  transition: background 0.15s ease;
}

.online-modal:hover .online-scrollbar__thumb {
  background: rgba(255, 255, 255, 0.68);
}

.online-scrollbar.is-dragging,
.online-scrollbar.is-dragging .online-scrollbar__thumb {
  cursor: grabbing;
}

.online-scrollbar.is-dragging .online-scrollbar__thumb {
  background: rgba(255, 255, 255, 0.82);
}

.online-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 92px;
  align-items: center;
  gap: 12px;
  min-height: 33px;
  padding: 0 4px 0 3px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.035);
}

.online-row__name {
  overflow: hidden;
  color: rgba(244, 240, 237, 0.86);
  font: 300 13px/1.2 var(--font-light);
  letter-spacing: 0.03em;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.online-row__level {
  display: inline-flex;
  align-items: baseline;
  justify-content: flex-start;
  color: rgba(235, 230, 226, 0.55);
  font: 300 13px/1 var(--font-light);
  letter-spacing: 0.03em;
  text-transform: uppercase;
  white-space: nowrap;
}

.online-row__level-value {
  display: inline-block;
  width: 3ch;
  text-align: left;
  font-variant-numeric: tabular-nums;
}

.online-row__level-suffix {
  display: inline-block;
}

.online-row:hover {
  background: rgba(255, 255, 255, 0.035);
}

.online-modal__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  color: rgba(238, 233, 229, 0.26);
  font: 400 7px/1 var(--font-mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* ---------- contacts modal ---------- */
.contact {
  width: min(400px, calc(100vw - 48px));
  padding: 25px 24px 22px;
}

.contact__kicker {
  display: block;
  margin: 4px 0 0;
  text-align: right;
  color: rgba(238, 233, 229, 0.72);
  font: 500 9px/1 var(--font-mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.contact__title {
  margin: 25px 0 0;
  color: #f2eeeb;
  font: 500 24px/1.1 var(--font-body);
  letter-spacing: -0.02em;
}

.contact__text {
  margin: 10px 0 18px;
  color: rgba(231, 226, 222, 0.55);
  font: 500 11.5px/1.5 var(--font-body);
}

.contact__links {
  display: grid;
  gap: 8px;
}

.contact__link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  height: 42px;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.17);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.035);
  color: #f1ede9;
  font: 500 9px/1 var(--font-mono);
  letter-spacing: 0.09em;
  text-decoration: none;
  text-transform: uppercase;
  cursor: pointer;
  transition: border-color 0.18s ease, background 0.18s ease;
}

.contact__link span:last-child {
  color: rgba(238, 233, 229, 0.42);
  font-family: var(--font-body);
  font-size: 12px;
}

.contact__link:hover {
  border-color: rgba(255, 255, 255, 0.42);
  background: rgba(255, 255, 255, 0.07);
}

/* The detail view gets a deeper backdrop so the large headings stay legible
   above the page tagline. */
.modal-layer:has(.detail:not([hidden])) {
  background: rgba(0, 0, 0, 0.36);
  backdrop-filter: blur(18px) brightness(0.52) saturate(1.12);
  -webkit-backdrop-filter: blur(18px) brightness(0.52) saturate(1.12);
}

/* ---------- game detail ---------- */
.detail {
  --detail-band-gap: 34px;
  position: relative;
  width: min(1395.5px, calc(100vw - 72px));
  max-width: 100%;
  margin: auto;
  display: flex;
  flex-direction: column;
  outline: none;
  animation: detailIn 0.32s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

@keyframes detailIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.detail__close {
  position: absolute;
  top: 50%;
  right: 0;
  z-index: 4;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  background: rgba(10, 10, 10, 0.44);
  color: #d8d4d1;
  font-size: 0;
  line-height: 0;
  cursor: pointer;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transform: translateY(-50%);
  transition: border-color 0.18s ease, background 0.18s ease, color 0.18s ease;
}

.detail__close::before,
.detail__close::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 15px;
  height: 1px;
  background: currentColor;
  transition: transform 0.22s ease;
}

.detail__close::before {
  transform: translate(-50%, -50%) rotate(45deg);
}

.detail__close::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}

.detail__close:hover {
  border-color: rgba(255, 255, 255, 0.52);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.detail__close:hover::before {
  transform: translate(-50%, -50%) rotate(135deg);
}

.detail__close:hover::after {
  transform: translate(-50%, -50%) rotate(45deg);
}

.detail__head {
  position: relative;
  z-index: 5;
  display: flex;
  flex: none;
  align-items: center;
  justify-content: center;
  height: calc(var(--tagline-size, 44px) + var(--detail-band-gap));
  padding: 0 56px;
}

.detail__title {
  margin: 0;
  color: #f1efed;
  font: 400 var(--tagline-size, 44px)/1 var(--font-display);
  letter-spacing: 0;
  text-align: center;
  text-transform: uppercase;
  white-space: nowrap;
  text-shadow: none;
}

.detail__sheet {
  position: relative;
  display: grid;
  grid-template-columns: calc(370px * 1.15) minmax(0, 1fr) 330px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 24px;
  background:
    linear-gradient(160deg, rgba(28, 25, 24, 0.94) 0%, rgba(15, 13, 13, 0.97) 48%, rgba(8, 7, 8, 0.98) 100%);
  box-shadow:
    0 50px 140px rgba(0, 0, 0, 0.76),
    0 0 0 1px rgba(0, 0, 0, 0.32) inset,
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(24px) saturate(1.12);
  -webkit-backdrop-filter: blur(24px) saturate(1.12);
}

.detail__sheet::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 3;
  border-radius: inherit;
  box-shadow: inset 0 0 90px rgba(0, 0, 0, 0.28);
  pointer-events: none;
}

.detail__preview {
  position: relative;
  min-width: 0;
  min-height: 100%;
  overflow: hidden;
  background: #141211;
}

.detail__preview-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 28%;
  user-select: none;
  -webkit-user-drag: none;
}

.detail__preview-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.56) 0%, transparent 22%, transparent 56%, rgba(0, 0, 0, 0.9) 100%),
    linear-gradient(90deg, rgba(0, 0, 0, 0.1) 0%, transparent 38%, rgba(0, 0, 0, 0.22) 100%);
  pointer-events: none;
}

.detail__badges {
  position: absolute;
  top: 16px;
  left: 16px;
  z-index: 2;
  display: flex;
  gap: 6px;
}

.detail__badge {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding: 2px 10px 0;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 5px;
  background: rgba(9, 9, 9, 0.48);
  color: #f4f1ee;
  font: 300 11px/1 var(--font-light);
  letter-spacing: 0.03em;
  text-transform: uppercase;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.detail__badge--plain {
  color: rgba(244, 241, 238, 0.78);
}

.detail__dot {
  width: 5px;
  height: 5px;
  flex: none;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 8px rgba(85, 224, 126, 0.92);
}

.detail__main {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  grid-template-columns: minmax(0, 1fr);
  min-width: 0;
  padding: 16px 20px 18px;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  border-left: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.014) 0%, transparent 24%);
}

.detail__tabs {
  display: flex;
  grid-row: 1;
  grid-column: 1;
  flex: none;
  gap: 26px;
  height: 31px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
}

.detail__tab {
  position: relative;
  padding: 1px 2px 0;
  border: 0;
  background: none;
  color: rgba(235, 230, 226, 0.55);
  font: 300 13px/1 var(--font-light);
  letter-spacing: 0.03em;
  text-transform: uppercase;
  cursor: pointer;
  transition: color 0.18s ease;
}

.detail__tab::after {
  content: '';
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 1px;
  background: #f4f1ee;
  opacity: 0;
  transform: scaleX(0.55);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.detail__tab:hover {
  color: #fff;
}

.detail__tab.is-active {
  color: #f4f1ee;
}

.detail__tab.is-active::after {
  opacity: 1;
  transform: scaleX(1);
}

.detail__tab:focus-visible {
  outline-offset: -2px;
}

.detail__panel {
  display: flex;
  grid-row: 2;
  grid-column: 1;
  min-height: 0;
  flex: 1;
  flex-direction: column;
  padding-top: 14px;
}

/* Both tab panels share one grid cell, so the sheet keeps the same height
   when the shorter reviews panel is active. */
.detail__panel[aria-hidden='true'] {
  visibility: hidden;
  pointer-events: none;
  user-select: none;
}

.detail__screen {
  position: relative;
  width: 100%;
  flex: none;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  background: #121111;
  box-shadow:
    inset 0 0 0 1px rgba(0, 0, 0, 0.26),
    0 18px 44px rgba(0, 0, 0, 0.28);
}

.detail__screen::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 70px rgba(0, 0, 0, 0.3);
  pointer-events: none;
}

.detail__screen-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  user-select: none;
  -webkit-user-drag: none;
}

.detail__screen-img.is-switching {
  animation: detailShotIn 0.24s ease both;
}

@keyframes detailShotIn {
  from { opacity: 0.35; transform: scale(1.012); }
  to { opacity: 1; transform: scale(1); }
}

.detail__screen-count {
  position: absolute;
  left: 6.09%;
  bottom: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  height: 6.43%;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  color: rgba(244, 241, 238, 0.84);
  font: 500 8px/1 var(--font-mono);
  letter-spacing: 0.1em;
  pointer-events: none;
}

.detail__thumbs {
  display: grid;
  flex: none;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 5px;
  margin-top: 8px;
}

.detail__thumb {
  position: relative;
  overflow: hidden;
  aspect-ratio: 11 / 8;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 8px;
  background: #141212;
  opacity: 0.5;
  cursor: pointer;
  transition: opacity 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.detail__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  user-select: none;
  -webkit-user-drag: none;
}

.detail__thumb:hover {
  border-color: rgba(255, 255, 255, 0.34);
  opacity: 0.86;
}

.detail__thumb.is-active {
  border-color: #f2efeb;
  opacity: 1;
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.55),
    0 5px 16px rgba(0, 0, 0, 0.34);
}

.detail__caption {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  min-height: 58px;
  margin: 12px 0 0;
  color: rgba(231, 226, 222, 0.6);
  font: 300 13px/1.5 var(--font-light);
  letter-spacing: 0.02em;
}

.detail__caption strong {
  margin-right: 0;
  color: #f3efec;
  font: 300 13px/1.5 var(--font-light);
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.detail__specs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.09);
}

.detail__spec {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 8px;
}

.detail__spec span {
  overflow: hidden;
  color: rgba(235, 230, 226, 0.55);
  font: 300 13px/1 var(--font-light);
  letter-spacing: 0.03em;
  text-transform: uppercase;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.detail__spec strong {
  overflow: hidden;
  color: #f2eeeb;
  font: 600 14px/1 var(--font-body);
  letter-spacing: -0.01em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.detail__side {
  --detail-side-pad: 20px;
  --detail-main-pad-bottom: 18px;
  display: flex;
  min-width: 0;
  flex-direction: column;
  padding: var(--detail-side-pad);
}

.detail__rating {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
}

.detail__rating-score {
  display: flex;
  align-items: baseline;
  gap: 4px;
}

.detail__rating-score strong {
  color: #f4f1ee;
  font: 600 36px/0.9 var(--font-body);
  letter-spacing: -0.05em;
}

.detail__rating-score span {
  color: rgba(255, 255, 255, 0.42);
  font: 500 13px/1 var(--font-mono);
  letter-spacing: 0.02em;
}

.detail__rating-meta {
  display: flex;
  align-items: flex-end;
  flex-direction: column;
  gap: 7px;
  padding-top: 3px;
  transform: translateY(-5px);
}

.detail__stars {
  color: var(--gold);
  font-size: 10px;
  line-height: 1;
  letter-spacing: 1.5px;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.44);
  white-space: nowrap;
}

.detail__label {
  margin: 0;
  color: rgba(235, 230, 226, 0.55);
  font: 300 13px/1 var(--font-light);
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.detail__reviews-link {
  padding: 0 0 1px;
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.28);
  background: none;
  color: rgba(235, 230, 226, 0.55);
  cursor: pointer;
  transition: color 0.18s ease, border-color 0.18s ease;
}

.detail__reviews-link:hover {
  border-color: rgba(255, 255, 255, 0.8);
  color: #fff;
}

.detail__reviews-link:focus-visible {
  outline-offset: 2px;
}

.detail__features {
  margin-top: 16px;
}

.detail__feature-list {
  display: flex;
  flex-direction: column;
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
}

.detail__feature-list li {
  height: 34px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.055);
  color: #f0ece9;
  font: 300 13px/1 var(--font-light);
  letter-spacing: 0.03em;
}

.detail__feature {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
  text-align: left;
  cursor: pointer;
  transition: color 0.18s ease;
}

.detail__feature:hover {
  color: #fff;
}

.detail__feature:focus-visible {
  outline: 1px solid rgba(255, 255, 255, 0.45);
  outline-offset: -2px;
}

.detail__feature > span:first-child {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  white-space: nowrap;
}

.detail__feature > span:last-child {
  color: rgba(235, 230, 226, 0.48);
  font-size: 13px;
  letter-spacing: 0.03em;
  text-align: right;
  white-space: nowrap;
  transition: color 0.18s ease;
}

.detail__feature:hover > span:last-child {
  color: rgba(235, 230, 226, 0.72);
}

.detail__feature-dot {
  width: 5px;
  height: 5px;
  flex: none;
  border: 1px solid rgba(255, 255, 255, 0.72);
  background: transparent;
}

.detail__feature-dot--green {
  border-color: var(--green);
  background: var(--green);
  box-shadow: 0 0 7px rgba(85, 224, 126, 0.72);
}

.detail__options {
  margin-top: auto;
  padding-top: 18px;
}

.detail__options-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.detail__options-head > span:last-child {
  color: rgba(235, 230, 226, 0.48);
  font: 300 13px/1 var(--font-light);
  letter-spacing: 0.03em;
}

.detail__plan {
  display: flex;
  align-items: center;
  width: 100%;
  height: 44px;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.022);
  color: #f2eeeb;
  font: 300 13px/1 var(--font-light);
  letter-spacing: 0.03em;
  text-align: left;
  text-transform: uppercase;
  cursor: pointer;
  transition: border-color 0.18s ease, background 0.18s ease;
}

.detail__plan + .detail__plan {
  margin-top: 6px;
}

.detail__plan.is-active {
  border-color: rgba(255, 255, 255, 0.46);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.085), rgba(255, 255, 255, 0.035));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    0 7px 20px rgba(0, 0, 0, 0.18);
}

.detail__plan-check {
  position: relative;
  width: 12px;
  height: 12px;
  flex: none;
  margin-right: 9px;
  border: 1px solid rgba(255, 255, 255, 0.68);
  border-radius: 2px;
  background: transparent;
}

.detail__plan.is-active .detail__plan-check {
  border-color: #eeeae6;
  background: #eeeae6;
}

.detail__plan.is-active .detail__plan-check::after {
  content: '';
  position: absolute;
  top: 1px;
  left: 3px;
  width: 3px;
  height: 6px;
  border-right: 1.5px solid #111;
  border-bottom: 1.5px solid #111;
  transform: rotate(42deg);
}

.detail__plan-name {
  flex: 1;
}

.detail__plan.is-active .detail__plan-name {
  font-family: var(--font-body);
  font-weight: 600;
}

.detail__plan-status {
  display: flex;
  align-items: center;
  gap: 6px;
  color: rgba(235, 230, 226, 0.55);
  font-size: 13px;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

.detail__plan.is-active .detail__plan-status {
  color: rgba(235, 230, 226, 0.66);
}

.detail__plan.is-soon {
  border-style: dashed;
  cursor: not-allowed;
  opacity: 0.4;
}

.detail__runs {
  margin-top: 14px;
}

.detail__runs-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 5px;
  margin-top: 8px;
}

.detail__runs-list span {
  display: grid;
  place-items: center;
  height: 30px;
  padding-top: 2px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 5px;
  background: rgba(0, 0, 0, 0.16);
  color: rgba(235, 230, 226, 0.55);
  font: 300 11px/1 var(--font-light);
  letter-spacing: 0.03em;
  white-space: nowrap;
}

.detail__download {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: auto;
  height: calc(50px + var(--detail-main-pad-bottom));
  margin-top: calc(22px + var(--detail-side-pad) - var(--detail-main-pad-bottom));
  margin-right: calc(-1 * var(--detail-side-pad));
  margin-bottom: calc(-1 * var(--detail-side-pad));
  margin-left: calc(-1 * var(--detail-side-pad));
  padding: 0 var(--detail-side-pad);
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background: #f2efeb;
  color: #141211;
  font: 400 13px/1 var(--font-display);
  letter-spacing: 0;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.96),
    inset 0 -1px 0 rgba(0, 0, 0, 0.1);
  white-space: nowrap;
  transition:
    background-color 0.4s cubic-bezier(0.22, 0.31, 0, 1),
    box-shadow 0.4s cubic-bezier(0.22, 0.31, 0, 1);
}

.detail__download::after {
  content: '';
  position: absolute;
  top: -50%;
  bottom: -50%;
  left: -45%;
  z-index: 2;
  width: 36px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.55) 30%, rgba(255, 255, 255, 0.55) 70%, rgba(255, 255, 255, 0) 100%);
  transform: rotate(15deg);
  pointer-events: none;
}

.detail__download > * {
  position: relative;
  z-index: 1;
}

.detail__download:focus-visible {
  outline: 1px solid #16171a;
  outline-offset: -3px;
}

@media (min-width: 1025px) {
  .detail__download:hover {
    background-color: #fff;
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.98),
      inset 0 -1px 0 rgba(0, 0, 0, 0.1),
      0 0 24px rgba(255, 255, 255, 0.12);
  }

  .detail__download:hover::after {
    animation: downloadShine 0.9s cubic-bezier(0.22, 0.31, 0, 1) forwards;
  }
}

.detail__download-side {
  display: flex;
  align-items: center;
  gap: 8px;
  font: 300 13px/1 var(--font-light);
  letter-spacing: 0.03em;
}

.detail__download-side .arrow {
  font-family: var(--font-light);
  font-size: 15px;
  letter-spacing: 0;
}

.detail__tagline {
  position: relative;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  height: calc(var(--tagline-size, 44px) + var(--detail-band-gap));
  margin: 0;
  color: #f1efed;
  font: 400 var(--tagline-size, 44px)/1 var(--font-display);
  letter-spacing: 0;
  text-align: center;
  text-transform: uppercase;
  white-space: nowrap;
  text-shadow: none;
}

/* When the sheet fits, let the detail span the whole viewport so the
   title and tagline sit in the exact centre of the top and bottom bands. */
@media (min-width: 901px) and (min-height: 821px) {
  .modal-layer:has(.detail:not([hidden])) {
    padding-top: 0;
    padding-bottom: 0;
  }

  .detail {
    min-height: 100%;
  }

  .detail__head,
  .detail__tagline {
    flex: 1 1 auto;
    height: auto;
    min-height: calc(var(--tagline-size, 44px) + var(--detail-band-gap));
  }
}

/* reviews tab */
.detail__panel--reviews {
  padding-top: 18px;
}

.detail__reviews-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
}

.detail__reviews-score {
  display: flex;
  align-items: baseline;
  gap: 4px;
}

.detail__reviews-score strong {
  color: #f4f1ee;
  font: 600 38px/0.9 var(--font-body);
  letter-spacing: -0.05em;
}

.detail__reviews-score span {
  color: rgba(255, 255, 255, 0.4);
  font: 500 13px/1 var(--font-mono);
}

.detail__reviews-meta {
  display: flex;
  align-items: flex-end;
  flex-direction: column;
  gap: 7px;
}

.detail__reviews-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-top: 16px;
}

.detail__reviews-title {
  margin: 0;
  color: rgba(235, 230, 226, 0.55);
  font: 300 13px/1 var(--font-light);
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

/* The 10px scrollbar sits on the right edge; nudge the hint so the arrow's
   glyph center lands on the scrollbar axis rather than 2px to its right. */
.detail__reviews-hint {
  margin-right: 2px;
  color: rgba(235, 230, 226, 0.24);
  font: 500 8.5px/1 var(--font-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}

.detail__review-list {
  display: flex;
  flex: 1 1 230px;
  flex-direction: column;
  min-height: 0;
  margin-top: 4px;
  padding-right: 8px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.18) transparent;
}

.detail__review-list::-webkit-scrollbar {
  width: 4px;
}

.detail__review-list::-webkit-scrollbar-track {
  background: transparent;
}

.detail__review-list::-webkit-scrollbar-thumb {
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.16);
}

.detail__review-list:hover::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.28);
}

.detail__review-list:focus-visible {
  outline: 1px solid rgba(255, 255, 255, 0.32);
  outline-offset: 2px;
  border-radius: 4px;
}

.detail__review {
  padding: 12px 0 13px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.detail__review.is-new {
  animation: reviewIn 0.36s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

@keyframes reviewIn {
  from { opacity: 0; transform: translateY(-7px); }
  to { opacity: 1; transform: translateY(0); }
}

.detail__review:last-child {
  border-bottom: 0;
}

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

.detail__review-name {
  min-width: 0;
  overflow: hidden;
  color: #f2eeeb;
  font: 500 13px/1 var(--font-mono);
  letter-spacing: 0.06em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.detail__review-head time {
  flex: none;
  color: rgba(235, 230, 226, 0.32);
  font: 500 11px/1 var(--font-mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.detail__review-stars {
  margin-top: 6px;
  color: var(--gold);
  font-size: 10px;
  line-height: 1;
  letter-spacing: 1.5px;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.44);
}

.detail__review-stars .is-dim {
  color: rgba(255, 255, 255, 0.14);
  text-shadow: none;
}

.detail__review p {
  margin: 7px 0 0;
  color: rgba(231, 226, 222, 0.6);
  font: 300 13px/1.5 var(--font-light);
  letter-spacing: 0.02em;
  overflow-wrap: anywhere;
}

/* review composer */
.detail__review-composer {
  flex: none;
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.09);
}

.detail__review-gate {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 13px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.014));
}

.detail__review-gate-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex: none;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
  color: rgba(241, 237, 233, 0.68);
}

.detail__review-gate-icon svg {
  width: 16px;
  height: 16px;
}

.detail__review-gate-copy {
  min-width: 0;
  flex: 1;
}

.detail__review-gate-title {
  margin: 0;
  color: #f2eeeb;
  font: 600 9px/1.25 var(--font-mono);
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.detail__review-gate-text {
  margin: 4px 0 0;
  color: rgba(235, 230, 226, 0.42);
  font: 300 11.5px/1.4 var(--font-light);
  letter-spacing: 0.01em;
}

.detail__review-gate-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 34px;
  flex: none;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.055);
  color: #f1ede9;
  font: 500 9px/1 var(--font-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: border-color 0.18s ease, background 0.18s ease, color 0.18s ease;
}

.detail__review-gate-btn:hover {
  border-color: rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.detail__review-gate-btn .arrow {
  font-family: var(--font-light);
  font-size: 14px;
  letter-spacing: 0;
}

.detail__review-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.detail__review-form-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.detail__review-form-title {
  color: rgba(235, 230, 226, 0.55);
  font: 300 12px/1 var(--font-light);
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.detail__review-form-as {
  min-width: 0;
  overflow: hidden;
  color: rgba(235, 230, 226, 0.32);
  font: 500 8.5px/1 var(--font-mono);
  letter-spacing: 0.06em;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.detail__review-form-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.detail__review-rating {
  display: flex;
  gap: 1px;
  margin-left: -3px;
}

.detail__review-rating button {
  width: 25px;
  height: 25px;
  padding: 0;
  border: 0;
  border-radius: 3px;
  background: none;
  color: rgba(255, 255, 255, 0.24);
  font: 400 19px/1 var(--font-body);
  cursor: pointer;
  transition: color 0.12s ease, text-shadow 0.12s ease, transform 0.12s ease;
}

.detail__review-rating button.is-on {
  color: var(--gold);
  text-shadow: 0 0 10px rgba(232, 184, 63, 0.44);
}

.detail__review-rating button:hover {
  transform: translateY(-1px);
}

.detail__review-rating button:focus-visible {
  outline: 1px solid rgba(255, 255, 255, 0.42);
  outline-offset: 1px;
}

.detail__review-counter {
  color: rgba(235, 230, 226, 0.3);
  font: 500 9px/1 var(--font-mono);
  letter-spacing: 0.06em;
}

.detail__review-textarea {
  width: 100%;
  min-height: 64px;
  max-height: 120px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
  color: #f2eeeb;
  font: 300 12px/1.45 var(--font-light);
  letter-spacing: 0.01em;
  outline: none;
  resize: none;
  transition: border-color 0.16s ease, background 0.16s ease;
}

.detail__review-textarea::placeholder {
  color: rgba(235, 230, 226, 0.28);
}

.detail__review-textarea:focus {
  border-color: rgba(255, 255, 255, 0.34);
  background: rgba(255, 255, 255, 0.05);
}

.detail__review-form-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.detail__review-message {
  min-width: 0;
  flex: 1;
  color: rgba(235, 230, 226, 0.55);
  font: 500 8.5px/1.3 var(--font-mono);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.detail__review-message.is-error {
  color: #ff8f7d;
}

.detail__review-message.is-success {
  color: var(--green);
}

.detail__review-textarea:disabled,
.detail__review-rating button:disabled {
  opacity: 0.6;
  cursor: default;
}

.detail__review-submit:disabled {
  opacity: 0.55;
  cursor: default;
}

.detail__review-submit {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 34px;
  flex: none;
  padding: 0 14px;
  border: 0;
  border-radius: 6px;
  background: #f2efeb;
  color: #0b0b0b;
  font: 500 10px/1 var(--font-mono);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.16s ease, transform 0.12s ease, box-shadow 0.16s ease;
}

.detail__review-submit:hover {
  background: #fff;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.24);
}

.detail__review-submit:active {
  transform: translateY(1px);
}

.detail__review-submit:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

.detail__review-submit-arrow {
  display: block;
  width: 15px;
  height: 12px;
  flex: none;
}

@media (max-width: 520px) {
  .detail__review-gate {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .detail__review-gate-copy {
    flex: 1 1 150px;
  }

  .detail__review-gate-btn {
    width: 100%;
  }

  .detail__review-form-foot {
    align-items: stretch;
    flex-direction: column;
    gap: 8px;
  }

  .detail__review-submit {
    width: 100%;
  }
}

/* ---------- tweak panel ---------- */
.tweak {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 120;
  width: min(300px, calc(100vw - 36px));
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(20, 18, 18, 0.94) 0%, rgba(8, 7, 8, 0.97) 100%);
  color: var(--ink);
  font-family: var(--font-mono);
  box-shadow:
    0 30px 80px rgba(0, 0, 0, 0.65),
    inset 0 1px 0 rgba(255, 255, 255, 0.07);
  backdrop-filter: blur(20px) saturate(1.1);
  -webkit-backdrop-filter: blur(20px) saturate(1.1);
  max-height: calc(100vh - 36px);
  max-height: calc(100dvh - 36px);
  overflow-y: auto;
  overscroll-behavior: contain;
  user-select: none;
  animation: tweakIn 0.2s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.tweak[hidden] {
  display: none;
}

@keyframes tweakIn {
  from { opacity: 0; transform: translateY(8px) scale(0.99); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.tweak__head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 14px 11px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.tweak__dot {
  width: 6px;
  height: 6px;
  flex: none;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 10px rgba(85, 224, 126, 0.75);
}

.tweak__title {
  min-width: 0;
}

.tweak__title h2 {
  margin: 0;
  color: #f1efed;
  font: 600 10px/1 var(--font-mono);
  letter-spacing: 0.16em;
}

.tweak__title p {
  margin: 4px 0 0;
  color: #787471;
  font: 500 7.5px/1 var(--font-mono);
  letter-spacing: 0.16em;
}

.tweak__close {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  margin-left: auto;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 50%;
  background: transparent;
  color: #a9a5a2;
  font: 300 16px/1 var(--font-body);
  cursor: pointer;
  transition: color 0.16s ease, border-color 0.16s ease, background 0.16s ease;
}

.tweak__close:hover {
  border-color: rgba(255, 255, 255, 0.36);
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}

.tweak__body {
  padding: 12px 14px 0;
}

.tweak__section-title {
  display: flex;
  justify-content: space-between;
  margin: 0 0 9px;
  color: #8f8b88;
  font: 600 9px/1 var(--font-mono);
  letter-spacing: 0.14em;
}

.tweak__section-title span:last-child {
  color: #5f5b59;
  font-weight: 400;
}

.tweak__section-name {
  color: inherit;
  font-weight: inherit;
}

.tweak__label {
  display: block;
  margin-bottom: 6px;
  color: #8f8b88;
  font: 500 8.5px/1 var(--font-mono);
  letter-spacing: 0.12em;
}

.tweak__number {
  position: relative;
}

.tweak__number input {
  width: 100%;
  height: 36px;
  padding: 0 34px 0 11px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.045);
  color: #f4f1ee;
  font: 600 12px/1 var(--font-mono);
  letter-spacing: 0.08em;
  outline: none;
  appearance: textfield;
  -moz-appearance: textfield;
  transition: border-color 0.16s ease, background 0.16s ease;
}

.tweak__number input:hover {
  border-color: rgba(255, 255, 255, 0.34);
}

.tweak__number input:focus {
  border-color: rgba(255, 255, 255, 0.6);
  background: rgba(255, 255, 255, 0.07);
}

.tweak__number input::-webkit-outer-spin-button,
.tweak__number input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.tweak__number span {
  position: absolute;
  top: 50%;
  right: 11px;
  color: #8f8b88;
  font: 500 10px/1 var(--font-mono);
  pointer-events: none;
  transform: translateY(-50%);
}

.tweak__hint {
  margin: 8px 0 0;
  color: #6c6967;
  font: 500 7.5px/1.4 var(--font-mono);
  letter-spacing: 0.1em;
}

.tweak__section + .tweak__section {
  margin-top: 14px;
  padding-top: 13px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.tweak__seg {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.tweak__seg-btn {
  height: 32px;
  padding: 0 8px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 7px;
  background: transparent;
  color: #8f8b88;
  font: 600 8px/1 var(--font-mono);
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: color 0.16s ease, border-color 0.16s ease, background 0.16s ease;
}

.tweak__seg-btn:hover {
  border-color: rgba(255, 255, 255, 0.36);
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}

.tweak__seg-btn.is-on {
  border-color: rgba(255, 255, 255, 0.45);
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.tweak__foot {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-top: 12px;
  padding: 10px 14px 13px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.tweak__button {
  height: 30px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 6px;
  background: transparent;
  color: #c9c5c2;
  font: 600 8.5px/1 var(--font-mono);
  letter-spacing: 0.13em;
  cursor: pointer;
  transition: color 0.16s ease, border-color 0.16s ease, background 0.16s ease;
}

.tweak__button:hover {
  border-color: rgba(255, 255, 255, 0.36);
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}

/* ---------- responsive ---------- */
@media (max-width: 1240px) {
  .detail {
    width: calc(100vw - 48px);
  }

  .detail__sheet {
    grid-template-columns: calc(310px * 1.15) minmax(0, 1fr) 300px;
  }

  .detail__main {
    padding: 16px 16px 16px;
  }

  .detail__side {
    --detail-side-pad: 17px;
    --detail-main-pad-bottom: 16px;
    padding: var(--detail-side-pad);
  }

  .detail__rating-score strong {
    font-size: 32px;
  }
}

@media (max-width: 1024px) {
  .detail__sheet {
    grid-template-columns: calc(280px * 1.15) minmax(0, 1fr) 276px;
  }

  .detail__main {
    padding: 16px 14px 15px;
  }

  .detail__side {
    --detail-side-pad: 15px;
    --detail-main-pad-bottom: 15px;
    padding: var(--detail-side-pad);
  }

  .detail__tabs {
    gap: 20px;
  }

  .detail__rating-score strong {
    font-size: 29px;
  }

  .detail__plan {
    height: 42px;
    padding: 0 10px;
  }

  .detail__feature-list li {
    height: 32px;
  }

  .detail__badges {
    top: 17px;
  }

  .detail__badge {
    height: 28px;
  }

  .detail__runs-list span {
    height: 28px;
  }
}

@media (max-width: 900px) {
  .detail {
    --detail-band-gap: 18px;
    width: min(680px, calc(100vw - 32px));
  }

  .detail__head {
    padding: 0 46px;
  }

  .detail__sheet {
    grid-template-columns: minmax(0, 1fr);
    border-radius: 20px;
  }

  .detail__preview {
    min-height: 300px;
    max-height: 360px;
  }

  .detail__preview-img {
    object-position: center 44%;
  }

  .detail__main {
    padding: 15px 16px 17px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    border-left: 0;
  }

  .detail__side {
    --detail-side-pad: 16px;
    --detail-main-pad-bottom: 17px;
    padding: var(--detail-side-pad);
  }

  .detail__features {
    margin-top: 14px;
  }

  .detail__options {
    margin-top: 20px;
  }
}

@media (min-width: 901px) and (max-height: 1020px) {
  .detail {
    --detail-band-gap: 18px;
    width: min(1122px, calc(100vw - 56px));
  }

  .detail__sheet {
    grid-template-columns: calc(280px * 1.15) minmax(0, 1fr) 290px;
  }

  .detail__main {
    padding: 16px 16px 15px;
  }

  .detail__side {
    --detail-side-pad: 16px;
    --detail-main-pad-bottom: 15px;
    padding: var(--detail-side-pad);
  }

  .detail__rating {
    padding-bottom: 13px;
  }

  .detail__rating-score strong {
    font-size: 30px;
  }

  .detail__feature-list li {
    height: 31px;
  }

  .detail__plan {
    height: 42px;
  }

  .detail__badges {
    top: 17px;
  }

  .detail__badge {
    height: 28px;
  }

  .detail__runs-list span {
    height: 28px;
  }
}

@media (min-width: 901px) and (min-height: 721px) and (max-height: 820px) {
  .detail {
    --detail-band-gap: 10px;
    width: min(1080px, calc(100vw - 56px));
  }

  .modal-layer:has(.detail:not([hidden])) {
    padding-top: 8px;
    padding-bottom: 8px;
  }
}

@media (max-width: 1100px) {
  :root {
    --card-w: clamp(210px, 24.5vw, calc((var(--content-w) - var(--row-gap) * 2) / 3));
  }
}

@media (max-width: 1200px) {
  .account {
    gap: 8px;
    padding-left: 0;
  }

  .account__name {
    display: none;
  }
}

@media (max-width: 860px) {
  :root {
    --card-w: 230px;
    --row-gap: 14px;
    --topbar-shift: 34.1875px;
    --brand-size: 59.8px;
    --brand-radius: 9px;
  }

  .topbar {
    height: auto;
    padding-top: 22px;
  }

  .topbar__inner {
    gap: 40px;
  }

  .online,
  .login {
    margin-top: 7.9px;
  }

  .account__level {
    width: 128px;
    padding: 8px 11px 10px;
  }

  .account__signout {
    min-width: 0;
    padding: 10px 11px 11px;
  }

  .brand {
    width: 84px;
  }

  .brand__mark {
    width: 59.8px;
    height: 59.8px;
    border-radius: 9px;
  }

  .brand__wordmark {
    padding-left: 0.22em;
    font-size: 9.5px;
    letter-spacing: 0.22em;
  }

  .lang {
    top: 29.9px;
    right: 22px;
  }

  .hero {
    margin: 0;
  }

  .download {
    border-radius: 9px;
  }

  .games {
    width: 100vw;
    max-width: none;
    margin: 0 0 -24px;
  }

  .game-row {
    width: 100vw;
    justify-content: flex-start;
    padding: 0 22px 24px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
  }

  .games__tagline {
    width: 100vw;
    max-width: none;
    margin: 0 auto;
    padding: 0 22px;
  }

  .game-row::-webkit-scrollbar {
    display: none;
  }

  .game {
    scroll-snap-align: center;
  }

  .footer {
    padding-right: 22px;
    padding-left: 22px;
  }

  .footer__line {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    width: 100%;
  }

  .footer__socials {
    flex: 0 0 100%;
  }

  .footer__about {
    order: 2;
  }

  .footer__copy {
    order: 3;
  }
}

@media (max-height: 720px) {
  .modal-layer {
    align-items: start;
    padding-top: 52px;
    padding-bottom: 20px;
  }
}

@media (max-width: 720px) {
  /* The account cluster is wider than the free space beside the logo on
     narrow screens, so it gets its own centred row under the header. */
  .topbar__inner.has-account {
    row-gap: 0;
  }

  .topbar__inner.has-account .account {
    grid-row: 2;
    grid-column: 1 / -1;
    justify-self: center;
    margin-top: 14px;
    margin-left: 0;
  }
}

@media (max-width: 640px) {
  :root {
    --topbar-shift: calc(21.9375px + 0.25 * clamp(20px, 6vw, 42px));
    --flow-gap: clamp(22px, 3.4vh, 34px);
    --brand-size: 52px;
    --brand-radius: 8px;
  }

  .account__level {
    width: 128px;
    padding: 7px 11px 8px;
  }

  .account__signout {
    padding: 8px 11px 9px;
  }

  .topbar {
    height: auto;
    padding-top: 18px;
  }

  .topbar__inner {
    gap: clamp(20px, 6vw, 42px);
  }

  .brand {
    width: 66px;
  }

  .brand__mark {
    width: 52px;
    height: 52px;
    border-radius: 8px;
  }

  .brand__wordmark {
    padding-left: 0.2em;
    font-size: 8.5px;
    letter-spacing: 0.2em;
  }

  .online,
  .login {
    margin-top: 4px;
    font-size: 12px;
  }

  .online svg {
    width: 14px;
    height: 14px;
  }

  .lang {
    top: 22px;
    right: 15px;
    width: 44px;
    height: 44px;
    font-size: 10px;
  }

  .hero {
    margin: 0;
  }

  .download {
    border-radius: 8px;
  }

  .games {
    width: 100vw;
    margin: 0 0 -24px;
  }

  .game-row {
    width: 100vw;
    padding: 0 16px 24px;
  }

  .games__tagline {
    width: 100vw;
    margin: 0 auto;
    padding: 0 16px;
  }

  :root {
    --card-w: min(72vw, 270px);
    --card-radius: 16px;
  }

  .modal {
    width: calc(100vw - 28px);
  }

  .about,
  .contact {
    width: min(400px, calc(100vw - 28px));
  }

  .online-modal {
    width: min(400px, calc(100vw - 28px));
  }

  .footer {
    padding: 0 16px 12px;
  }

  .footer__line {
    font-size: 12px;
  }

  .modal-layer {
    padding: 14px;
    align-items: center;
  }

  .detail {
    --detail-band-gap: 16px;
    width: 100%;
  }

  .detail__head {
    padding: 0 40px;
  }

  .detail__close {
    width: 34px;
    height: 34px;
  }

  .detail__sheet {
    border-radius: 18px;
  }

  .detail__preview {
    min-height: 250px;
    max-height: 300px;
  }

  .detail__badges {
    top: 12px;
    left: 12px;
  }

  .detail__main {
    padding: 12px 12px 14px;
  }

  .detail__screen {
    border-radius: 12px;
  }

  .detail__thumbs {
    gap: 4px;
  }

  .detail__thumb {
    border-radius: 6px;
  }

  .detail__specs {
    gap: 10px;
  }

  .detail__side {
    --detail-side-pad: 14px;
    --detail-main-pad-bottom: 14px;
    padding: var(--detail-side-pad);
  }

  .modal__close {
    top: -34px;
    right: 13px;
  }

  .auth {
    padding: 20px 18px 18px;
  }

  .auth__title {
    font-size: 13px;
  }

  .auth__tabs {
    margin-top: 18px;
  }

  .field__grid {
    grid-template-columns: 1fr 1fr;
    column-gap: 12px;
  }

  .field__head {
    gap: 4px;
  }

  .field__head .field__error {
    font-size: 9px;
    letter-spacing: 0.03em;
  }

  .auth__row {
    gap: 10px;
  }

  .about {
    width: min(400px, 100%);
    padding: 21px 18px 24px;
  }

  .contact {
    width: min(400px, 100%);
    padding: 21px 18px 18px;
  }

  .about__social {
    margin-top: 24px;
  }

  .about__text {
    margin-top: 24px;
    font-size: 12px;
  }

  .online-modal {
    width: min(400px, 100%);
    height: min(468px, calc(100vh - 64px));
    padding: 20px 17px 20px;
  }

  .tweak {
    right: 12px;
    bottom: 12px;
    width: min(300px, calc(100vw - 24px));
  }
}

@media (max-width: 380px) {
  :root {
    --topbar-shift: 23.75px;
  }

  .topbar__inner {
    gap: 18px;
  }

  .online {
    width: 92px;
  }

  .login {
    width: 84px;
  }

  .online span {
    display: none;
  }

  .auth__row {
    align-items: flex-start;
    flex-direction: column;
  }

  .auth__submit {
    margin-top: 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
