:root {
  --ink: #080a0b;
  --panel: #111516;
  --panel-2: #171c1d;
  --paper: #ece8dc;
  --muted: #9aa19f;
  --line: #303637;
  --mint: #79d8c4;
  --mint-dark: #071b17;
  --gold: #c9a750;
  --danger: #ff8278;
  --poster-paper: #e7e1d3;
  --poster-ink: #101314;
  --poster-red: #e04d46;
  --paste: rgba(218, 224, 213, .34);
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  color: var(--paper);
  background:
    radial-gradient(circle at 82% 4%, rgba(121, 216, 196, .11), transparent 27rem),
    repeating-linear-gradient(0deg, transparent 0 63px, rgba(231,225,211,.025) 64px 66px),
    repeating-linear-gradient(90deg, transparent 0 119px, rgba(231,225,211,.018) 120px 122px),
    var(--ink);
  font-family: "Archivo", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body::before {
  position: fixed;
  z-index: -1;
  inset: 0;
  background-image: repeating-linear-gradient(96deg, transparent 0 7px, rgba(255,255,255,.014) 8px 9px);
  content: "";
  pointer-events: none;
}

button, input, textarea, select { font: inherit; }
button, input, textarea, select, a { min-height: 44px; }

button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
a:focus-visible {
  outline: 3px solid var(--paper);
  outline-offset: 3px;
}

.counter-shell { min-width: 0; }

.counter-hero,
.wallet-gate,
.catalog-section,
.orders-section,
.counter-rules {
  width: min(1440px, calc(100% - 64px));
  margin-inline: auto;
}

.counter-hero {
  position: relative;
  min-height: 690px;
  padding: clamp(64px, 8vw, 122px) 0 72px;
  border-bottom: 1px solid var(--line);
}

.counter-hero::after,
.dialog-ticket::after {
  position: absolute;
  inset: auto -20px -11px 24%;
  height: 22px;
  background: var(--ink);
  clip-path: polygon(0 18%, 4% 53%, 9% 14%, 15% 66%, 21% 24%, 27% 72%, 35% 20%, 44% 67%, 51% 25%, 59% 76%, 67% 20%, 75% 63%, 82% 18%, 90% 70%, 100% 30%, 100% 100%, 0 100%);
  content: "";
}

.hero-route {
  display: flex;
  align-items: center;
  max-width: 720px;
  margin-bottom: 48px;
  color: var(--mint);
  font: 700 12px/1 "Archivo", sans-serif;
  letter-spacing: .16em;
}

.hero-route i { flex: 1; height: 5px; margin: 0 15px; background: var(--mint); }

.hero-route span {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 3px solid var(--mint);
  border-radius: 50%;
}

.hero-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(280px, .65fr); gap: clamp(40px, 8vw, 120px); align-items: end; }
.eyebrow { margin: 0 0 16px; color: var(--mint); font-size: 11px; font-weight: 700; letter-spacing: .15em; text-transform: uppercase; }

h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { font-family: "Barlow Condensed", "Arial Narrow", sans-serif; text-transform: uppercase; }

h1 {
  display: grid;
  margin-bottom: 0;
  font-size: clamp(110px, 17vw, 258px);
  font-weight: 800;
  line-height: .66;
  letter-spacing: -.065em;
}

h1 b { color: var(--mint); font-weight: inherit; }
.counter-name { margin: 42px 0 18px; font: 700 clamp(32px, 4vw, 62px)/.9 "Barlow Condensed", sans-serif; text-transform: uppercase; }
.hero-intro { max-width: 690px; color: #c0c5c2; font-size: clamp(16px, 1.8vw, 22px); line-height: 1.55; }
.hero-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.hero-tags span { padding: 9px 12px; border: 1px solid var(--line); color: var(--muted); font-size: 10px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }

.counter-token {
  position: relative;
  isolation: isolate;
  padding: 32px;
  border: 10px solid var(--poster-paper);
  background:
    linear-gradient(rgba(255,255,255,.025), rgba(255,255,255,0)),
    repeating-linear-gradient(0deg, #151a1b 0 54px, #101415 55px 56px);
  box-shadow: 0 22px 54px rgba(0,0,0,.42), 0 0 0 1px rgba(236,232,220,.2);
}

.counter-token::before { position: absolute; z-index: -1; inset: -5px; border: 1px dashed rgba(8,10,11,.52); content: ""; pointer-events: none; }
.counter-token::after {
  position: absolute;
  z-index: 3;
  top: -16px;
  left: 50%;
  width: 38%;
  height: 24px;
  background: var(--paste);
  box-shadow: 0 1px 0 rgba(255,255,255,.16);
  clip-path: polygon(2% 18%, 98% 0, 100% 78%, 3% 100%);
  content: "";
  pointer-events: none;
  translate: -50% 0;
}
.counter-token p, .counter-token strong { position: relative; z-index: 1; }
.counter-token p { color: var(--muted); font-size: 10px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.counter-token img { position: relative; z-index: 1; display: block; width: min(100%, 330px); margin: 20px auto; filter: drop-shadow(0 20px 30px rgba(0,0,0,.5)); }
.counter-token strong { display: block; font: 700 30px/.95 "Barlow Condensed", sans-serif; text-transform: uppercase; }

.wallet-gate,
.orders-section,
.counter-rules { display: grid; grid-template-columns: .8fr 1.2fr; gap: clamp(40px, 8vw, 120px); padding: 100px 0; border-bottom: 1px solid var(--line); }
h2 { margin-bottom: 22px; font-size: clamp(48px, 7vw, 94px); line-height: .86; letter-spacing: -.035em; }
.wallet-gate > div > p:last-child, .orders-section > div > p:last-child { max-width: 560px; color: var(--muted); line-height: 1.7; }

.wallet-console,
.order-lookup { align-self: center; padding: clamp(24px, 4vw, 52px); border: 1px solid var(--line); background: var(--panel); }
.wallet-console label, .order-lookup label, .field-wrap label { display: block; margin: 22px 0 9px; color: #c6cbc8; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.or-copy { display: block; margin-top: 18px; color: var(--muted); font-size: 11px; text-transform: uppercase; }
.wallet-address-row, .order-row { display: grid; grid-template-columns: 1fr auto; gap: 10px; }

input, textarea, select {
  width: 100%;
  min-height: 50px;
  padding: 13px 15px;
  border: 1px solid #495152;
  border-radius: 0;
  color: var(--paper);
  background: #090c0d;
}
textarea { min-height: 120px; resize: vertical; }
input::placeholder, textarea::placeholder { color: #6f7776; }

.button,
.filter-button,
.wallet-option,
.dialog-close {
  border: 1px solid transparent;
  border-radius: 0;
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.button { min-height: 50px; padding: 13px 18px; }
.button-primary { color: var(--mint-dark); background: var(--mint); }
.button-secondary { border-color: #596162; color: var(--paper); background: transparent; }
.button:hover:not(:disabled) { filter: brightness(1.08); }
.button:disabled { cursor: not-allowed; opacity: .46; }
.status-line { min-height: 22px; margin: 16px 0 0; color: var(--muted); font-size: 12px; line-height: 1.6; }
.status-line.is-error { color: var(--danger); }

.balance-bar {
  position: sticky;
  z-index: 900;
  top: 0;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 28px;
  align-items: center;
  width: min(1440px, calc(100% - 32px));
  margin: 0 auto;
  padding: 15px 20px;
  border: 1px solid var(--mint);
  background: rgba(8, 14, 13, .96);
  box-shadow: 0 18px 44px rgba(0,0,0,.32);
  backdrop-filter: blur(12px);
}
.balance-bar > div { display: flex; align-items: baseline; gap: 8px; }
.balance-bar span, .balance-bar small { color: var(--muted); font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.balance-bar strong { color: var(--mint); font: 700 34px/1 "Barlow Condensed", sans-serif; }
.balance-bar p { margin: 0; overflow: hidden; color: #b4bab7; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }

.catalog-section { padding: 105px 0; }
.section-heading { display: grid; grid-template-columns: 1fr minmax(280px, 520px); gap: 60px; align-items: end; }
.section-heading > p { color: var(--muted); line-height: 1.7; }
.filter-line { display: flex; flex-wrap: wrap; gap: 8px; margin: 38px 0 28px; }
.filter-button { display: inline-flex; min-height: 46px; padding: 0 17px; align-items: center; gap: 9px; border-color: var(--line); color: #b6bcba; background: #101415; }
.filter-button i { width: 8px; height: 8px; border-radius: 50%; background: var(--mint); }
.filter-button.is-active { border-color: var(--mint); color: var(--ink); background: var(--mint); }
.filter-button.is-active i { background: var(--ink); }
.filter-grand i { background: var(--gold); }
.filter-grand.is-active { border-color: var(--gold); color: var(--ink); background: var(--gold); }
.catalog-status { min-height: 24px; color: var(--muted); font-size: 12px; }
.product-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 26px 18px;
  padding: 22px;
  background:
    linear-gradient(rgba(8,10,11,.76), rgba(8,10,11,.76)),
    repeating-linear-gradient(90deg, #222829 0 112px, #181d1e 113px 116px);
  box-shadow: inset 0 0 0 1px rgba(231,225,211,.08);
}

.product-card {
  position: relative;
  isolation: isolate;
  display: flex;
  min-width: 0;
  min-height: 520px;
  flex-direction: column;
  border: 8px solid var(--poster-paper);
  color: var(--poster-paper);
  background:
    repeating-linear-gradient(0deg, rgba(255,255,255,.018) 0 1px, transparent 1px 5px),
    var(--poster-ink);
  box-shadow: 0 14px 26px rgba(0,0,0,.32);
  transition: transform .2s ease, border-color .2s ease;
}
.product-card::after {
  position: absolute;
  z-index: 4;
  top: -13px;
  left: 50%;
  width: 34%;
  height: 18px;
  background: var(--paste);
  clip-path: polygon(0 20%, 98% 0, 100% 78%, 3% 100%);
  content: "";
  pointer-events: none;
  translate: -50% 0;
}
.product-card:nth-child(3n + 2) { transform: none; }
.product-card:hover { z-index: 2; border-color: #64706e; transform: translateY(-4px); }
.product-card.is-grand { border-color: rgba(201, 167, 80, .55); }
.product-art {
  position: relative;
  display: grid;
  overflow: hidden;
  aspect-ratio: 1.3;
  padding: 28px;
  align-content: space-between;
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(90deg, transparent 49%, rgba(121,216,196,.18) 50%, transparent 51%),
    repeating-linear-gradient(0deg, #0a0d0e 0 34px, #161b1c 35px 36px);
}
.product-art::before { position: absolute; inset: 18px; border: 1px dashed #4b5352; content: ""; }
.art-wallpaper,
.art-product-display { display: block; padding: 0; background: #080a0b; }
.art-wallpaper::before,
.art-product-display::before { z-index: 2; }
.art-wallpaper img,
.art-product-display img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center; }
.art-wallpaper .art-borough,
.art-product-display .art-borough { position: absolute; z-index: 3; bottom: 24px; left: 28px; padding: 8px 10px; color: var(--paper); background: rgba(8,10,11,.84); }
.art-custom { background: repeating-linear-gradient(102deg, #111516 0 42px, #172321 43px 45px); }
.art-physical { background: linear-gradient(145deg, #1a2021 0 48%, #0b0e0f 49% 100%); }
.art-vault { background: radial-gradient(circle, #101415 0 24%, #79d8c4 25% 27%, #101415 28% 43%, #3e4846 44% 46%, #090c0d 47%); }
.art-grand { color: var(--gold); background: radial-gradient(circle, #c9a750 0 22%, #0a0c0d 23% 43%, #c9a750 44% 46%, #080a0b 47%); }
.art-borough, .art-route { position: relative; z-index: 1; font-size: 10px; font-weight: 700; letter-spacing: .13em; text-transform: uppercase; }
.art-borough { color: var(--mint); }
.art-grand .art-borough { color: var(--gold); }
.art-number { position: relative; z-index: 1; place-self: center; color: var(--paper); font: 800 clamp(72px, 9vw, 126px)/.7 "Barlow Condensed", sans-serif; letter-spacing: -.06em; }
.art-route { max-width: 75%; color: #8f9795; overflow-wrap: anywhere; }
.inventory-stamp { position: absolute; top: 15px; right: 15px; padding: 8px 10px; border: 1px solid currentColor; color: var(--mint); background: rgba(8,10,11,.88); font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; transform: none; }
.is-grand .inventory-stamp, .is-grand .product-points { color: var(--gold); }
.product-copy { display: flex; padding: 23px; flex: 1; flex-direction: column; }
.product-route { color: var(--muted); font-size: 10px; font-weight: 700; letter-spacing: .11em; text-transform: uppercase; }
.product-copy h3 { margin: 13px 0 9px; font-size: clamp(30px, 3vw, 43px); line-height: .95; }
.product-description { color: var(--muted); font-size: 13px; line-height: 1.55; }
.product-footer { display: grid; grid-template-columns: 1fr auto; gap: 14px; align-items: end; margin-top: auto; padding-top: 24px; }
.product-points { display: block; color: var(--mint); font: 700 38px/.9 "Barlow Condensed", sans-serif; }
.product-points small { display: block; margin-top: 7px; color: var(--muted); font: 700 9px/1 "Archivo", sans-serif; letter-spacing: .1em; text-transform: uppercase; }
.product-action { min-width: 138px; }
.shortfall-copy { min-height: 18px; margin: 12px 0 0; color: var(--danger); font-size: 11px; }

.receipt-result { margin-top: 20px; }
.receipt { position: relative; padding: 24px; color: #151718; background: var(--paper); }
.receipt h3 { margin-bottom: 18px; font-size: 36px; }
.receipt dl { display: grid; grid-template-columns: auto 1fr; gap: 10px 18px; margin: 0; font-size: 12px; }
.receipt dt { color: #5e6462; text-transform: uppercase; }
.receipt dd { margin: 0; overflow-wrap: anywhere; font-weight: 700; text-align: right; }
.receipt-download { display: inline-flex; width: 100%; margin-top: 22px; align-items: center; justify-content: center; text-decoration: none; }
.receipt-expiry { margin: 8px 0 0; color: #5e6462; font-size: 10px; text-align: center; }

.counter-rules { border-top: 1px solid var(--line); border-bottom: 0; }
.counter-rules ol { margin: 0; padding: 0; list-style: none; }
.counter-rules li { display: grid; grid-template-columns: 45px 1fr; gap: 20px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.counter-rules li span { color: var(--mint); font: 700 18px/1 "Barlow Condensed", sans-serif; }
.counter-rules li p { margin: 0; color: #b6bcba; line-height: 1.6; }

.counter-footer { display: flex; width: min(1440px, calc(100% - 64px)); min-height: 78px; margin: 0 auto; align-items: center; justify-content: space-between; color: #727a78; font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }

.counter-dialog { width: min(720px, calc(100% - 28px)); max-height: calc(100vh - 28px); padding: 0; border: 1px solid #555e5d; color: var(--paper); background: var(--panel); overflow: auto; }
.counter-dialog::backdrop { background: rgba(0, 0, 0, .8); backdrop-filter: blur(8px); }
.dialog-ticket { position: relative; min-height: 260px; padding: clamp(26px, 5vw, 54px); }
.dialog-ticket::after { background: var(--paper); }
.dialog-close { position: absolute; z-index: 2; top: 15px; right: 15px; width: 44px; height: 44px; color: var(--paper); background: transparent; font-size: 28px; }
.dialog-ticket h2 { padding-right: 42px; font-size: clamp(45px, 8vw, 76px); }
.wallet-options { display: grid; gap: 10px; margin-top: 28px; }
.wallet-option { display: grid; grid-template-columns: 44px 1fr; gap: 14px; align-items: center; min-height: 62px; padding: 8px 14px; border-color: var(--line); color: var(--paper); background: #0b0e0f; text-align: left; }
.wallet-option-mark { display: grid; width: 38px; height: 38px; place-items: center; border-radius: 50%; color: var(--mint-dark); background: var(--mint); }
.wallet-option small { display: block; margin-top: 4px; color: var(--muted); font-size: 9px; }
.detail-top { display: grid; grid-template-columns: 150px 1fr; gap: 24px; margin-bottom: 24px; align-items: center; }
.detail-top .product-art { width: 150px; aspect-ratio: 1; padding: 14px; border: 1px solid var(--line); }
.detail-top .product-art .art-number { font-size: 58px; }
.detail-top .product-art .inventory-stamp { display: none; }
.detail-top h2 { margin-bottom: 8px; }
.detail-price { color: var(--mint); font: 700 32px/1 "Barlow Condensed", sans-serif; }
.confirm-box { margin: 24px 0; padding: 20px; border: 1px solid var(--mint); background: var(--mint-dark); }
.confirm-box strong { display: block; margin-bottom: 8px; color: var(--mint); font: 700 27px/1 "Barlow Condensed", sans-serif; text-transform: uppercase; }
.confirm-box p { margin: 0; color: #b9c5c1; font-size: 12px; line-height: 1.6; }
.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.field-wrap.is-wide { grid-column: 1 / -1; }

@media (max-width: 980px) {
  .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero-grid, .wallet-gate, .orders-section, .counter-rules { grid-template-columns: 1fr; }
  .counter-token { max-width: 430px; }
  .section-heading { grid-template-columns: 1fr; gap: 0; }
}

@media (max-width: 720px) {
  body { padding-bottom: 104px; }
  .counter-hero,
  .wallet-gate,
  .catalog-section,
  .orders-section,
  .counter-rules { width: min(100% - 32px, 1440px); }
  .counter-hero { min-height: auto; padding-top: 62px; }
  h1 { font-size: clamp(92px, 35vw, 160px); }
  .counter-token { max-width: none; }
  .wallet-gate, .orders-section, .counter-rules, .catalog-section { padding-block: 72px; }
  .wallet-console, .order-lookup { padding: 20px; }
  .wallet-address-row, .order-row { grid-template-columns: 1fr; }
  .balance-bar { position: fixed; top: auto; right: 0; bottom: 0; left: 0; grid-template-columns: 1fr auto; gap: 8px 14px; width: 100%; border-right: 0; border-left: 0; }
  .balance-bar p { grid-column: 1 / -1; grid-row: 2; }
  .balance-bar .button { grid-column: 2; grid-row: 1; }
  .product-grid { grid-template-columns: 1fr; margin-inline: -8px; padding: 12px; }
  .product-card { min-height: 0; }
  .filter-line { flex-wrap: nowrap; margin-inline: -16px; padding-inline: 16px; overflow-x: auto; }
  .filter-button { flex: 0 0 auto; }
  .detail-top, .field-grid { grid-template-columns: 1fr; }
  .detail-top .product-art { width: 100%; aspect-ratio: 1.5; }
  .field-wrap.is-wide { grid-column: auto; }
  .counter-footer { width: calc(100% - 32px); flex-direction: column; padding: 24px 0; gap: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
  .product-card:nth-child(3n + 2), .counter-token { transform: none; }
}
