:root {
  --bg: #070b12;
  --surface: rgba(255,255,255,0.035);
  --surface-solid: #0e1520;
  --surface-hover: rgba(255,255,255,0.06);
  --border: rgba(148,163,184,0.14);
  --border-strong: rgba(148,163,184,0.26);
  --text: #edf1f7;
  --text-dim: #8b96aa;
  --text-faint: #576177;
  --gold: #f0b429;
  --gold-dim: rgba(240,180,41,0.14);
  --crimson: #ef4444;
  --green: #3ddc84;
  --red: #ff5c6c;
  color-scheme: dark;
}
* { box-sizing: border-box; }
button {
  appearance: none; -webkit-appearance: none; -moz-appearance: none;
  font-family: inherit; font-size: inherit; color: inherit; margin: 0;
}
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: 'Sora', system-ui, sans-serif; font-size: 15.5px; line-height: 1.6;
  position: relative;
}
a { color: var(--gold); text-decoration: none; }
h1, h2, h3 { font-family: 'Sora', system-ui, sans-serif; text-wrap: balance; margin: 0; }
.mono { font-family: 'JetBrains Mono', monospace; }
img { max-width: 100%; display: block; }
.wrap { max-width: 1080px; margin: 0 auto; padding-inline: 20px; position: relative; z-index: 1; }

/* ambient glow background, Collectr-style */
.glow-field { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.glow-field::before, .glow-field::after, .glow-field .orb3 {
  content: ''; position: absolute; border-radius: 50%; filter: blur(90px); opacity: .28;
}
.glow-field::before { width: 560px; height: 560px; background: var(--gold); top: -180px; left: -120px; }
.glow-field::after { width: 520px; height: 520px; background: var(--crimson); top: 220px; right: -160px; opacity: .16; }
.glow-field .orb3 { width: 480px; height: 480px; background: #6a7bff; bottom: -220px; left: 30%; opacity: .14; }
.glow-field .grid {
  position: absolute; inset: 0;
  background-image: radial-gradient(rgba(148,163,184,0.14) 1px, transparent 1px);
  background-size: 26px 26px; mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 40%, transparent 100%);
}

/* nav */
nav {
  position: sticky; top: 0; z-index: 20; backdrop-filter: blur(14px) saturate(140%);
  background: rgba(7,11,18,0.72); border-bottom: 1px solid var(--border);
}
nav .wrap { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding-block: 13px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; }
.brand img { width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--border-strong); }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-name { font-weight: 700; font-size: 14.5px; letter-spacing: 0.09em; }
.brand-tag { font-size: 9px; letter-spacing: 0.14em; color: var(--text-faint); font-family: 'JetBrains Mono', monospace; }
.badge-ribbon {
  margin-left: auto; display: flex; align-items: center; gap: 6px; font-size: 10.5px; letter-spacing: .06em;
  padding: 6px 12px; border-radius: 8px; background: var(--surface); border: 1px solid var(--border-strong);
  color: var(--text-dim); font-family: 'JetBrains Mono', monospace;
}
.badge-ribbon b { color: var(--gold); }

/* hero */
.hero { position: relative; overflow: hidden; border-bottom: 1px solid var(--border); }
.hero-bg { position: absolute; inset: 0; background: url('/static/dragon-mascot.jpg') center 30% / cover; opacity: .55; }
.hero-scrim { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(7,11,18,0.35) 0%, rgba(7,11,18,0.72) 55%, var(--bg) 100%); }
.hero-inner { position: relative; padding-block: 76px 56px; display: flex; flex-direction: column; gap: 16px; }
.eyebrow {
  font-family: 'JetBrains Mono', monospace; font-size: 11.5px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--gold); display: flex; align-items: center; gap: 8px;
}
.eyebrow::before { content: ''; width: 6px; height: 6px; background: var(--gold); border-radius: 50%; box-shadow: 0 0 10px var(--gold); }
h1.title {
  font-size: clamp(32px, 6vw, 50px); font-weight: 800; letter-spacing: -0.01em; max-width: 15ch;
}
.tagline { color: var(--text-dim); max-width: 56ch; font-size: 16px; }
.hero-ctas { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 6px; }
.btn {
  font-family: 'Sora', sans-serif; font-weight: 700; font-size: 13.5px; text-decoration: none;
  padding: 10px 18px; border-radius: 9px; display: inline-flex; align-items: center; gap: 8px;
  border: none; cursor: pointer;
}
.btn-primary { background: var(--gold); color: #04130f; }
.btn-primary:hover { filter: brightness(1.08); }
.btn-primary:disabled { opacity: .4; cursor: not-allowed; filter: none; }
.btn-ghost { background: var(--surface); border: 1px solid var(--border-strong); color: var(--text); backdrop-filter: blur(10px); }
.btn-ghost:hover { border-color: var(--gold); color: var(--gold); }

section { padding-block: 48px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 22px; flex-wrap: wrap; }
.section-head h2 { font-size: 21px; font-weight: 700; }
.section-note { color: var(--text-faint); font-size: 12.5px; }
.view-all { font-size: 12.5px; font-weight: 600; }

/* glass panel base */
.panel {
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px;
  backdrop-filter: blur(16px) saturate(140%);
}

/* news */
#news { border-bottom: 1px solid var(--border); }
.news-grid { display: flex; flex-direction: column; gap: 10px; }
.news-card { padding: 16px 18px; transition: border-color .15s ease, background .15s ease; }
.news-card:hover { border-color: var(--border-strong); background: var(--surface-hover); }
.news-top { display: flex; align-items: center; gap: 10px; margin-bottom: 7px; flex-wrap: wrap; }
.news-date { font-family: 'JetBrains Mono', monospace; font-size: 11.5px; color: var(--text-faint); }
.tag { font-size: 10px; padding: 3px 9px; border-radius: 20px; background: var(--gold-dim); border: 1px solid rgba(240,180,41,0.3); color: var(--gold); font-family: 'JetBrains Mono', monospace; letter-spacing: .05em; }
.tag-region { background: rgba(239,68,68,0.14); border-color: rgba(239,68,68,0.35); color: var(--crimson); }
.tag[data-ftype] { cursor: pointer; }
.tag[data-ftype]:hover { background: var(--gold); color: #04130f; }
.tag-region[data-ftype]:hover { background: var(--crimson); color: #1a0505; }
.news-card h3 { font-size: 16.5px; font-weight: 700; margin-bottom: 5px; }
.news-card p { color: var(--text-dim); font-size: 13.5px; margin: 0 0 9px; }
.news-card a.readmore { font-size: 12.5px; font-weight: 600; }
.news-card a.readmore::after { content: ' \2192'; }
.news-empty { color: var(--text-faint); font-style: italic; padding: 20px 0; }

/* pagination */
.pagination { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 24px; flex-wrap: wrap; }
.pagination button {
  min-width: 34px; height: 34px; padding: 0 10px; border-radius: 8px; border: 1px solid var(--border-strong);
  background: var(--surface); color: var(--text-dim); font-family: 'JetBrains Mono', monospace; font-size: 12.5px;
  cursor: pointer; display: inline-flex; align-items: center; justify-content: center; backdrop-filter: blur(10px);
}
.pagination button:hover:not(:disabled):not(.active) { border-color: var(--gold); color: var(--gold); }
.pagination button.active { background: var(--gold); color: #04130f; border-color: var(--gold); font-weight: 700; }
.pagination button:disabled { opacity: .35; cursor: not-allowed; }
.pagination .page-ellipsis { color: var(--text-faint); padding: 0 2px; font-family: 'JetBrains Mono', monospace; font-size: 12.5px; }

/* community links */
#community { border-bottom: 1px solid var(--border); }
.link-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.link-card {
  padding: 18px; text-decoration: none; color: var(--text); display: flex; align-items: center; gap: 12px;
  transition: border-color .15s ease, transform .15s ease, background .15s ease;
}
.link-card:hover { border-color: var(--gold); transform: translateY(-2px); background: var(--surface-hover); }
.link-card .icon {
  width: 38px; height: 38px; border-radius: 10px; background: var(--gold-dim); display: flex;
  align-items: center; justify-content: center; font-size: 18px; flex: none;
}
.link-card h3 { font-size: 14.5px; font-weight: 700; }
.link-card span.sub { color: var(--text-faint); font-size: 12px; }

/* competitive scene — Holdings-Breakdown style */
#scene { border-bottom: 1px solid var(--border); }
.scene-layout { display: grid; grid-template-columns: 1.3fr 1fr; gap: 16px; }
.scene-main { padding: 22px; }
.scene-main .format-row {
  display: flex; align-items: baseline; justify-content: space-between; padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.scene-main .format-row:last-child { border-bottom: none; }
.format-row .flabel { display: flex; align-items: center; gap: 10px; font-size: 13.5px; color: var(--text-dim); }
.format-row .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--gold); flex: none; }
.format-row .fval { font-family: 'JetBrains Mono', monospace; font-weight: 600; font-size: 14.5px; color: var(--text); }
.scene-side { display: flex; flex-direction: column; gap: 14px; }
.scene-side .panel { padding: 18px; }
.scene-side h3 { font-size: 13px; font-weight: 700; margin-bottom: 10px; }
.scene-side p { font-size: 12.5px; color: var(--text-dim); margin: 0 0 12px; }
.segbar { height: 6px; border-radius: 4px; background: var(--surface-solid); overflow: hidden; display: flex; margin-bottom: 4px; }
.segbar span { height: 100%; background: var(--gold); }

/* shop */
#shop-grid { border-bottom: 1px solid var(--border); }
.shop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; }
.card-item { padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.card-item .cart-thumb-wrap { position: relative; border-radius: 9px; overflow: hidden; background: var(--surface-solid); aspect-ratio: 5/7; }
.card-item .cart-thumb-wrap img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card-item .cart-thumb-wrap.sealed img { object-fit: contain; padding: 8%; }
.card-item .cset { color: var(--text-faint); font-size: 11px; font-family: 'JetBrains Mono', monospace; }
.card-item h3 { font-size: 14px; font-weight: 700; line-height: 1.3; }
.card-item .cmeta { display: flex; flex-wrap: wrap; gap: 6px; margin: 2px 0 4px; }
.card-item .cprice { font-family: 'JetBrains Mono', monospace; font-weight: 700; font-size: 18px; color: var(--gold); margin-top: auto; }
.card-item .cstock { color: var(--text-faint); font-size: 11.5px; }
.card-item .cstock.low { color: var(--crimson); }

/* shop search */
.shop-search { margin-bottom: 16px; display: flex; gap: 10px; flex-wrap: wrap; }
.shop-search input {
  flex: 1 1 260px; min-width: 200px; background: var(--surface); border: 1px solid var(--border-strong); border-radius: 10px;
  padding: 12px 16px; color: var(--text); font-family: 'Sora', sans-serif; font-size: 14px;
  backdrop-filter: blur(10px);
}
.shop-search input::placeholder { color: var(--text-faint); }
.shop-search input:focus { outline: none; border-color: var(--gold); }
.shop-search select {
  flex: 0 1 180px; background: var(--surface); border: 1px solid var(--border-strong); border-radius: 10px;
  padding: 12px 14px; color: var(--text); font-family: 'Sora', sans-serif; font-size: 13.5px;
  color-scheme: dark;
}
.shop-search select:focus { outline: none; border-color: var(--gold); }
.shop-search select option { background: var(--surface-solid); color: var(--text); }
.offer-btn {
  width: 100%; margin-top: 6px; background: transparent; border: 1px solid var(--border-strong); color: var(--text-dim);
  border-radius: 8px; padding: 9px 12px; font-family: 'Sora', sans-serif; font-size: 12.5px; font-weight: 600; cursor: pointer;
}
.offer-btn:hover { border-color: var(--gold); color: var(--gold); }
.offer-form { display: flex; flex-direction: column; gap: 14px; padding: 4px 4px 0; }
.offer-form label { display: flex; flex-direction: column; gap: 6px; font-size: 12.5px; color: var(--text-dim); }
.offer-form input, .offer-form textarea {
  background: var(--surface); border: 1px solid var(--border-strong); border-radius: 8px; padding: 10px 12px;
  color: var(--text); font-family: 'Sora', sans-serif; font-size: 14px;
}
.offer-form textarea { min-height: 70px; resize: vertical; }
.offer-item-name { font-weight: 700; color: var(--gold); }

/* game tabs */
.game-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 22px; }
.game-tab {
  font-family: 'Sora', sans-serif; font-size: 12.5px; font-weight: 700; padding: 9px 16px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--border-strong); color: var(--text-dim); cursor: pointer;
  display: flex; align-items: center; gap: 7px;
}
.game-tab:hover { border-color: var(--gold); color: var(--text); }
.game-tab.active { background: var(--gold); color: #04130f; border-color: var(--gold); }
.game-tab .gcount { font-family: 'JetBrains Mono', monospace; font-size: 10.5px; opacity: .75; }
.game-tab.active .gcount { opacity: .6; }
.qty-row { display: flex; align-items: center; gap: 8px; margin-top: 4px; }
.qty-row button { width: 28px; height: 28px; border-radius: 7px; background: var(--surface); border: 1px solid var(--border-strong); color: var(--text); cursor: pointer; font-size: 15px; }
.qty-row button:hover { border-color: var(--gold); color: var(--gold); }
.qty-row input { width: 40px; text-align: center; background: var(--surface-solid); border: 1px solid var(--border); border-radius: 7px; color: var(--text); font-family: 'JetBrains Mono', monospace; padding: 5px 0; }
.add-btn { width: 100%; justify-content: center; margin-top: 4px; }
.add-btn.added { background: var(--green); }

/* cart drawer */
.cart-fab {
  position: fixed; bottom: 22px; right: 22px; z-index: 30; display: flex; align-items: center; gap: 8px;
  padding: 13px 20px; border-radius: 999px; background: var(--gold); color: #04130f; font-weight: 700; font-size: 13.5px;
  box-shadow: 0 10px 30px rgba(0,0,0,.45); cursor: pointer; border: none;
}
.cart-fab .count { background: #04130f; color: var(--gold); border-radius: 999px; padding: 1px 8px; font-family: 'JetBrains Mono', monospace; font-size: 12px; }
.cart-fab[hidden] { display: none; }

.drawer-overlay {
  position: fixed; inset: 0; z-index: 40; background: rgba(2,4,8,.6); backdrop-filter: blur(2px);
  display: flex; justify-content: flex-end;
}
.drawer-overlay[hidden] { display: none; }
.drawer {
  width: min(420px, 100%); height: 100%; background: var(--surface-solid); border-left: 1px solid var(--border);
  display: flex; flex-direction: column; padding: 22px; gap: 16px; overflow-y: auto; overflow-x: hidden;
}
.drawer-head { display: flex; align-items: center; justify-content: space-between; }
.drawer-head h2 { font-size: 18px; }
.drawer-close { background: none; border: none; color: var(--text-dim); font-size: 22px; cursor: pointer; line-height: 1; }
.cart-lines { display: flex; flex-direction: column; gap: 10px; }
.cart-line { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--border); font-size: 13.5px; }
.cart-line .cl-name { font-weight: 600; }
.cart-line .cl-sub { color: var(--text-faint); font-size: 11.5px; }
.cart-line .cl-remove { background: none; border: none; color: var(--red); cursor: pointer; font-size: 12px; padding: 0; }
.cart-total { display: flex; justify-content: space-between; font-weight: 700; font-size: 16px; padding-top: 6px; }
.cart-empty { color: var(--text-faint); font-style: italic; padding: 30px 0; text-align: center; }
.order-form { display: flex; flex-direction: column; gap: 10px; margin-top: 6px; }
.order-form label { font-size: 12px; color: var(--text-dim); display: flex; flex-direction: column; gap: 5px; }
.order-form input, .order-form textarea {
  background: var(--surface); border: 1px solid var(--border-strong); border-radius: 9px; color: var(--text);
  padding: 9px 11px; font-family: 'Sora', sans-serif; font-size: 13.5px;
}
.order-form textarea { resize: vertical; min-height: 60px; }
.order-status { font-size: 13px; padding: 10px 12px; border-radius: 9px; display: none; }
.order-status.show { display: block; }
.order-status.ok { background: rgba(61,220,132,.12); border: 1px solid rgba(61,220,132,.4); color: var(--green); }
.order-status.err { background: rgba(255,92,108,.12); border: 1px solid rgba(255,92,108,.4); color: var(--red); }

/* pay panel */
.pay-panel { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }
.pay-panel[hidden] { display: none; }
.pay-panel h3 { font-size: 14px; font-weight: 700; }
.pay-panel p { font-size: 12px; color: var(--text-dim); margin: -6px 0 0; }
.pay-panel .btn { width: 100%; justify-content: center; }
.pay-qr { width: 140px; height: auto; border-radius: 10px; align-self: center; }
.pay-crypto { width: 100%; }
.pay-crypto-label { font-size: 11.5px; color: var(--text-faint); font-family: 'JetBrains Mono', monospace; }
.pay-crypto-row { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.pay-crypto-row code { flex: 1; min-width: 0; font-size: 11px; background: var(--surface-solid); border: 1px solid var(--border); border-radius: 7px; padding: 8px 10px; overflow-wrap: anywhere; word-break: break-all; }
.pay-crypto-row .btn { width: auto; padding: 8px 12px; font-size: 11.5px; }

footer { border-top: 1px solid var(--border); padding-block: 28px 44px; color: var(--text-faint); font-size: 12px; }
footer .wrap { display: flex; flex-direction: column; gap: 6px; }
footer a { color: var(--text-dim); }

@media (max-width: 720px) {
  .scene-layout { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .badge-ribbon { display: none; }
  .hero-inner { padding-block: 56px 40px; }
  .drawer { width: 100%; }

  .shop-grid { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .shop-grid .card-item { padding: 7px; gap: 5px; cursor: pointer; }
  .shop-grid .card-item .cset { font-size: 9px; }
  .shop-grid .card-item h3 { font-size: 11px; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .shop-grid .card-item .cprice { font-size: 13px; }
  /* Full details (tags, stock, qty, buttons) move into the tap-to-open
     detail modal on mobile — the grid card is just a compact preview. */
  .shop-grid .card-item .cmeta,
  .shop-grid .card-item .cstock,
  .shop-grid .card-item .qty-row,
  .shop-grid .card-item .add-btn,
  .shop-grid .card-item .offer-btn { display: none; }
}
