:root {
  color-scheme: dark;
  --bg: #050505;
  --bg-2: #0a0a0a;
  --surface: #0f0f0f;
  --surface-2: #171717;
  --surface-3: #222;
  --paper: #f5f2ec;
  --paper-2: #d9d5cc;
  --text: #f8f8f5;
  --muted: #9b9b96;
  --soft: #c9c9c3;
  --line: rgba(248, 248, 245, 0.14);
  --line-strong: rgba(248, 248, 245, 0.28);
  --accent: #c7ad6d;
  --accent-dark: #8f7a45;
  --ink: #050505;
  --radius: 8px;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: var(--bg);
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(90deg, rgba(248, 248, 245, 0.035) 1px, transparent 1px),
    linear-gradient(180deg, rgba(248, 248, 245, 0.028) 1px, transparent 1px),
    var(--bg);
  background-size: 72px 72px, 72px 72px;
  color: var(--text);
}

body.sheet-open {
  overflow: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 28px;
  align-items: center;
  min-height: 76px;
  padding: 16px clamp(16px, 4vw, 56px);
  border-bottom: 1px solid var(--line);
  background: rgba(5, 5, 5, 0.88);
  backdrop-filter: blur(18px);
}

.brand,
.top-nav,
.store-actions,
.trust-row,
.filter-row,
.app-header,
.app-top-row,
.tabs,
.sheet-actions {
  display: flex;
  align-items: center;
}

.brand {
  gap: 12px;
  min-width: fit-content;
}

.brand-mark {
  position: relative;
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--paper);
  border-radius: 4px;
  background:
    repeating-linear-gradient(135deg, var(--paper) 0 5px, var(--ink) 5px 10px),
    var(--paper);
}

.brand-mark::after {
  content: "";
  position: absolute;
  inset: 7px;
  border: 1px solid rgba(5, 5, 5, 0.82);
}

.brand-mark span {
  position: relative;
  z-index: 1;
  width: 17px;
  height: 17px;
  border: 2px solid var(--ink);
  border-left-color: transparent;
  border-radius: 50%;
  background: rgba(245, 242, 236, 0.86);
}

.brand-name {
  font-size: 14px;
  font-weight: 950;
  letter-spacing: 0.08em;
}

.top-nav {
  justify-content: center;
  gap: 28px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.top-nav a:hover {
  color: var(--paper);
}

.nav-cta,
.button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  background: rgba(248, 248, 245, 0.04);
  color: var(--text);
  font-weight: 900;
  letter-spacing: 0.02em;
}

.nav-cta,
.button.primary {
  border-color: var(--paper);
  background: var(--paper);
  color: var(--ink);
}

.button.secondary {
  background: transparent;
}

.button.full {
  width: 100%;
}

.storefront {
  display: grid;
  grid-template-columns: minmax(300px, 0.66fr) minmax(0, 1.34fr);
  gap: clamp(30px, 5vw, 72px);
  align-items: start;
  min-height: calc(100vh - 76px);
  padding: clamp(34px, 6vw, 86px) clamp(16px, 4vw, 56px) 54px;
}

.store-copy {
  position: sticky;
  top: 108px;
  max-width: 610px;
  padding-top: 8px;
}

.store-copy::before {
  content: "ZD / 01";
  display: block;
  width: fit-content;
  margin-bottom: 26px;
  padding: 7px 9px;
  border: 1px solid var(--line);
  color: var(--paper-2);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.12em;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

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

h1 {
  max-width: 820px;
  margin-bottom: 22px;
  font-size: clamp(52px, 9vw, 116px);
  line-height: 0.82;
  letter-spacing: 0;
  text-transform: uppercase;
}

h2 {
  margin-bottom: 14px;
  font-size: clamp(32px, 4.6vw, 58px);
  line-height: 0.95;
  letter-spacing: 0;
  text-transform: uppercase;
}

.lead {
  max-width: 640px;
  color: var(--soft);
  font-size: 18px;
  line-height: 1.72;
}

.store-actions {
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 30px;
}

.trust-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  margin-top: 32px;
  border: 1px solid var(--line);
}

.trust-row span,
.app-top-row span {
  min-height: 38px;
  padding: 11px 12px;
  border-right: 1px solid var(--line);
  background: rgba(248, 248, 245, 0.025);
  color: var(--paper-2);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.trust-row span:last-child {
  border-right: 0;
}

.catalog-panel {
  min-width: 0;
}

.catalog-toolbar {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto;
  gap: 12px;
  align-items: end;
  margin-bottom: 12px;
}

.search-box {
  display: grid;
  gap: 7px;
}

.search-box span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.search-box input {
  width: 100%;
  height: 48px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 4px;
  outline: none;
  background: rgba(248, 248, 245, 0.035);
  color: var(--text);
}

.search-box input:focus {
  border-color: var(--paper);
  background: rgba(248, 248, 245, 0.06);
}

.filter-row {
  gap: 0;
  overflow-x: auto;
  border: 1px solid var(--line);
}

.filter-chip,
.tab {
  min-height: 38px;
  padding: 0 13px;
  border: 0;
  border-right: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}

.filter-chip:last-child,
.tab:last-child {
  border-right: 0;
}

.filter-chip.active,
.tab.active {
  background: var(--paper);
  color: var(--ink);
}

.game-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(138px, 1fr));
  gap: 1px;
  border: 1px solid var(--line);
  background: var(--line);
}

.game-tile {
  position: relative;
  display: grid;
  align-content: start;
  gap: 12px;
  min-height: 204px;
  overflow: hidden;
  padding: 18px;
  border: 0;
  border-radius: 0;
  background:
    linear-gradient(180deg, rgba(248, 248, 245, 0.045), rgba(248, 248, 245, 0.015)),
    var(--bg-2);
}

.game-tile:hover {
  background:
    linear-gradient(180deg, rgba(248, 248, 245, 0.08), rgba(248, 248, 245, 0.02)),
    #0d0d0d;
}

.game-tile[hidden] {
  display: none;
}

.game-tile.is-featured {
  grid-column: span 2;
  min-height: 244px;
}

.game-tile img {
  width: 64px;
  height: 64px;
  border: 1px solid rgba(248, 248, 245, 0.18);
  border-radius: 8px;
  filter: grayscale(1) contrast(1.08);
  object-fit: cover;
}

.game-tile::after {
  content: "";
  position: absolute;
  right: 16px;
  bottom: 16px;
  width: 42px;
  height: 42px;
  border-right: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line-strong);
  pointer-events: none;
}

.tile-badge,
.product-badge,
.status-pill,
.app-product-badge {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: rgba(248, 248, 245, 0.03);
  color: var(--paper-2);
  font-size: 10px;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.game-tile strong {
  margin-top: 4px;
  font-size: 21px;
  line-height: 1.02;
  letter-spacing: 0;
}

.game-tile small {
  max-width: 260px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.section {
  padding: 70px clamp(16px, 4vw, 56px);
  border-top: 1px solid var(--line);
}

.section-head {
  max-width: 760px;
  margin-bottom: 24px;
}

.strip-section {
  background:
    repeating-linear-gradient(135deg, rgba(248, 248, 245, 0.035) 0 1px, transparent 1px 18px),
    #080808;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  border: 1px solid var(--line);
  background: var(--line);
}

.feature-item {
  display: grid;
  gap: 10px;
  min-height: 160px;
  padding: 22px;
  border: 0;
  border-radius: 0;
  background: var(--bg-2);
}

.feature-item strong {
  font-size: 18px;
}

.feature-item span,
.support-section p {
  color: var(--muted);
  line-height: 1.6;
}

.support-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 22px;
  align-items: center;
  background:
    linear-gradient(90deg, rgba(248, 248, 245, 0.05), transparent 52%),
    #050505;
}

.support-section p {
  max-width: 700px;
  margin-bottom: 0;
}

.miniapp {
  background:
    linear-gradient(90deg, rgba(248, 248, 245, 0.032) 1px, transparent 1px),
    linear-gradient(180deg, rgba(248, 248, 245, 0.026) 1px, transparent 1px),
    var(--tg-bg, var(--bg));
  background-size: 56px 56px;
}

.app-shell {
  width: min(720px, 100%);
  min-height: 100vh;
  margin: 0 auto;
  padding: 14px 12px 40px;
}

.app-header {
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.compact-brand .brand-mark {
  width: 36px;
  height: 36px;
}

.compact-brand .brand-name {
  font-size: 12px;
}

.app-top {
  min-height: 156px;
  margin-bottom: 12px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    repeating-linear-gradient(135deg, rgba(248, 248, 245, 0.07) 0 8px, transparent 8px 16px),
    #090909;
}

.app-top h1 {
  margin-bottom: 18px;
  font-size: 38px;
  line-height: 0.92;
  text-transform: uppercase;
}

.app-top-row {
  flex-wrap: wrap;
  gap: 0;
  border: 1px solid var(--line);
}

.app-top-row span {
  border-right: 1px solid var(--line);
}

.app-section {
  margin-bottom: 12px;
}

.app-search input {
  height: 46px;
}

.tabs {
  gap: 0;
  overflow-x: auto;
  border: 1px solid var(--line);
}

.app-products {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  border: 1px solid var(--line);
  background: var(--line);
}

.app-product {
  position: relative;
  display: grid;
  grid-template-rows: 76px 1fr auto;
  gap: 10px;
  width: 100%;
  min-height: 232px;
  padding: 12px;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background: var(--bg-2);
  color: inherit;
  text-align: left;
}

.app-product::before {
  content: "";
  position: absolute;
  right: 12px;
  bottom: 12px;
  width: 36px;
  height: 36px;
  border-right: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line-strong);
  pointer-events: none;
}

.app-product-image {
  display: block;
  width: 76px;
  height: 76px;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--surface-2);
}

.app-product-image img {
  width: 100%;
  height: 100%;
  filter: grayscale(1) contrast(1.08);
  object-fit: cover;
}

.app-letter {
  display: grid;
  width: 100%;
  height: 100%;
  place-items: center;
  background: var(--surface-2);
  color: var(--text);
  font-size: 40px;
  font-weight: 950;
}

.app-product-meta {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.app-product strong {
  font-size: 18px;
  line-height: 1.06;
}

.app-product small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.38;
}

.app-product-price {
  position: relative;
  z-index: 1;
  width: fit-content;
  min-height: 28px;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(248, 248, 245, 0.04);
  color: var(--paper);
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 0.04em;
}

.collection-grid {
  display: grid;
  gap: 1px;
  margin-top: 16px;
  border: 1px solid var(--line);
  background: var(--line);
}

.collection-choice {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  width: 100%;
  min-height: 84px;
  padding: 12px;
  border: 0;
  border-radius: 0;
  background: var(--bg-2);
  color: var(--text);
  text-align: left;
}

.collection-choice-image {
  display: block;
  width: 58px;
  height: 58px;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--surface-2);
}

.collection-choice-image img {
  width: 100%;
  height: 100%;
  filter: grayscale(1) contrast(1.08);
  object-fit: cover;
}

.collection-choice span:not(.collection-choice-image) {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.collection-choice strong {
  font-size: 15px;
  line-height: 1.15;
}

.collection-choice small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.32;
}

.collection-choice b {
  width: max-content;
  color: var(--paper-2);
  font-size: 11px;
  letter-spacing: 0.04em;
}

.accent-jade,
.accent-gold,
.accent-sky,
.accent-blue,
.accent-violet,
.accent-amber,
.accent-steel,
.accent-carbon,
.accent-red {
  --card-accent: rgba(248, 248, 245, 0.18);
}

.sheet {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: none;
  align-items: flex-end;
  background: rgba(0, 0, 0, 0.72);
}

.sheet[aria-hidden="false"] {
  display: flex;
}

.sheet-panel {
  position: relative;
  width: min(720px, 100%);
  max-height: min(86vh, 760px);
  margin: 0 auto;
  overflow-y: auto;
  padding: 18px 12px 24px;
  border: 1px solid var(--line);
  border-bottom: 0;
  border-radius: 8px 8px 0 0;
  background: #080808;
}

.sheet-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(248, 248, 245, 0.05);
  color: var(--text);
  font-size: 23px;
  line-height: 1;
}

.sheet-head {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding-right: 42px;
}

.sheet-head.no-image {
  grid-template-columns: minmax(0, 1fr);
}

.sheet-head img {
  width: 74px;
  height: 74px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  filter: grayscale(1) contrast(1.08);
  object-fit: cover;
}

.sheet-panel h2 {
  margin: 9px 0 0;
  font-size: 30px;
  line-height: 0.96;
  text-transform: uppercase;
}

.sheet-panel p {
  margin: 14px 0 0;
  color: var(--muted);
  line-height: 1.52;
}

.step-pane {
  display: none;
}

.step-pane.active {
  display: block;
}

.option-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  margin: 16px 0 12px;
  border: 1px solid var(--line);
  background: var(--line);
}

.option {
  display: grid;
  gap: 4px;
  min-height: 64px;
  padding: 11px;
  border: 0;
  border-radius: 0;
  background: var(--bg-2);
  color: var(--text);
  text-align: left;
}

.option span {
  font-size: 13px;
  font-weight: 900;
  line-height: 1.18;
}

.option strong {
  color: var(--paper-2);
  font-size: 12px;
}

.option.active {
  background: var(--paper);
  color: var(--ink);
}

.option.active strong {
  color: var(--ink);
}

.sheet-input {
  margin-bottom: 10px;
}

.sheet-hint {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.hidden {
  display: none !important;
}

.confirm-box,
.result-box {
  display: grid;
  gap: 12px;
  margin: 16px 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: rgba(248, 248, 245, 0.035);
}

.confirm-box dl {
  display: grid;
  gap: 9px;
  margin: 0;
}

.confirm-box div {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  gap: 10px;
}

.confirm-box dt {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.confirm-box dd {
  margin: 0;
  color: var(--text);
  font-weight: 900;
  word-break: break-word;
}

.sheet-actions {
  gap: 8px;
}

.result-box span {
  color: var(--muted);
  line-height: 1.45;
}

@media (max-width: 1120px) {
  .game-grid {
    grid-template-columns: repeat(3, minmax(138px, 1fr));
  }
}

@media (max-width: 900px) {
  .site-header {
    grid-template-columns: auto auto;
  }

  .top-nav {
    display: none;
  }

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

  .store-copy {
    position: static;
  }

  .catalog-toolbar,
  .feature-grid,
  .support-section {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .site-header {
    min-height: 64px;
    padding: 12px;
  }

  .brand-name {
    font-size: 12px;
  }

  .nav-cta {
    display: none;
  }

  .storefront {
    padding: 24px 12px 36px;
  }

  h1 {
    font-size: 48px;
  }

  .lead {
    font-size: 16px;
  }

  .trust-row {
    grid-template-columns: 1fr;
  }

  .trust-row span {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .trust-row span:last-child {
    border-bottom: 0;
  }

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

  .game-tile,
  .game-tile.is-featured {
    grid-column: auto;
    min-height: 184px;
    padding: 13px;
  }

  .game-tile img {
    width: 58px;
    height: 58px;
  }

  .game-tile strong {
    font-size: 16px;
  }

  .game-tile small {
    font-size: 12px;
  }

  .section {
    padding: 48px 12px;
  }

  .store-actions .button {
    width: 100%;
  }
}

@media (max-width: 390px) {
  .app-products {
    grid-template-columns: 1fr;
  }

  .app-product {
    grid-template-rows: 76px 1fr auto;
    min-height: 210px;
  }

  .option-grid {
    grid-template-columns: 1fr;
  }

  .collection-choice {
    grid-template-columns: 52px minmax(0, 1fr);
  }

  .collection-choice b {
    grid-column: 2;
  }
}
