/* ============================================================
   CryptoPlay — design system (LIGHT)
   Calm light theme: high-contrast ink, violet→blue accent,
   gold for credits. Games render in the dark player window.
   ============================================================ */
:root {
  --bg: #f7f8fc;
  --bg-2: #eef1f8;
  --panel: #ffffff;
  --panel-2: #f3f5fa;
  --border: rgba(35, 42, 70, 0.12);
  --border-strong: rgba(35, 42, 70, 0.24);
  --text: #1d2336;
  --muted: #59627a;
  --accent: #5b3fd1;
  --accent-2: #2766c7;
  --grad: linear-gradient(125deg, #6546d8, #3475df);
  --gold: #a65c09;
  --gold-bright: #e29326;
  --red: #c93646;
  --radius: 18px;
  --radius-sm: 10px;
  --shadow-sm: 0 1px 3px rgba(23, 43, 77, 0.08);
  --shadow: 0 10px 30px rgba(23, 43, 77, 0.10);
  --font-display: "Outfit", "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background:
    radial-gradient(900px 480px at 88% -8%, rgba(52, 117, 223, 0.10), transparent 60%),
    radial-gradient(800px 460px at 6% -4%, rgba(101, 70, 216, 0.09), transparent 60%),
    var(--bg);
  color: var(--text);
  font: 15.5px/1.6 var(--font-body);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { font-family: var(--font-display); letter-spacing: -0.015em; }
.main { flex: 1; }
a { color: var(--accent-2); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.15; margin: 0.4em 0; }
h1 { font-size: 2.1rem; font-weight: 700; }
h2 { font-size: 1.4rem; font-weight: 700; }
h3 { font-size: 1.02rem; font-weight: 600; }
p { margin: 0.5em 0; }
.container { max-width: 1160px; margin: 0 auto; padding: 0 22px; }
.section { padding: 42px 0; }
.section.narrow { max-width: 560px; margin: 0 auto; }
.mt { margin-top: 30px; }
.muted { color: var(--muted); font-size: 0.92em; }
.pos { color: var(--accent); }
.neg { color: var(--red); }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.empty { color: var(--muted); font-style: italic; }
.err { color: var(--red); min-height: 1.2em; }
code { background: var(--bg-2); padding: 1px 6px; border-radius: 6px; font-size: 0.88em; }
::selection { background: rgba(0, 185, 139, 0.2); }

/* ================= nav ================= */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.nav-inner { display: flex; align-items: center; gap: 18px; min-height: 64px; }
.brand { font-family: var(--font-display); font-weight: 800; font-size: 1.18rem; color: var(--text); letter-spacing: -0.02em; display: flex; align-items: center; gap: 10px; line-height: 1; }
.brand:hover { text-decoration: none; }
.brand-mark {
  width: 32px; height: 32px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center;
  background: var(--grad); color: #fff; font-size: 0.85rem;
  box-shadow: 0 4px 14px rgba(101, 70, 216, 0.35);
}
.nav-links { display: flex; gap: 4px; margin-left: 12px; }
.nav-links a {
  color: var(--muted); font-weight: 600; font-size: 0.92em;
  padding: 8px 13px; border-radius: 10px;
}
.nav-links a:hover { color: var(--text); background: rgba(35, 42, 70, 0.05); text-decoration: none; }
.nav-links a.active { color: var(--accent); background: rgba(101, 70, 216, 0.1); font-weight: 700; }
.nav-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.bonus-btn {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(245, 158, 11, 0.1); color: var(--gold);
  border: 1px solid rgba(180, 83, 9, 0.28);
  padding: 7px 12px; border-radius: 999px; font-weight: 700; font-size: 0.82em; cursor: pointer; font-family: inherit;
  transition: background 0.12s ease, border-color 0.12s ease;
}
.bonus-btn:hover { background: rgba(245, 158, 11, 0.18); border-color: rgba(180, 83, 9, 0.5); }
.coin { font-size: 0.8em; opacity: 0.9; }
.inline { display: inline; }
.balance {
  display: inline-flex; align-items: center; gap: 7px;
  background: #252038; color: #ffd98a; border: 1px solid rgba(255, 217, 138, 0.28);
  padding: 7px 14px; border-radius: 999px; font-weight: 700; font-size: 0.88em;
  font-variant-numeric: tabular-nums; transition: border-color 0.12s ease;
}
.balance:hover { text-decoration: none; border-color: rgba(255, 217, 138, 0.65); }
.nav-avatar {
  width: 32px; height: 32px; display: grid; place-items: center; border-radius: 10px;
  background: var(--grad); color: #fff; font-size: 0.9rem; font-weight: 800; flex: none;
}
.user-menu { position: relative; }
.nav-bell {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 10px; color: var(--muted); font-size: 1rem;
  transition: background 0.12s ease, color 0.12s ease;
}
.nav-bell:hover { background: rgba(35, 42, 70, 0.05); color: var(--text); text-decoration: none; }
.bell-badge {
  position: absolute; top: -1px; right: -3px; min-width: 16px; height: 16px;
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0 4px; border-radius: 999px; background: var(--red); color: #fff;
  font: 700 0.62rem/1 var(--font-body); box-shadow: 0 0 0 2px #fff;
}
.user-menu-btn {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 4px 10px 4px 4px; border: 1px solid transparent; border-radius: 999px;
  background: transparent; cursor: pointer; font-family: inherit;
  transition: background 0.12s ease, border-color 0.12s ease;
}
.user-menu-btn:hover { background: rgba(35, 42, 70, 0.05); border-color: var(--border); }
.user-menu-name { color: var(--text); font-weight: 700; font-size: 0.9em; max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-menu-caret { color: var(--muted); font-size: 0.7em; }
.user-menu-panel {
  position: absolute; top: calc(100% + 10px); right: 0; min-width: 210px;
  padding: 6px; border-radius: 14px; background: #fff;
  border: 1px solid var(--border); box-shadow: var(--shadow);
  display: none; z-index: 60;
}
.user-menu.open .user-menu-panel { display: block; }
.user-menu-panel a,
.user-menu-panel button {
  display: flex; align-items: center; gap: 9px; width: 100%; text-align: left;
  padding: 10px 12px; border-radius: 9px; color: var(--text);
  font-weight: 600; font-size: 0.92em; background: none; border: 0;
  cursor: pointer; font-family: inherit;
}
.user-menu-panel a:hover, .user-menu-panel button:hover { background: var(--panel-2); text-decoration: none; }
.user-menu-panel .menu-danger { color: var(--red); }
.user-menu-panel .menu-danger:hover { background: rgba(201, 54, 70, 0.08); }
.nav-toggle {
  display: none; margin-left: auto; flex: none;
  width: 42px; height: 42px; padding: 0;
  flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  border: 1px solid var(--border-strong); border-radius: 11px;
  background: #fff; cursor: pointer;
}
.nav-toggle span { display: block; width: 18px; height: 2px; border-radius: 2px; background: var(--text); transition: transform 0.18s ease, opacity 0.18s ease; }
.nav.nav-open .nav-toggle span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
.nav.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ================= buttons ================= */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  border: 1px solid transparent; cursor: pointer;
  padding: 10px 20px; border-radius: 12px; font-weight: 600; font-size: 0.95em;
  font-family: inherit; transition: transform 0.08s ease, box-shadow 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary {
  background: var(--grad); color: #fff;
  box-shadow: 0 4px 16px rgba(14, 165, 233, 0.3);
}
.btn-primary:hover { box-shadow: 0 6px 22px rgba(14, 165, 233, 0.42); }
.btn-ghost { background: #fff; color: var(--text); border-color: var(--border-strong); box-shadow: var(--shadow-sm); }
.btn-ghost:hover { border-color: var(--accent); }
.btn-danger { background: rgba(220, 38, 38, 0.08); color: var(--red); border-color: rgba(220, 38, 38, 0.35); }
.btn-lg { padding: 14px 28px; font-size: 1.05em; border-radius: 14px; }
.btn-sm { padding: 6px 13px; font-size: 0.85em; border-radius: 9px; }

/* ================= hero ================= */
.hero { padding: 78px 0 26px; text-align: center; position: relative; overflow: hidden; }
.hero-banner { position: absolute; inset: 0; background-size: cover; background-position: center; opacity: 0.16; }
.hero > .container { position: relative; }
.hero-kicker {
  display: inline-flex; align-items: center; gap: 8px;
  border: 1px solid var(--border-strong); background: #fff;
  color: var(--muted); font-size: 0.83em; font-weight: 600; letter-spacing: 0.4px;
  padding: 6px 14px; border-radius: 999px; margin-bottom: 22px; box-shadow: var(--shadow-sm);
}
.hero-kicker b { color: var(--accent); }
.hero h1 { font-size: clamp(2.3rem, 5.4vw, 3.5rem); margin: 0 0 18px; font-weight: 800; }
.accent { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-sub { max-width: 620px; margin: 0 auto; color: var(--muted); font-size: 1.12em; }
.hero-actions { display: flex; gap: 14px; justify-content: center; margin-top: 30px; flex-wrap: wrap; }
.hero-trust {
  display: flex; gap: 26px; justify-content: center; flex-wrap: wrap;
  margin-top: 28px; color: var(--muted); font-size: 0.88em; font-weight: 500;
}
.hero-trust span { display: inline-flex; align-items: center; gap: 7px; }

/* ================= home showcase ================= */
.hero-home { padding: 82px 0 66px; text-align: left; }
.hero-home .hero-banner { opacity: 0.11; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(340px, 0.75fr); align-items: center; gap: 60px; }
.hero-copy { max-width: 650px; }
.hero-home .hero-sub { margin: 0; max-width: 600px; font-size: 1.13em; }
.hero-home .hero-actions { justify-content: flex-start; }
.hero-home .hero-trust { justify-content: flex-start; gap: 20px; }
.hero-showcase { min-height: 300px; position: relative; display: flex; align-items: center; justify-content: center; }
.showcase-glow { position: absolute; width: 280px; height: 280px; border-radius: 50%; background: radial-gradient(circle, rgba(101, 70, 216, 0.18), rgba(52, 117, 223, 0.05) 52%, transparent 70%); }
.showcase-card { position: absolute; z-index: 1; display: flex; align-items: center; gap: 12px; background: rgba(255, 255, 255, 0.96); border: 1px solid rgba(83, 92, 132, 0.17); border-radius: 15px; padding: 13px 16px; box-shadow: 0 16px 40px rgba(45, 53, 91, 0.13); }
.showcase-card > span:first-child { font-size: 1.35rem; }
.showcase-card strong, .showcase-card small { display: block; line-height: 1.25; }
.showcase-card strong { font-family: var(--font-display); font-size: 0.95rem; }
.showcase-card small { color: var(--muted); font-size: 0.78rem; margin-top: 3px; }
.showcase-main { position: relative; width: min(100%, 310px); padding: 23px 20px; border-radius: 19px; }
.showcase-main .showcase-icon { font-size: 2.1rem; width: 52px; height: 52px; display: grid; place-items: center; border-radius: 14px; background: linear-gradient(135deg, rgba(101, 70, 216, 0.15), rgba(52, 117, 223, 0.16)); }
.showcase-main strong { font-size: 1.08rem; }
.showcase-play { margin-left: auto; width: 32px; height: 32px; display: grid; place-items: center; padding-left: 2px; border-radius: 50%; background: var(--grad); color: #fff; font-size: 0.75rem; }
.showcase-score { top: 17px; left: 0; }
.showcase-bonus { bottom: 16px; right: 0; }
.eyebrow { display: block; margin-bottom: 7px; color: var(--accent); font-size: 0.73rem; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; }
.eyebrow-center { text-align: center; }
.section-soft { background: linear-gradient(180deg, rgba(238, 241, 248, 0.55), rgba(255, 255, 255, 0)); border-top: 1px solid rgba(35, 42, 70, 0.06); border-bottom: 1px solid rgba(35, 42, 70, 0.06); }
.section-featured { padding-top: 26px; }
.grid-4 { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.marketing-band { display: flex; align-items: center; justify-content: space-between; gap: 35px; padding: 42px 46px; border-radius: 24px; color: #fff; background: linear-gradient(120deg, #392a85, #285eaf); box-shadow: 0 16px 38px rgba(48, 65, 142, 0.2); overflow: hidden; position: relative; }
.marketing-band::after { content: ""; position: absolute; width: 360px; height: 360px; border: 1px solid rgba(255,255,255,0.13); border-radius: 50%; right: -120px; top: -220px; }
.marketing-band > * { position: relative; z-index: 1; }
.marketing-band > div:first-child { min-width: 0; }
.marketing-band h2 { font-size: clamp(1.65rem, 3vw, 2.15rem); margin: 0 0 10px; }
.marketing-band p { max-width: 620px; margin: 0; color: rgba(255,255,255,0.8); }
.eyebrow-light { color: #c8dcff; }
.marketing-actions { display: flex; flex-direction: column; align-items: center; gap: 12px; flex: none; }
.btn-light { background: #fff; color: #302577; box-shadow: 0 5px 15px rgba(5, 14, 55, 0.2); }
.marketing-link { color: #fff; font-weight: 600; font-size: 0.9rem; }
.marketing-link:hover { color: #fff; }

/* ================= rebuilt landing page ================= */
.landing-hero { position: relative; overflow: hidden; padding: 78px 0 70px; background: linear-gradient(135deg, #f5f4fc 0%, #edf4ff 55%, #f7f8fc 100%); }
.landing-hero::before { content: ""; position: absolute; width: 620px; height: 620px; border-radius: 50%; background: radial-gradient(circle, rgba(101,70,216,0.13), transparent 67%); right: -180px; top: -340px; }
.landing-hero-image { position: absolute; inset: 0; background-size: cover; background-position: center; opacity: 0.06; mix-blend-mode: multiply; }
.landing-hero-layout { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(330px, 0.76fr); align-items: center; gap: 70px; }
.landing-kicker { display: inline-flex; align-items: center; gap: 7px; padding: 6px 11px; border: 1px solid rgba(101,70,216,0.18); border-radius: 999px; color: var(--accent); background: rgba(255,255,255,0.76); font-size: 0.76rem; font-weight: 800; letter-spacing: 0.04em; }
.landing-kicker span { font-size: 1rem; }
.landing-hero h1 { margin: 17px 0; font-size: clamp(2.7rem, 5.2vw, 4.7rem); letter-spacing: -0.055em; line-height: 0.99; }
.landing-hero h1 em { font-style: normal; color: var(--accent); }
.landing-hero-copy > p { max-width: 570px; color: var(--muted); font-size: 1.1rem; }
.landing-actions { display: flex; align-items: center; gap: 20px; margin-top: 28px; }
.landing-secondary { color: var(--text); font-size: 0.92rem; font-weight: 800; }
.landing-proof { display: flex; gap: 24px; margin-top: 46px; }
.landing-proof div { display: grid; gap: 2px; padding-left: 12px; border-left: 2px solid rgba(101,70,216,0.28); }
.landing-proof strong { font-family: var(--font-display); font-size: 0.98rem; }
.landing-proof span { color: var(--muted); font-size: 0.73rem; }
.landing-hero-library { padding: 20px; border: 1px solid rgba(76,84,122,0.14); border-radius: 22px; background: rgba(255,255,255,0.76); box-shadow: 0 22px 55px rgba(52,58,103,0.13); }
.library-heading { display: flex; justify-content: space-between; align-items: center; padding: 0 2px 15px; }
.library-heading span, .library-feature small { color: var(--accent); font-size: 0.67rem; font-weight: 800; letter-spacing: 0.1em; }
.library-heading strong { font-size: 0.86rem; }
.library-feature { display: flex; align-items: center; gap: 13px; padding: 15px; border-radius: 15px; color: #fff; background: linear-gradient(135deg, #4d36b4, #2864bc); }
.library-feature:hover { color: #fff; text-decoration: none; }
.library-feature-icon { display: grid; width: 51px; height: 51px; place-items: center; flex: none; border-radius: 14px; background: rgba(255,255,255,0.16); font-size: 1.55rem; }
.library-feature div:nth-child(2) { display: grid; gap: 3px; min-width: 0; }
.library-feature small { color: #d6e4ff; }
.library-feature strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--font-display); font-size: 1.05rem; }
.library-feature span { color: rgba(255,255,255,0.72); font-size: 0.75rem; }
.library-feature > b, .popular-list i { margin-left: auto; font-size: 1.1rem; font-style: normal; }
.library-picks { display: grid; gap: 6px; margin-top: 10px; }
.library-picks a { display: flex; align-items: center; gap: 10px; padding: 9px 7px; border-radius: 10px; color: var(--text); }
.library-picks a:hover { background: rgba(101,70,216,0.06); text-decoration: none; }
.library-picks > a > span { display: grid; width: 29px; height: 29px; place-items: center; border-radius: 8px; color: var(--accent); background: #f0edff; font-size: 0.7rem; }
.library-picks div { display: grid; gap: 1px; }
.library-picks strong { font-size: 0.83rem; }
.library-picks small { color: var(--muted); font-size: 0.7rem; }
.landing-section { padding: 66px 0; }
.landing-featured { padding-top: 46px; }
.landing-discover, .landing-how { background: #f1f3f9; border-top: 1px solid rgba(35,42,70,0.06); border-bottom: 1px solid rgba(35,42,70,0.06); }
.landing-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 22px; margin-bottom: 22px; }
.landing-heading h2 { margin: 0; font-size: 1.75rem; }
.landing-heading p { max-width: 340px; margin: 0; color: var(--muted); font-size: 0.91rem; }
.landing-game-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 15px; }
.landing-game-grid .game-card { min-width: 0; }
.landing-game-grid .game-card-body { padding: 10px 12px 12px; }
.landing-game-grid .game-card-body h3 { font-size: 0.96rem; }
.landing-game-grid .game-card-body p { font-size: 0.76rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.landing-empty { display: block; padding: 25px; border-radius: var(--radius); background: var(--panel); text-align: center; font-weight: 700; }
.discovery-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 15px; }
.discovery-card { display: flex; align-items: flex-start; gap: 16px; min-height: 180px; padding: 25px; border-radius: 19px; color: var(--text); background: #fff; border: 1px solid var(--border); box-shadow: var(--shadow-sm); }
.discovery-card:hover { transform: translateY(-3px); text-decoration: none; box-shadow: var(--shadow); }
.discovery-icon { display: grid; width: 45px; height: 45px; place-items: center; flex: none; border-radius: 13px; font-size: 1.3rem; background: #ebe7ff; }
.discovery-card strong { display: block; font-family: var(--font-display); font-size: 1.08rem; }
.discovery-card p { color: var(--muted); font-size: 0.84rem; }
.discovery-card div > span { color: var(--accent); font-size: 0.78rem; font-weight: 800; }
.discovery-puzzle .discovery-icon { color: #9b5b0d; background: #fff0d5; }.discovery-multi .discovery-icon { color: #247085; background: #dff5f5; }
.landing-popular { background: linear-gradient(110deg, #32247e, #255da9); color: #fff; }
.popular-layout { display: grid; grid-template-columns: 0.7fr 1.3fr; gap: 70px; align-items: center; }
.popular-copy h2 { margin: 0 0 12px; font-size: 2rem; }.popular-copy p { margin: 0 0 20px; color: rgba(255,255,255,0.75); }.popular-copy .eyebrow { color: #bdd3ff; }
.popular-list { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.popular-list a { display: flex; align-items: center; gap: 10px; padding: 12px; color: #fff; border-radius: 12px; background: rgba(255,255,255,0.1); }
.popular-list a:hover { background: rgba(255,255,255,0.16); text-decoration: none; }.popular-list b { color: #b9d3ff; font-size: 0.72rem; }.popular-icon { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; background: rgba(255,255,255,0.14); }.popular-list span:nth-child(3) { display: grid; gap: 2px; min-width: 0; }.popular-list strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 0.82rem; }.popular-list small { color: rgba(255,255,255,0.65); font-size: 0.67rem; }
.landing-heading-centered { display: block; text-align: center; }.landing-heading-centered p { margin: 8px auto 0; }
.landing-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; max-width: 950px; margin: 36px auto 0; }.landing-steps div { position: relative; padding-top: 34px; }.landing-steps div:not(:last-child)::after { content: ""; position: absolute; top: 14px; left: 80px; right: -20px; border-top: 1px dashed rgba(101,70,216,0.38); }.landing-steps span { color: var(--accent); font: 800 0.78rem var(--font-display); letter-spacing: 0.08em; }.landing-steps h3 { margin: 8px 0; }.landing-steps p { color: var(--muted); font-size: 0.85rem; }
.landing-final { padding-top: 20px; }.landing-final-card { display: flex; justify-content: space-between; align-items: center; gap: 30px; padding: 42px 46px; border-radius: 22px; color: #fff; background: linear-gradient(120deg, #4432a0, #2a69c2); }.landing-final-card h2 { margin: 0 0 9px; font-size: 2rem; }.landing-final-card p { margin: 0; color: rgba(255,255,255,0.78); }.landing-final-card > div:last-child { display: flex; flex-direction: column; align-items: center; gap: 11px; flex: none; }.landing-final-card > div:last-child > a:last-child { color: #fff; font-size: 0.85rem; font-weight: 800; }

/* ================= simple game-first storefront ================= */
.storefront-hero { position: relative; overflow: hidden; padding: 64px 0; background: linear-gradient(115deg, #f7f8fc, #eef3ff); border-bottom: 1px solid var(--border); }
.storefront-hero::after { content: ""; position: absolute; right: 8%; top: -260px; width: 600px; height: 600px; border-radius: 50%; background: radial-gradient(circle, rgba(76, 107, 220, 0.12), transparent 66%); }
.storefront-hero-image { position: absolute; inset: 0; background-position: center; background-size: cover; opacity: 0.06; }
.storefront-hero-inner { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, 0.7fr); align-items: center; gap: 72px; }
.storefront-copy { max-width: 630px; }.storefront-kicker { display: inline-flex; align-items: center; gap: 7px; padding: 6px 11px; border: 1px solid rgba(101,70,216,0.18); border-radius: 999px; color: var(--accent); background: rgba(255,255,255,0.75); font-size: 0.77rem; font-weight: 800; }.storefront-copy h1 { margin: 17px 0; font-size: clamp(2.35rem, 4.3vw, 3.8rem); letter-spacing: -0.045em; }.storefront-copy p { max-width: 560px; color: var(--muted); font-size: 1.06rem; }.storefront-actions { display: flex; gap: 12px; margin-top: 26px; flex-wrap: wrap; }
.storefront-spotlight { padding: 18px; border-radius: 18px; border: 1px solid rgba(46,55,91,0.14); background: rgba(255,255,255,0.85); box-shadow: 0 18px 42px rgba(50,59,103,0.1); }.spotlight-top { display: flex; justify-content: space-between; margin-bottom: 13px; }.spotlight-top span { color: var(--accent); font-size: 0.68rem; font-weight: 800; letter-spacing: 0.1em; }.spotlight-top a { font-size: 0.76rem; font-weight: 700; }.spotlight-game { display: grid; grid-template-columns: 112px 1fr; gap: 15px; align-items: center; color: var(--text); }.spotlight-game:hover { text-decoration: none; }.spotlight-art { display: grid; place-items: center; height: 112px; border-radius: 13px; background: linear-gradient(145deg, #6045d0, #2e6fce); color: #fff; font-size: 2.4rem; position: relative; overflow: hidden; }.spotlight-art::before { content: ""; position: absolute; width: 120px; height: 120px; border: 15px solid rgba(255,255,255,0.14); border-radius: 50%; top: -64px; left: -54px; }.spotlight-art span { position: relative; z-index: 1; }.spotlight-art i { position: absolute; z-index: 1; right: 9px; bottom: 8px; display: grid; place-items: center; width: 27px; height: 27px; border-radius: 50%; background: #fff; color: var(--accent); font-size: 0.65rem; font-style: normal; }.spotlight-game strong { display: block; font-family: var(--font-display); font-size: 1.13rem; }.spotlight-game p { display: -webkit-box; overflow: hidden; margin: 5px 0; color: var(--muted); font-size: 0.8rem; line-height: 1.4; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }.spotlight-game small { color: var(--accent); font-size: 0.72rem; font-weight: 700; }
.storefront-section { padding: 56px 0; }.storefront-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 15px; margin-bottom: 18px; }.storefront-heading h2 { margin: 0; font-size: 1.55rem; }.storefront-game-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }.storefront-game-grid .game-card-body { padding: 10px 12px 12px; }.storefront-game-grid .game-card-body h3 { font-size: 0.94rem; }.storefront-game-grid .game-card-body p { overflow: hidden; font-size: 0.75rem; text-overflow: ellipsis; white-space: nowrap; }.storefront-empty { display: block; padding: 24px; border: 1px dashed var(--border-strong); border-radius: var(--radius); text-align: center; font-weight: 700; }
.storefront-categories { background: #f1f3f9; border-top: 1px solid rgba(35,42,70,0.06); border-bottom: 1px solid rgba(35,42,70,0.06); }.category-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }.category-row a { position: relative; display: grid; gap: 4px; min-height: 116px; padding: 17px; border: 1px solid var(--border); border-radius: 14px; background: #fff; color: var(--text); }.category-row a:hover { border-color: rgba(101,70,216,0.4); text-decoration: none; transform: translateY(-2px); }.category-row > a > span { font-size: 1.25rem; }.category-row strong { font-family: var(--font-display); }.category-row small { color: var(--muted); font-size: 0.76rem; }.category-row i { position: absolute; right: 14px; bottom: 13px; color: var(--accent); font-style: normal; }
.storefront-split { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 42px; align-items: start; }.storefront-ranking { padding: 21px; border-radius: 17px; background: #f0edff; }.storefront-ranking h2 { margin: 0 0 13px; font-size: 1.25rem; }.ranking-list { display: grid; }.ranking-list a { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid rgba(101,70,216,0.14); color: var(--text); }.ranking-list a:hover { color: var(--accent); text-decoration: none; }.ranking-list b { color: var(--accent); font-size: 0.7rem; }.ranking-list span { display: grid; gap: 1px; min-width: 0; }.ranking-list strong { overflow: hidden; font-size: 0.84rem; text-overflow: ellipsis; white-space: nowrap; }.ranking-list small { color: var(--muted); font-size: 0.69rem; }.ranking-list i { margin-left: auto; color: var(--accent); font-style: normal; }
.storefront-value { padding-top: 15px; }.storefront-value-inner { display: grid; grid-template-columns: 1fr 1fr auto; align-items: center; gap: 30px; padding: 34px 38px; border: 1px solid rgba(101,70,216,0.17); border-radius: 20px; background: linear-gradient(100deg, #f0edff, #f6f9ff); }.storefront-value h2 { margin: 0; font-size: 1.65rem; }.storefront-value p { margin: 0; color: var(--muted); font-size: 0.9rem; }

/* ================= community-league homepage ================= */
.league-hero { position: relative; overflow: hidden; padding: 76px 0; background: linear-gradient(120deg, #f6f5ff 0%, #edf4ff 58%, #f8f9fc 100%); border-bottom: 1px solid var(--border); }
.league-hero::before { content: ""; position: absolute; width: 580px; height: 580px; right: -160px; top: -290px; border: 1px solid rgba(101,70,216,0.1); border-radius: 50%; box-shadow: 0 0 0 70px rgba(101,70,216,0.025), 0 0 0 140px rgba(101,70,216,0.02); }
.league-hero-image { position: absolute; inset: 0; background-position: center; background-size: cover; mix-blend-mode: multiply; opacity: 0.045; }
.league-hero-layout { position: relative; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(330px, 0.72fr); align-items: center; gap: 72px; }
.league-hero-copy { max-width: 650px; }.league-hero-kicker { display: inline-block; padding: 7px 11px; border: 1px solid rgba(101,70,216,0.2); border-radius: 999px; background: rgba(255,255,255,0.75); color: var(--accent); font-size: 0.7rem; font-weight: 800; letter-spacing: 0.12em; }.league-hero h1 { margin: 17px 0; font-size: clamp(2.65rem, 4.8vw, 4.25rem); letter-spacing: -0.055em; line-height: 1; }.league-hero h1 span { color: var(--accent); }.league-hero-copy > p { max-width: 590px; color: var(--muted); font-size: 1.1rem; }.league-hero-actions { display: flex; align-items: center; gap: 22px; margin-top: 29px; flex-wrap: wrap; }.league-text-link { color: var(--text); font-weight: 800; font-size: 0.9rem; }.league-text-link:hover { color: var(--accent); text-decoration: none; }.league-hero-note { display: flex; flex-wrap: wrap; gap: 9px 18px; margin-top: 29px; color: var(--muted); font-size: 0.78rem; font-weight: 600; }
.league-hero-board { padding: 19px; border: 1px solid rgba(48,56,96,0.15); border-radius: 21px; background: rgba(255,255,255,0.89); box-shadow: 0 20px 50px rgba(44,51,91,0.12); }.league-board-top { display: flex; justify-content: space-between; align-items: center; }.league-board-top span { color: var(--accent); font-size: 0.66rem; font-weight: 800; letter-spacing: 0.1em; }.league-board-top b { padding: 4px 8px; border-radius: 999px; background: #e3f7ef; color: #17704f; font-size: 0.62rem; letter-spacing: 0.08em; }.league-hero-board h2 { margin: 16px 0 3px; font-size: 1.32rem; }.league-hero-board > p { margin: 0 0 15px; color: var(--muted); font-size: 0.8rem; }.league-board-ranks { display: grid; gap: 7px; }.league-board-ranks > div { display: flex; align-items: center; gap: 10px; padding: 9px 8px; border-radius: 10px; background: #f6f7fb; }.league-board-ranks > div:first-child { background: #eeebff; }.league-board-ranks > div > b { width: 21px; color: var(--muted); font-size: 0.7rem; }.rank-avatar { display: grid; width: 28px; height: 28px; place-items: center; border-radius: 8px; color: #fff; font-size: 0.76rem; font-weight: 800; }.rank-violet { background: #6648d4; }.rank-blue { background: #3976d6; }.rank-gold { background: #cb7d25; }.league-board-ranks strong { font-size: 0.82rem; }.league-board-ranks em { margin-left: auto; color: var(--accent); font-size: 0.76rem; font-style: normal; font-weight: 800; }.league-board-foot { display: flex; justify-content: space-between; margin-top: 14px; color: var(--muted); font-size: 0.7rem; }
.league-section { padding: 68px 0; }.league-section-heading { display: flex; justify-content: space-between; align-items: end; gap: 35px; margin-bottom: 25px; }.league-section-heading h2 { margin: 0; font-size: 1.72rem; }.league-section-heading > p { max-width: 480px; margin: 0; color: var(--muted); font-size: 0.92rem; }.league-heading-row > div > p { margin: 6px 0 0; color: var(--muted); font-size: 0.9rem; }.league-intro { background: #fff; }.league-benefit-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }.league-benefit-grid article { padding: 22px; border: 1px solid var(--border); border-radius: 16px; background: #fbfcff; }.benefit-icon { display: grid; width: 37px; height: 37px; place-items: center; border-radius: 11px; background: #ece9ff; color: var(--accent); font-size: 1rem; }.league-benefit-grid h3 { margin: 14px 0 5px; }.league-benefit-grid p { margin: 0; color: var(--muted); font-size: 0.86rem; }
.league-audience-section { padding: 52px 0; background: #fff; border-bottom: 1px solid rgba(35,42,70,0.07); }.league-audience-layout { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(410px, 1.1fr); gap: 70px; align-items: center; }.league-audience-layout h2 { margin: 0 0 13px; font-size: 2.05rem; line-height: 1.08; }.league-audience-layout > div > p { max-width: 530px; margin: 0 0 18px; color: var(--muted); font-size: 0.94rem; }.league-audience-list { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }.league-audience-list > div { display: flex; align-items: flex-start; gap: 11px; padding: 14px; border: 1px solid var(--border); border-radius: 13px; background: #fafbfe; }.league-audience-list > div > span { display: grid; place-items: center; width: 31px; height: 31px; flex: none; border-radius: 9px; background: #ece9ff; font-size: 0.9rem; }.league-audience-list strong { display: block; font-size: 0.81rem; }.league-audience-list p { margin: 3px 0 0; color: var(--muted); font-size: 0.73rem; line-height: 1.4; }
.league-challenges { background: #f2f4fa; border-top: 1px solid rgba(35,42,70,0.06); border-bottom: 1px solid rgba(35,42,70,0.06); }.league-challenge-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 15px; }.league-challenge-card { display: flex; flex-direction: column; min-height: 180px; padding: 20px; border: 1px solid var(--border); border-radius: 16px; background: #fff; color: var(--text); }.league-challenge-card:hover { border-color: rgba(101,70,216,0.35); text-decoration: none; transform: translateY(-2px); box-shadow: var(--shadow-sm); }.challenge-game { margin-left: 7px; color: var(--muted); font-size: 0.72rem; }.league-challenge-card h3 { margin: 18px 0 4px; font-size: 1.05rem; }.league-challenge-card p { margin: 0; color: var(--muted); font-size: 0.8rem; }.league-challenge-card footer { display: flex; justify-content: space-between; gap: 8px; margin-top: auto; padding-top: 18px; color: var(--muted); font-size: 0.69rem; }.league-challenge-card footer b { color: var(--accent); font-size: 0.72rem; }.league-start-card { display: flex; justify-content: space-between; align-items: center; gap: 25px; padding: 28px; border: 1px dashed rgba(101,70,216,0.38); border-radius: 17px; background: #fff; }.league-start-card > div { display: flex; align-items: center; gap: 16px; }.league-start-card h3 { margin: 0 0 4px; }.league-start-card p { margin: 0; color: var(--muted); font-size: 0.86rem; }
.league-steps-section { background: #fff; }.league-steps-layout { display: grid; grid-template-columns: 0.78fr 1.22fr; gap: 70px; align-items: center; }.league-steps-layout h2 { margin: 0 0 12px; font-size: 2rem; }.league-steps-layout > div > p { margin: 0 0 18px; color: var(--muted); }.league-steps { display: grid; gap: 0; padding: 0; margin: 0; list-style: none; }.league-steps li { display: grid; grid-template-columns: 48px 1fr; gap: 16px; padding: 17px 0; border-bottom: 1px solid var(--border); }.league-steps li:first-child { border-top: 1px solid var(--border); }.league-steps li > span { color: var(--accent); font: 800 0.8rem var(--font-display); }.league-steps h3 { margin: 0 0 4px; }.league-steps p { margin: 0; color: var(--muted); font-size: 0.84rem; }
.league-games-section { padding-top: 45px; }.league-final-section { padding-top: 16px; }.league-final-card { display: flex; justify-content: space-between; align-items: center; gap: 34px; padding: 45px 48px; border-radius: 22px; background: linear-gradient(120deg, #3f2b92, #2762b6); color: #fff; }.league-final-card h2 { margin: 0 0 10px; font-size: 2.1rem; line-height: 1.05; }.league-final-card p { max-width: 570px; margin: 0; color: rgba(255,255,255,0.78); }.league-final-card > div:last-child { display: flex; flex-direction: column; align-items: center; gap: 12px; flex: none; }.league-final-card > div:last-child > a:last-child { color: #fff; font-size: 0.84rem; font-weight: 700; }

/* ================= community leagues ================= */
.league-home-section { padding-top: 46px; padding-bottom: 46px; background: linear-gradient(180deg, rgba(239, 236, 255, 0.62), rgba(247, 248, 252, 0)); border-bottom: 1px solid var(--border); }
.league-home-copy { max-width: 700px; margin: -6px 0 18px; color: var(--muted); }
.league-highlight-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 13px; }
.league-highlight { position: relative; display: grid; gap: 6px; min-height: 130px; padding: 18px; color: var(--text); border: 1px solid rgba(101, 70, 216, 0.2); border-radius: 15px; background: #fff; box-shadow: var(--shadow-sm); }
.league-highlight:hover { border-color: var(--accent); text-decoration: none; transform: translateY(-2px); }
.league-highlight strong { padding-right: 24px; font-family: var(--font-display); font-size: 1rem; }
.league-highlight small { color: var(--muted); }
.league-highlight i { position: absolute; right: 17px; bottom: 14px; color: var(--accent); font-style: normal; }
.league-empty { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 18px 20px; border: 1px solid rgba(101, 70, 216, 0.2); border-radius: 15px; background: #fff; }
.league-empty div { display: grid; gap: 2px; }.league-empty span { color: var(--muted); font-size: 0.88rem; }
.club-hero { padding: 50px 0 28px; background: linear-gradient(125deg, rgba(240, 237, 255, 0.95), rgba(237, 244, 255, 0.85)); border-bottom: 1px solid var(--border); }
.club-hero h1 { margin: 0 0 8px; font-size: clamp(2rem, 4vw, 2.8rem); }.club-hero .section-head { align-items: end; }
.club-description { max-width: 710px; color: var(--muted); font-size: 1.04rem; }.club-section { padding-top: 34px; }
.club-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.club-card { display: grid; grid-template-columns: auto 1fr; gap: 13px; padding: 19px; color: var(--text); border: 1px solid var(--border); border-radius: var(--radius); background: var(--panel); box-shadow: var(--shadow-sm); transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease; }
.club-card:hover { transform: translateY(-3px); border-color: rgba(101,70,216,.42); box-shadow: var(--shadow); text-decoration: none; }
.club-card-icon { display: grid; width: 42px; height: 42px; place-items: center; border-radius: 13px; background: linear-gradient(135deg, #ebe6ff, #ddecff); color: var(--accent); font-size: 1.35rem; }
.club-card h2 { margin: 0; font-size: 1.16rem; }.club-card p { display: -webkit-box; overflow: hidden; margin: 4px 0 0; color: var(--muted); font-size: .87rem; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.club-card-meta { grid-column: span 2; display: flex; gap: 14px; padding-top: 11px; border-top: 1px solid var(--border); color: var(--muted); font-size: .77rem; font-weight: 700; }.club-card small { grid-column: span 2; color: var(--accent); font-size: .77rem; font-weight: 700; }
.club-empty { max-width: 560px; margin: 0 auto; text-align: center; }.club-empty .btn { margin-top: 8px; }
.club-page-grid, .tournament-board-grid, .club-admin-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(250px, .55fr); gap: 18px; align-items: start; }
.tournament-list { display: grid; gap: 12px; }.tournament-card { display: grid; grid-template-columns: minmax(0, 1fr) 230px; gap: 18px; padding: 18px; color: var(--text); border: 1px solid var(--border); border-radius: 15px; background: var(--panel); box-shadow: var(--shadow-sm); }
.tournament-card:hover { border-color: rgba(101,70,216,.45); box-shadow: var(--shadow); text-decoration: none; }.tournament-card h3 { margin: 7px 0 3px; font-size: 1.06rem; }.tournament-card p { margin: 0; color: var(--muted); font-size: .87rem; }
.tournament-card-meta { display: grid; align-content: center; gap: 4px; color: var(--muted); font-size: .8rem; }.tournament-card-meta strong { color: var(--accent); }
.badge-tournament-draft { color: var(--muted); }.badge-tournament-scheduled { color: var(--accent-2); background: rgba(39,102,199,.09); border-color: rgba(39,102,199,.24); }.badge-tournament-live { color: #16714e; background: rgba(0,168,120,.1); border-color: rgba(0,168,120,.35); }.badge-tournament-finished { color: var(--muted); background: var(--panel-2); }
.club-members { margin: 0; }.club-members h2 { margin-top: 0; }.member-row { display: flex; gap: 9px; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--border); }.member-row:last-of-type { border-bottom: 0; }.member-avatar { display: grid; width: 29px; height: 29px; place-items: center; flex: none; border-radius: 9px; color: var(--accent); background: #eeeaff; font-size: .78rem; font-weight: 800; }.member-row div { display: grid; line-height: 1.25; }.member-row small { color: var(--muted); font-size: .76rem; text-transform: capitalize; }
.club-actions { display: flex; gap: 9px; flex-wrap: wrap; }.club-admin-grid { grid-template-columns: 1fr 1fr; margin: 18px 0; }.club-admin-grid > .panel { margin: 0; }.team-manager { display: grid; grid-template-columns: 1fr auto; gap: 9px; align-items: center; padding: 11px 0; border-bottom: 1px solid var(--border); }.team-manager:last-child { border-bottom: 0; }.team-manager .form-row { grid-column: span 2; }.member-management .form-row { gap: 4px; }.member-management .input { max-width: 130px; padding: 5px 7px; }
.tournament-status-box { display: grid; gap: 7px; justify-items: end; color: var(--muted); font-size: .88rem; }.tournament-callout { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin: 0 0 18px; }.tournament-callout p { margin: 0; }.tournament-callout form { width: 100%; }.tournament-callout form p { margin-bottom: 10px; }.tournament-board-grid { grid-template-columns: minmax(0, 1fr) minmax(250px, .48fr); }.tournament-board-grid > .panel { margin: 0; }

/* ================= sections & grids ================= */
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 6px; }
.see-all { font-weight: 600; font-size: 0.93em; }
.grid { display: grid; gap: 18px; }
.grid-3 { grid-template-columns: repeat(auto-fill, minmax(255px, 1fr)); }
.home-game-grid { grid-template-columns: repeat(auto-fill, minmax(195px, 1fr)); gap: 15px; }

/* ================= game cards ================= */
.game-card {
  background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; display: block; color: var(--text);
  box-shadow: 0 3px 10px rgba(35, 42, 70, 0.06);
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.2s ease;
}
.game-card:hover {
  transform: translateY(-4px); border-color: rgba(52, 117, 223, 0.55);
  box-shadow: var(--shadow);
  text-decoration: none;
}
.game-thumb { position: relative; aspect-ratio: 16/9; background: var(--panel-2); overflow: hidden; }
.game-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.3s ease; }
.game-card:hover .game-thumb img { transform: scale(1.05); }
.game-thumb-fallback {
  width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
  font-size: 3rem;
  background:
    radial-gradient(280px 140px at 20% 0%, rgba(0, 185, 139, 0.14), transparent 70%),
    radial-gradient(280px 160px at 85% 100%, rgba(14, 165, 233, 0.14), transparent 70%),
    var(--panel-2);
}
.game-thumb::after {
  content: "▶"; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-size: 1.6rem; color: #fff; background: rgba(10, 25, 41, 0.38); backdrop-filter: blur(2px);
  opacity: 0; transition: opacity 0.18s ease;
}
.game-card:hover .game-thumb::after { opacity: 1; }
.game-card-body { padding: 11px 13px 13px; }
.game-card-body h3 { margin: 0 0 3px; font-size: 1.04rem; }
.game-card-body p { margin: 0; color: var(--muted); font-size: 0.85em; }
.card-badges { position: absolute; top: 8px; left: 8px; display: flex; gap: 5px; z-index: 2; }
.card-badges .badge { backdrop-filter: blur(4px); }
.game-preview {
  position: absolute; inset: 0; z-index: 3; display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 3px; padding: 7px 7px 26px; opacity: 0; pointer-events: none;
  background: rgba(20, 25, 48, 0.74); transition: opacity 0.18s ease 2s;
}
.game-card:hover .game-preview, .game-card:focus-visible .game-preview { opacity: 1; }
.preview-screen {
  position: relative; min-width: 0; overflow: hidden; border: 1px solid rgba(255,255,255,0.24);
  border-radius: 7px; background: linear-gradient(150deg, #5d46d1, #2e6dc7);
}
.preview-screen::before, .preview-screen::after { content: ""; position: absolute; border-radius: 50%; }
.preview-screen::before { width: 90%; height: 70%; left: -32%; top: -15%; background: rgba(255,255,255,0.2); }
.preview-screen::after { width: 80%; height: 50%; right: -35%; bottom: -20%; background: rgba(255,201,98,0.4); }
.preview-screen-two { background: linear-gradient(145deg, #1f8c96, #2964a5); }
.preview-screen-three { background: linear-gradient(145deg, #d16c4a, #8044ae); }
.preview-screen span { position: absolute; z-index: 1; left: 50%; top: 50%; transform: translate(-50%, -50%); color: #fff; font-size: clamp(0.85rem, 2vw, 1.25rem); text-shadow: 0 2px 8px rgba(0,0,0,0.28); }
.preview-caption { position: absolute; bottom: 7px; left: 8px; right: 8px; color: #fff; font: 700 0.61rem/1 var(--font-body); letter-spacing: 0.04em; text-transform: uppercase; }
.preview-caption span { float: right; color: rgba(255,255,255,0.65); font-weight: 600; text-transform: none; letter-spacing: 0; }

/* ================= badges ================= */
/* colored category chips — instant visual type recognition */
.cat {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 9px; border-radius: 999px;
  font-size: 0.72em; font-weight: 700; letter-spacing: 0.4px; text-transform: uppercase;
  white-space: nowrap;
}
.cat-arcade { background: rgba(91, 63, 209, 0.13); color: #4c33b8; }
.cat-puzzle { background: rgba(39, 102, 199, 0.13); color: #1f5cad; }
.cat-action { background: rgba(201, 54, 70, 0.12); color: #b02c3b; }
.cat-multiplayer { background: rgba(0, 168, 120, 0.13); color: #0d7a56; }
.cat-casual { background: rgba(245, 158, 11, 0.16); color: #a65c09; }
/* filter chips pick up the same colors when not active */
.chip.cat-arcade:not(.chip-active) { color: #4c33b8; border-color: rgba(91, 63, 209, 0.35); }
.chip.cat-puzzle:not(.chip-active) { color: #1f5cad; border-color: rgba(39, 102, 199, 0.35); }
.chip.cat-action:not(.chip-active) { color: #b02c3b; border-color: rgba(201, 54, 70, 0.35); }
.chip.cat-multiplayer:not(.chip-active) { color: #0d7a56; border-color: rgba(0, 168, 120, 0.4); }
.chip.cat-casual:not(.chip-active) { color: #a65c09; border-color: rgba(245, 158, 11, 0.45); }

.badge {
  display: inline-block; padding: 3px 10px; border-radius: 999px;
  font-size: 0.72em; font-weight: 700; letter-spacing: 0.4px; text-transform: uppercase;
  background: var(--panel-2); border: 1px solid var(--border); color: var(--muted);
}
.badge-single { color: var(--accent-2); }
.badge-multi { color: var(--gold); }
.badge-premium { background: rgba(245, 158, 11, 0.12); color: var(--gold); border-color: rgba(180, 83, 9, 0.3); }
.badge-owned { background: rgba(0, 168, 120, 0.1); color: var(--accent); border-color: rgba(0, 168, 120, 0.35); }
.badge-draft { background: rgba(220, 38, 38, 0.08); color: var(--red); border-color: rgba(220, 38, 38, 0.3); }
.badge-cat { text-transform: none; }
.badge-ads { background: rgba(2, 132, 199, 0.1); color: var(--accent-2); border-color: rgba(2, 132, 199, 0.3); }
.badge-play { background: rgba(245, 158, 11, 0.14); color: var(--gold); border-color: rgba(180, 83, 9, 0.35); }
.badge-status-pending { color: var(--gold); }
.badge-status-paid { color: var(--accent); }
.badge-status-expired { color: var(--red); }
.badge-result-win { background: rgba(0, 168, 120, 0.1); color: var(--accent); border-color: rgba(0, 168, 120, 0.35); }
.badge-result-loss { background: rgba(220, 38, 38, 0.08); color: var(--red); border-color: rgba(220, 38, 38, 0.3); }
.badge-result-draw { background: rgba(245, 158, 11, 0.12); color: var(--gold); border-color: rgba(180, 83, 9, 0.3); }

/* ================= how it works ================= */
.how-card {
  background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 26px 24px;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.how-card:hover { border-color: var(--border-strong); transform: translateY(-3px); }
.how-num {
  width: 38px; height: 38px; border-radius: 12px; display: flex; align-items: center; justify-content: center;
  background: var(--grad); color: #fff; font-weight: 800; margin-bottom: 14px; font-family: var(--font-display);
}
.how-card h3 { margin: 0 0 6px; }
.how-card p { color: var(--muted); margin: 0; font-size: 0.94em; }

/* ================= toolbar / chips ================= */
.toolbar { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin: 16px 0 24px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  padding: 7px 15px; border-radius: 999px; border: 1px solid var(--border);
  color: var(--muted); font-size: 0.9em; font-weight: 500; background: #fff;
  box-shadow: var(--shadow-sm);
  transition: all 0.12s ease;
}
.chip:hover { text-decoration: none; color: var(--text); border-color: var(--border-strong); }
.chip-active { background: var(--grad); border-color: transparent; color: #fff; font-weight: 700; }
.chip-active:hover { color: #fff; }
.search { max-width: 250px; }

/* ================= inputs & forms ================= */
.input {
  width: 100%; background: #fff; color: var(--text);
  border: 1px solid var(--border-strong); border-radius: 11px; padding: 10px 13px;
  font: inherit; transition: border-color 0.12s ease, box-shadow 0.12s ease;
}
.input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(0, 185, 139, 0.15); }
.input::placeholder { color: rgba(93, 107, 131, 0.6); }
label { display: block; font-weight: 600; font-size: 0.9em; color: var(--muted); }
label > .input, label > input, label > select, label > textarea { margin-top: 6px; }
label.checkbox { display: flex; align-items: center; gap: 8px; color: var(--text); }
label.checkbox input { width: auto; }
.form { display: flex; flex-direction: column; gap: 14px; }
.form-row { flex-direction: row; align-items: end; gap: 10px; flex-wrap: wrap; }
.form-row .input { max-width: 240px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-grid .span2 { grid-column: span 2; }
.input-xs { max-width: 90px; padding: 5px 8px; font-size: 0.85em; }

/* ================= panels ================= */
.panel {
  background: var(--panel); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 22px; margin: 14px 0;
  box-shadow: 0 3px 12px rgba(35, 42, 70, 0.06);
}
.auth-panel { padding: 30px; }

/* ================= tables ================= */
.table { width: 100%; border-collapse: collapse; font-size: 0.92em; }
.table th, .table td { text-align: left; padding: 10px 11px; border-bottom: 1px solid var(--border); }
.table th { color: var(--muted); font-weight: 600; font-size: 0.8em; text-transform: uppercase; letter-spacing: 0.6px; }
.table tr:last-child td { border-bottom: 0; }
.table-thumb { width: 56px; border-radius: 8px; display: block; }
.actions { display: flex; gap: 6px; align-items: center; }
.adjust-form { display: flex; gap: 4px; align-items: center; }
.pager { display: flex; align-items: center; gap: 12px; margin-top: 12px; }

/* ================= game page ================= */
.game-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.game-head h1 { margin: 0; font-size: 1.55rem; }
.game-meta-row { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; margin-top: 7px; }
.game-below {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px; margin-top: 16px; align-items: start;
}
.suggested-games { padding: 25px 0 7px; border-bottom: 1px solid var(--border); }
.suggested-games .section-head { margin-bottom: 12px; }
.suggested-games h2 { margin: 0; font-size: 1.25rem; }
.suggested-grid { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; }
.suggested-grid .game-card-body { padding: 10px 12px 12px; }
.game-below .panel { margin: 0; }
.me-row { background: rgba(14, 165, 233, 0.07); }
.score-table td { padding: 6px 10px; }
.score-table .rank { width: 42px; font-weight: 700; }
.score-table .score-val { text-align: right; font-weight: 700; color: var(--gold); }
.desc { white-space: pre-line; }
.unlock-wall {
  border-radius: var(--radius); border: 1px solid var(--border);
  background:
    radial-gradient(400px 200px at 50% 0%, rgba(0, 185, 139, 0.08), transparent 70%),
    repeating-linear-gradient(45deg, var(--panel), var(--panel) 12px, var(--panel-2) 12px, var(--panel-2) 24px);
  min-height: 380px; display: flex; align-items: center; justify-content: center; text-align: center;
}
.unlock-inner { max-width: 380px; padding: 20px; }
.unlock-inner .lock { font-size: 3rem; }
.unlock-inner .btn { margin: 6px; }
.wallet-strip { text-align: center; }
.balance-big { font-size: 1.9rem; font-weight: 800; color: var(--gold); margin: 4px 0 10px; font-family: var(--font-display); }
.items { list-style: none; margin: 0; padding: 0; }
.item-row { display: flex; justify-content: space-between; gap: 10px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--border); }
.item-row:last-child { border-bottom: 0; }

/* entry overlay for play-money games */
.entry-wall {
  border-radius: var(--radius); border: 1px solid var(--border);
  background:
    radial-gradient(400px 200px at 50% 0%, rgba(245, 158, 11, 0.10), transparent 70%),
    var(--panel);
  min-height: 380px; display: flex; align-items: center; justify-content: center; text-align: center;
  box-shadow: var(--shadow-sm);
}
.entry-inner { max-width: 400px; padding: 20px; }
.entry-inner .ticket { font-size: 3rem; }
.entry-inner .btn { margin: 6px; }

/* ===== game window: YouTube-style 16:9 player ======================== */
.gamepage.section { padding: 16px 0 0; flex: 1; display: flex; flex-direction: column; overflow-x: clip; }
.gamepage > .container {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
}
.gamepage .frame-wrap {
  position: relative; overflow: hidden;
  border-radius: var(--radius); border: 1px solid var(--border); background: #000;
  aspect-ratio: 16 / 9;
  width: 100%;
  margin: 0 auto;
  flex: 0 0 auto;
  box-shadow: var(--shadow);
}
.gamepage .frame-wrap iframe {
  position: absolute; top: 0; left: 0;
  width: 100%; height: 100%;
  border: 0; display: block; background: #000;
}
.head-actions { margin-left: auto; }

/* bare embed mode for game pages loaded inside the window (?embed=1) */
body.embed { height: 100dvh; display: flex; flex-direction: column; justify-content: center; overflow: hidden; }
body.embed .mp-embed { padding: 6px; flex: 1; display: flex; flex-direction: column; justify-content: center; }
body.embed .mp-embed > .container { max-width: none; padding: 0; width: 100%; }
body.embed .mp-panel { max-width: 760px; width: 100%; margin: 0 auto; }

/* fullscreen */
#gameStage:fullscreen, #gameStage:-webkit-full-screen {
  width: 100vw; height: 100vh; background: #000; border-radius: 0; border: 0;
}
#gameStage.pseudo-fs {
  position: fixed; inset: 0; z-index: 1000; background: #000; border-radius: 0; border: 0;
}
body.fs-lock { overflow: hidden; }
.stage-bar { display: flex; gap: 10px; align-items: center; margin-top: 10px; flex-wrap: wrap; }
.hint { color: var(--muted); font-size: 0.9em; }

/* ================= dashboard ================= */
.dash-head { display: flex; justify-content: space-between; align-items: center; gap: 18px; flex-wrap: wrap; margin-bottom: 10px; }
.account-card { display: flex; flex-direction: column; gap: 8px; min-width: 280px; }
.account-row { display: flex; align-items: center; gap: 14px; }
.avatar {
  width: 54px; height: 54px; border-radius: 16px; flex: none;
  background: var(--grad); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem; font-weight: 800;
}
.wallet-card { text-align: center; background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 26px; box-shadow: var(--shadow-sm); }
.dash-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 860px) { .dash-grid { grid-template-columns: 1fr; } }
.simple-list { list-style: none; padding: 0; margin: 8px 0; }
.simple-list li { padding: 7px 0; border-bottom: 1px solid var(--border); }
.simple-list li:last-child { border-bottom: 0; }
.stat-win { color: var(--accent); }
.stat-loss { color: var(--red); }

/* ================= deposit ================= */
.packages { margin: 18px 0; }
.package { text-align: center; display: flex; flex-direction: column; gap: 6px; align-items: center; transition: border-color 0.15s ease, transform 0.15s ease; }
.package:hover { border-color: rgba(14, 165, 233, 0.5); transform: translateY(-3px); }
a.package, button.package { color: inherit; text-decoration: none; font: inherit; cursor: pointer; }
.pkg-label { color: var(--muted); font-weight: 700; text-transform: uppercase; font-size: 0.75em; letter-spacing: 1.2px; }
.pkg-amount { font-size: 2.1rem; font-weight: 800; font-family: var(--font-display); }
.pkg-credits { color: var(--gold); font-weight: 700; }
.custom-amount { max-width: 640px; }
.notice { border-radius: 12px; padding: 13px 17px; margin: 14px 0; font-size: 0.95em; }
.notice-warn { background: rgba(245, 158, 11, 0.09); border: 1px solid rgba(180, 83, 9, 0.3); }
.notice-info { background: rgba(14, 165, 233, 0.08); border: 1px solid rgba(2, 132, 199, 0.3); }
.invoice-rows { margin: 16px 0; }
.invoice-row { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--border); }

/* USDT checkout (cryptapi) */
.usdt-checkout { display: flex; gap: 22px; align-items: center; flex-wrap: wrap; margin: 16px 0; }
.usdt-qr { background: #fff; padding: 10px; border-radius: 12px; flex: none; border: 1px solid var(--border); }
.usdt-info { flex: 1; min-width: 240px; }
.usdt-amount { font-size: 1.7rem; font-weight: 800; color: var(--gold); font-family: var(--font-display); }

/* ================= multiplayer ================= */
.mp-panel { text-align: center; padding: 30px; }
.mp-actions { display: flex; gap: 16px; justify-content: center; align-items: center; flex-wrap: wrap; margin: 18px 0; }
.mp-join { display: flex; gap: 8px; }
.mp-join .input { width: 160px; text-align: center; letter-spacing: 4px; font-weight: 800; }
.mp-roomline { margin-bottom: 8px; }
.room-code { font-size: 1.3em; letter-spacing: 4px; color: var(--gold); }
.mp-players { margin-bottom: 14px; }
.mp-spectators { margin: -8px 0 14px; font-size: 0.82em; }
.board { display: grid; grid-template-columns: repeat(3, 96px); gap: 8px; justify-content: center; margin: 10px auto; }
.cell {
  width: 96px; height: 96px; font-size: 2.6rem; font-weight: 800; font-family: var(--font-display);
  background: var(--panel-2); color: var(--text); border: 1px solid var(--border); border-radius: 12px; cursor: pointer;
  transition: background 0.1s ease;
}
.cell:hover { background: #e6edf6; }
.cell-x { color: var(--accent-2); }
.cell-o { color: var(--gold); }
.cell-win { background: rgba(0, 168, 120, 0.15); border-color: var(--accent); }
.cell:disabled { cursor: default; }
.mp-status { font-size: 1.1em; font-weight: 600; min-height: 1.6em; margin: 10px 0; }

/* ================= admin ================= */
.admin-layout { display: grid; grid-template-columns: 210px 1fr; gap: 20px; align-items: start; }
.admin-side {
  background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 14px; display: flex; flex-direction: column; gap: 4px;
  position: sticky; top: 80px; box-shadow: var(--shadow-sm);
}
.admin-side-title {
  font-size: 0.72em; text-transform: uppercase; letter-spacing: 1.4px;
  color: var(--muted); font-weight: 800; padding: 6px 10px;
}
.side-link { color: var(--text); padding: 9px 12px; border-radius: 10px; font-weight: 600; font-size: 0.94em; }
.side-link:hover { background: var(--panel-2); text-decoration: none; }
.side-link.active { background: var(--grad); color: #fff; }
.side-link.side-accent { color: var(--accent-2); }
.side-link.side-accent.active { color: #fff; }
.admin-content { min-width: 0; }
@media (max-width: 860px) {
  .admin-layout { grid-template-columns: 1fr; }
  .admin-side { position: static; flex-direction: row; flex-wrap: wrap; }
}
.admin-tabs { display: flex; gap: 8px; margin: 12px 0 18px; flex-wrap: wrap; }
.admin-tabs.inline { margin: 0; }
.admin-cards { margin-bottom: 20px; }
.stat { text-align: center; }
.stat-num { font-size: 1.8rem; font-weight: 800; font-family: var(--font-display); }

/* chart (analytics) */
.chart { display: flex; align-items: flex-end; gap: 6px; height: 150px; padding: 8px 0; }
.chart-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.chart-bar { width: 100%; max-width: 34px; background: var(--grad); border-radius: 6px 6px 2px 2px; }
.chart-day { font-size: 0.68em; color: var(--muted); }

/* ================= docs ================= */
.doc-code {
  background: #0f1a2b; border: 1px solid #1e2c44; border-radius: 10px;
  padding: 14px 16px; overflow-x: auto; color: #b7f5dd;
  font: 0.88em/1.5 "Consolas", "SF Mono", monospace; margin: 8px 0 14px;
  white-space: pre;
}

/* ================= toast ================= */
#toast {
  position: fixed; bottom: 26px; left: 50%; transform: translateX(-50%);
  background: #fff; border: 1px solid var(--border-strong); color: var(--text);
  padding: 12px 22px; border-radius: 13px; box-shadow: var(--shadow);
  z-index: 200; max-width: 90vw; opacity: 0; transition: opacity 0.2s ease;
  font-weight: 500;
}
#toast.show { opacity: 1; }
#toast.ok { border-color: var(--accent); }
#toast.err { border-color: var(--red); }

/* ================= footer ================= */
.footer {
  border-top: 1px solid var(--border); margin-top: 58px; padding: 46px 0 22px;
  color: var(--muted); font-size: 0.9em; background: rgba(255, 255, 255, 0.72);
}
.footer-top { display: grid; grid-template-columns: minmax(240px, 1.8fr) repeat(3, minmax(120px, 0.7fr)); gap: 35px; padding-bottom: 36px; }
.footer-brand p { max-width: 320px; margin: 14px 0; line-height: 1.6; }
.footer-cta { color: var(--accent); font-weight: 800; font-size: 0.9em; }
.footer-group { display: flex; flex-direction: column; gap: 9px; }
.footer-group h3 { color: var(--text); margin: 0 0 3px; font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.08em; }
.footer-group a { color: var(--muted); font-size: 0.9em; }
.footer-group a:hover { color: var(--accent); text-decoration: none; }
.footer-bottom { display: flex; justify-content: space-between; gap: 12px; border-top: 1px solid var(--border); padding-top: 20px; font-size: 0.82em; }
.footer-note { color: #747f98; }

/* ================= responsive ================= */

/* ---- tablet: collapse two-column marketing layouts early ----
   These grids keep a 280–410px fixed side column, so they must stack well
   before phone width or the main column is crushed. */
@media (max-width: 1020px) {
  .hero-grid,
  .landing-hero-layout,
  .storefront-hero-inner,
  .storefront-split,
  .league-hero-layout,
  .league-audience-layout,
  .league-steps-layout,
  .popular-layout { grid-template-columns: 1fr; gap: 36px; }
  .league-audience-layout { gap: 30px; }
  .league-audience-layout > div > p { max-width: none; }
  .hero-showcase { margin: 0 auto; width: 100%; max-width: 420px; }
  .league-hero-board,
  .storefront-spotlight,
  .storefront-ranking { max-width: 480px; width: 100%; }
  .storefront-spotlight, .storefront-ranking { margin-left: auto; margin-right: auto; }
  .league-final-card,
  .landing-final-card { flex-direction: column; align-items: flex-start; gap: 22px; }
  .league-final-card > div:last-child,
  .landing-final-card > div:last-child { align-items: flex-start; }
  .league-final-card h2, .landing-final-card h2 { font-size: clamp(1.5rem, 5vw, 2rem); }
  .landing-game-grid,
  .storefront-game-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .category-row { grid-template-columns: repeat(2, 1fr); }
  .league-challenge-grid { grid-template-columns: 1fr; }
  .league-challenge-card { min-height: 0; }
}

/* avatar-only (no username) once the bar gets tight */
@media (max-width: 1100px) {
  .user-menu-name, .user-menu-caret { display: none; }
  .user-menu-btn { padding: 4px; }
}

/* ---- mobile nav drawer: brand + balance + hamburger; everything else folds in ---- */
@media (max-width: 860px) {
  .nav-inner { min-height: 0; height: auto; padding: 9px 0; flex-wrap: wrap; gap: 8px 10px; }
  .nav-toggle { display: flex; }
  .nav-links { display: none; }
  .nav-actions { margin-left: auto; gap: 8px; }
  .nav-actions .btn,
  .nav-actions .bonus-btn,
  .nav-actions .user-menu { display: none; }
  .nav.nav-open {
    box-shadow: var(--shadow);
    max-height: calc(100dvh - 60px);
    overflow-y: auto;
    background: #fff;
  }
  .nav.nav-open .nav-links {
    display: flex; flex-direction: column; align-items: stretch;
    order: 5; width: 100%; gap: 2px; padding: 4px 0 6px;
  }
  .nav.nav-open .nav-links a { padding: 13px 12px; font-size: 1em; border-radius: 10px; }
  .nav.nav-open .nav-actions {
    order: 6; display: flex; flex-direction: column; align-items: stretch;
    width: 100%; gap: 4px; padding-top: 10px; border-top: 1px solid var(--border);
  }
  .nav.nav-open .nav-actions .balance { display: none; }
  .nav.nav-open .nav-actions .nav-bell { display: none; }
  .nav.nav-open .nav-actions .btn { display: flex; justify-content: center; width: 100%; padding: 12px; }
  .nav.nav-open .nav-actions .bonus-btn { display: flex; justify-content: center; width: 100%; padding: 12px; font-size: 0.95em; }
  .nav.nav-open .nav-actions .user-menu { display: block; }
  .nav.nav-open .user-menu-btn { display: none; }
  .nav.nav-open .user-menu-panel {
    display: flex; flex-direction: column; position: static;
    box-shadow: none; border: 0; padding: 0; min-width: 0; background: transparent;
  }
  .nav.nav-open .user-menu-panel a,
  .nav.nav-open .user-menu-panel button { padding: 13px 12px; font-size: 1em; }
}

/* ---- wide tables scroll inside their panel instead of the page ---- */
@media (max-width: 880px) {
  .table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
}

@media (max-width: 640px) {
  body { overflow-x: hidden; }
  .container { width: 100%; min-width: 0; padding: 0 16px; }
  .gamepage > .container { min-width: 0; }
  .gamepage .game-head { align-items: flex-start; }
  .gamepage .game-head h1 { max-width: 100%; }
  .gamepage .game-below { grid-template-columns: 1fr; }
  .gamepage .item-row { align-items: flex-start; flex-wrap: wrap; }
  .footer { padding-top: 36px; }
  .footer-top { grid-template-columns: 1fr 1fr; gap: 28px 18px; }
  .footer-brand { grid-column: span 2; }
  .footer-bottom { flex-direction: column; gap: 6px; }
  .hero { padding: 48px 0 16px; }
  .hero-home { padding: 52px 0 42px; }
  .hero-grid { grid-template-columns: 1fr; gap: 28px; }
  .hero-home .hero-actions { justify-content: flex-start; }
  .hero-showcase { min-height: 218px; max-width: 360px; margin: 0 auto; width: 100%; }
  .showcase-score { left: 0; top: 0; }
  .showcase-bonus { right: 0; bottom: 0; }
  .marketing-band { padding: 32px 26px; flex-direction: column; align-items: flex-start; }
  .marketing-actions { align-items: flex-start; }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid .span2 { grid-column: span 1; }
  .board { grid-template-columns: repeat(3, 84px); }
  .cell { width: 84px; height: 84px; }
  .section { padding: 30px 0; }
  .home-game-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; }
  .game-card-body { padding: 9px 10px 11px; }
  .game-card-body h3 { font-size: 0.92rem; }
  .game-card-body p { font-size: 0.74rem; }
  .preview-caption span { display: none; }
  .suggested-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .landing-hero { padding: 50px 0 44px; }
  .landing-hero-layout, .popular-layout { grid-template-columns: 1fr; gap: 34px; }
  .landing-hero h1 { font-size: 2.75rem; }
  .landing-proof { gap: 12px; margin-top: 34px; }
  .landing-proof div { padding-left: 8px; }
  .landing-proof strong { font-size: 0.84rem; }
  .landing-proof span { font-size: 0.65rem; }
  .landing-section { padding: 45px 0; }
  .landing-featured { padding-top: 34px; }
  .landing-heading { display: block; margin-bottom: 17px; }
  .landing-heading p { margin-top: 7px; }
  .landing-heading .see-all { display: inline-block; margin-top: 11px; }
  .landing-heading h2 { font-size: 1.45rem; }
  .landing-game-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; }
  .discovery-grid, .popular-list { grid-template-columns: 1fr; }
  .discovery-card { min-height: 0; padding: 19px; }
  .landing-steps { grid-template-columns: 1fr; gap: 12px; margin-top: 25px; }
  .landing-steps div { padding: 14px 0 14px 50px; }
  .landing-steps div:not(:last-child)::after { left: 15px; top: 48px; bottom: -6px; right: auto; border-top: 0; border-left: 1px dashed rgba(101,70,216,0.38); }
  .landing-steps span { position: absolute; left: 0; top: 16px; }
  .landing-final-card { padding: 30px 24px; flex-direction: column; align-items: flex-start; }
  .landing-final-card h2 { font-size: 1.65rem; }
  .landing-final-card > div:last-child { align-items: flex-start; }
  .storefront-hero { padding: 45px 0; }
  .storefront-hero-inner, .storefront-split { grid-template-columns: 1fr; gap: 28px; }
  .storefront-copy h1 { font-size: 2.55rem; }
  .storefront-spotlight { max-width: 480px; }
  .storefront-section { padding: 42px 0; }
  .storefront-heading { margin-bottom: 15px; }
  .storefront-heading h2 { font-size: 1.35rem; }
  .storefront-game-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; }
  .category-row { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .category-row a { min-height: 106px; padding: 14px; }
  .storefront-ranking { padding: 18px; }
  .storefront-value-inner { grid-template-columns: 1fr; gap: 17px; padding: 27px 23px; }
  .storefront-value h2 { font-size: 1.45rem; }
  .league-highlight-grid { grid-template-columns: 1fr; }
  .league-empty { align-items: flex-start; flex-direction: column; }
  .club-page-grid, .tournament-board-grid, .club-admin-grid { grid-template-columns: 1fr; }
  .tournament-card { grid-template-columns: 1fr; gap: 10px; }
  .tournament-card-meta { align-content: start; }
  .tournament-status-box { justify-items: start; }
  .tournament-callout { align-items: flex-start; flex-direction: column; }
  .member-management .form-row { margin: 4px 0; flex-wrap: wrap; }
  .league-hero { padding: 48px 0; }
  .league-hero-layout, .league-steps-layout { grid-template-columns: 1fr; gap: 32px; }
  .league-hero h1 { font-size: 2.65rem; }
  .league-hero-copy > p { font-size: 1rem; }
  .league-hero-actions { gap: 15px; }
  .league-hero-note { gap: 7px 11px; margin-top: 24px; font-size: 0.71rem; }
  .league-section { padding: 45px 0; }
  .league-audience-section { padding: 40px 0; }
  .league-audience-layout { grid-template-columns: 1fr; gap: 23px; }
  .league-audience-layout h2 { font-size: 1.58rem; }
  .league-audience-list { grid-template-columns: 1fr; }
  .league-section-heading { display: block; margin-bottom: 19px; }
  .league-section-heading h2 { font-size: 1.42rem; }
  .league-section-heading > p { margin-top: 8px; }
  .league-heading-row > .btn, .league-heading-row > .see-all { display: inline-flex; margin-top: 14px; }
  .league-benefit-grid, .league-challenge-grid { grid-template-columns: 1fr; gap: 10px; }
  .league-benefit-grid article { padding: 18px; }
  .league-challenge-card { min-height: 154px; }
  .league-start-card, .league-start-card > div { align-items: flex-start; flex-direction: column; }
  .league-start-card { padding: 22px; }
  .league-steps-layout h2 { font-size: 1.55rem; }
  .league-final-card { padding: 30px 24px; flex-direction: column; align-items: flex-start; }
  .league-final-card h2 { font-size: 1.7rem; }
  .league-final-card > div:last-child { align-items: flex-start; }
  /* phone fit fixes */
  .account-card { min-width: 0; }
  .wallet-card { padding: 16px 18px; }
  .usdt-info { min-width: 0; }
  .usdt-checkout { gap: 14px; }
  .toolbar { gap: 10px; }
  .toolbar .search { max-width: none; width: 100%; }
  .pkg-amount { font-size: 1.7rem; }
  .table th, .table td { padding: 9px 8px; }
  .chart { height: 120px; }
  /* 16px inputs stop iOS Safari from auto-zooming on focus */
  .input, input, select, textarea { font-size: 16px; }
  .input-xs { font-size: 15px; }
  #toast { bottom: calc(14px + env(safe-area-inset-bottom, 0px)); max-width: calc(100vw - 32px); }
  .hero-actions .btn, .league-hero-actions .btn { width: 100%; }
  .landing-actions { flex-wrap: wrap; }
  .league-challenge-card footer { flex-wrap: wrap; }
}
