/* =========================================================
   MintPvP — Comic-3D Mint Sky-to-Night Theme
   Inspired by tactile 3D outline cards, floating cloud sky,
   and starry night finale — crafted for MintPvP.
   ========================================================= */
:root {
  --ice: #EEFFF6;
  --frost: #DCFCEB;
  --cloud: #FFFFFF;
  --cloud-shade: #C7F5DF;
  --cloud-shadow: #B5EBD1;

  --sky-top: #049A6A;
  --sky-mid: #17C88B;
  --sky-low: #6EEFB8;

  --primary: #14E68D;
  --primary-2: #5CF7B6;
  --primary-deep: #068957;
  --primary-soft: #D6FDEB;

  --ink: #041F16;
  --ink-2: #0B3325;
  --ink-soft: #2E5245;
  --muted: #4E7264;
  --line: rgba(4, 31, 22, .14);
  --line-strong: rgba(4, 31, 22, .26);

  /* Compat tokens (used by admin/legacy components) */
  --bg: #EEFFF6;
  --surface: #FFFFFF;
  --surface-2: #F4FFF9;
  --surface-3: #DCFCEB;
  --tint: #14E68D;
  --text: #041F16;
  --text-2: #2E5245;

  --success: #059669;
  --warning: #D97706;
  --danger: #E11D48;

  --r-sm: 10px;
  --r: 14px;
  --r-lg: 20px;
  --r-xl: 26px;

  --shadow-sm: 0 3px 0 var(--ink);
  --shadow-md: 0 5px 0 var(--ink);
  --shadow-lg: 0 7px 0 var(--ink);
  --shadow: 0 18px 42px -18px rgba(4, 31, 22, .35);

  --font: "Figtree", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: "Fredoka", "Figtree", system-ui, sans-serif;
  --font-heavy: "Bricolage Grotesque", "Fredoka", system-ui, sans-serif;
  --ease: cubic-bezier(.16, 1, .3, 1);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; min-height: 100vh; background: var(--ice); color: var(--ink);
  font: 500 16px/1.62 var(--font); -webkit-font-smoothing: antialiased;
  overflow-x: hidden; display: flex; flex-direction: column;
}
main { flex: 1; position: relative; z-index: 1; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; background: none; border: 0; padding: 0; }
input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 700; line-height: 1.12; margin: 0; letter-spacing: -.015em; color: var(--ink); }
p { margin: 0; }
.ico { flex-shrink: 0; }
.muted { color: var(--muted); }
.tiny { font-size: 13px; color: var(--muted); }
.skip { position: absolute; left: -999px; top: 8px; z-index: 120; background: var(--primary); color: var(--ink); border: 2px solid var(--ink); font-weight: 700; padding: 8px 14px; border-radius: 12px; }
.skip:focus { left: 8px; }
:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; border-radius: 8px; }
::selection { background: var(--primary); color: var(--ink); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

.container { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 clamp(16px, 3vw, 32px); }
.section { margin-top: clamp(56px, 7vw, 88px); }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.section-head h2 { font-size: clamp(24px, 3vw, 34px); }
.cloud-title { display: inline-flex; align-items: center; gap: 12px; }
.title-cloud { width: 42px; height: 26px; flex-shrink: 0; }
.title-cloud.flip { transform: scaleX(-1); }
.pill-count { display: inline-flex; align-items: center; height: 32px; padding: 0 14px; border-radius: 999px; background: var(--cloud); border: 2px solid var(--ink); box-shadow: 0 3px 0 var(--ink); font: 700 13px/1 var(--font-display); color: var(--ink); }
.link { color: var(--primary-deep); display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: 14.5px; transition: color .15s, transform .15s; }
.link:hover { color: var(--ink); }

/* ---------- Comic-3D Tactile Buttons ---------- */
.btn {
  --h: 44px; position: relative; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: var(--h); padding: 0 20px; border-radius: 14px;
  font-family: var(--font-display); font-weight: 700; font-size: 15px;
  border: 2px solid var(--ink); box-shadow: 0 4px 0 var(--ink);
  transition: transform .12s var(--ease), box-shadow .12s var(--ease), background .15s, filter .15s;
  white-space: nowrap; user-select: none;
}
.btn:hover { transform: translateY(2px); box-shadow: 0 2px 0 var(--ink); }
.btn:active { transform: translateY(4px); box-shadow: 0 0 0 var(--ink); }
.btn-sm { --h: 38px; padding: 0 14px; font-size: 13.5px; border-radius: 12px; box-shadow: 0 3px 0 var(--ink); }
.btn-sm:hover { transform: translateY(1.5px); box-shadow: 0 1.5px 0 var(--ink); }
.btn-sm:active { transform: translateY(3px); box-shadow: 0 0 0 var(--ink); }
.btn-lg { --h: 52px; padding: 0 26px; font-size: 16.5px; border-radius: 16px; }
.btn-block { width: 100%; }

/* Glossy comic mint CTA + glint sweep (SmileMoreCraft signature!) */
.btn-primary, .btn-buy, .btn-play {
  background: linear-gradient(180deg, #8FFFD0 0%, var(--primary-2) 38%, var(--primary) 100%);
  color: var(--ink);
  box-shadow: 0 5px 0 var(--primary-deep), 0 5px 0 2px var(--ink);
}
.btn-primary::before, .btn-buy::before, .btn-play::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(115deg, transparent 25%, rgba(255, 255, 255, .58) 50%, transparent 75%);
  transform: translateX(-120%); transition: transform .75s var(--ease);
}
.btn-primary:hover::before, .btn-buy:hover::before, .btn-play:hover::before { transform: translateX(120%); }
.btn-primary:hover, .btn-buy:hover, .btn-play:hover {
  transform: translateY(3px);
  box-shadow: 0 2px 0 var(--primary-deep), 0 2px 0 2px var(--ink);
}
.btn-primary:active, .btn-buy:active, .btn-play:active {
  transform: translateY(5px);
  box-shadow: 0 0 0 var(--primary-deep), 0 0 0 2px var(--ink);
}

.btn-ghost, .btn-comic-white { background: var(--cloud); color: var(--ink); }
.btn-ghost:hover, .btn-comic-white:hover { background: var(--primary-soft); }
.btn-light { background: var(--cloud); color: var(--ink); }
.btn-night { background: var(--ink-2); color: #fff; border-color: rgba(92, 247, 182, .45); box-shadow: 0 4px 0 #020E09; }
.btn-night:hover { background: #104634; transform: translateY(2px); box-shadow: 0 2px 0 #020E09; }
.btn-danger { background: #FFE4E6; color: #9F1239; border-color: #9F1239; box-shadow: 0 4px 0 #9F1239; }
.btn[disabled], .btn.is-disabled { opacity: .5; pointer-events: none; }

.icon-btn {
  width: 40px; height: 40px; border-radius: 12px; display: inline-grid; place-items: center;
  color: var(--ink); border: 2px solid transparent; transition: background .15s, border-color .15s, transform .12s;
  position: relative;
}
.icon-btn:hover, .icon-btn[aria-expanded="true"] { background: var(--primary-soft); border-color: var(--ink); }
.badge-dot {
  position: absolute; top: -3px; right: -3px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 999px;
  background: var(--primary); color: var(--ink); border: 2px solid var(--ink);
  font-family: var(--font-display); font-size: 11px; font-weight: 700; display: grid; place-items: center;
}

.chip {
  display: inline-flex; align-items: center; gap: 5px; height: 26px; padding: 0 11px; border-radius: 999px;
  font-family: var(--font-display); font-size: 12px; font-weight: 700;
  background: var(--primary-soft); color: var(--ink); border: 1.5px solid var(--ink);
}
.chip.ok { background: #D1FAE5; color: #065F46; border-color: #065F46; }
.chip.warn { background: #FEF3C7; color: #92400E; border-color: #92400E; }
.chip.bad { background: #FFE4E6; color: #9F1239; border-color: #9F1239; }
.chip.dim { background: var(--frost); color: var(--ink-soft); border-color: rgba(4, 31, 22, .25); }

.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--danger); display: inline-block; flex-shrink: 0; border: 1.5px solid var(--ink); }
.dot.on { background: var(--primary); animation: ping 2s infinite; }
@keyframes ping { 0% { box-shadow: 0 0 0 0 rgba(20, 230, 141, .65); } 70% { box-shadow: 0 0 0 8px rgba(20, 230, 141, 0); } 100% { box-shadow: 0 0 0 0 rgba(20, 230, 141, 0); } }

/* ---------- Floating White Pill Navbar (SmileMoreCraft Signature!) ---------- */
.topbar { position: sticky; top: 0; z-index: 40; padding: 14px 16px 0; }
.page-home .topbar { position: fixed; left: 0; right: 0; }
.nav {
  width: fit-content; max-width: 100%; margin: 0 auto; height: 64px; display: flex; align-items: center; gap: 6px; padding: 0 14px;
  background: var(--cloud); border: 2px solid var(--ink); border-radius: 20px; box-shadow: 0 5px 0 var(--ink);
}
.nav-logo {
  display: flex; align-items: center; gap: 9px; padding: 0 12px 0 2px; margin-right: 4px; height: 38px;
  border-right: 2px solid var(--line); font-family: var(--font-display); font-weight: 700; font-size: 18px; color: var(--ink);
}
.nav-logo img { width: 38px; height: 38px; object-fit: contain; transition: transform .3s var(--ease); }
.nav-logo:hover img { transform: rotate(-10deg) scale(1.08); }
.nav-links { display: flex; align-items: center; gap: 2px; list-style: none; margin: 0; padding: 0 6px 0 0; }
.nav-links > li > a, .nav-links > li > button {
  position: relative; display: inline-flex; align-items: center; gap: 4px; height: 40px; padding: 0 13px; border-radius: 12px;
  font-family: var(--font-display); font-size: 15px; font-weight: 600; color: var(--ink); transition: background .15s, color .15s;
}
.nav-links > li > a:hover, .nav-links > li > button:hover, .nav-links > li > button[aria-expanded="true"] { background: var(--primary-soft); }
.nav-links .is-active { background: var(--primary-soft); color: var(--primary-deep); }
.nav-links .is-active::after {
  content: ""; position: absolute; left: 50%; bottom: 3px; width: 18px; height: 4px; transform: translateX(-50%);
  border-radius: 999px; background: var(--primary); border: 1.5px solid var(--ink);
}
.nav-actions { display: flex; align-items: center; gap: 5px; margin-left: auto; }
.nav-links + .nav-actions { margin-left: 0; padding-left: 10px; border-left: 2px solid var(--line); height: 38px; }
.nav-burger { display: none; }

/* Language Switcher Pill */
.lang-btn {
  display: inline-flex; align-items: center; gap: 5px; height: 38px; padding: 0 11px; border-radius: 12px;
  background: var(--frost); border: 2px solid var(--ink); box-shadow: 0 2px 0 var(--ink);
  font-family: var(--font-display); font-weight: 700; font-size: 13px; color: var(--ink);
  transition: transform .12s, box-shadow .12s, background .15s;
}
.lang-btn:hover, .lang-btn[aria-expanded="true"] { background: var(--primary); transform: translateY(1px); box-shadow: 0 1px 0 var(--ink); }
.drop-lang { min-width: 175px !important; }
.drop-lang a { padding: 8px 10px !important; gap: 10px !important; }
.drop-lang a.is-active { background: var(--primary-soft); }
.lang-code {
  display: inline-grid; place-items: center; width: 28px; height: 24px; border-radius: 7px;
  background: var(--frost); border: 1.5px solid var(--ink); font-family: var(--font-display); font-size: 11px; font-weight: 700;
}
.drop-lang a.is-active .lang-code { background: var(--primary); }
.lang-check { margin-left: auto; color: var(--primary-deep); }

/* Dropdowns */
.has-drop { position: relative; }
.drop {
  position: absolute; top: calc(100% + 12px); left: 50%; transform: translate(-50%, 6px); min-width: 270px; padding: 8px;
  background: var(--cloud); border: 2px solid var(--ink); border-radius: 18px; box-shadow: 0 6px 0 var(--ink);
  opacity: 0; visibility: hidden; transition: opacity .16s, transform .16s var(--ease), visibility .16s; z-index: 50;
}
.drop.drop-right { left: auto; right: 0; transform: translateY(6px); }
.has-drop.open > .drop { opacity: 1; visibility: visible; transform: translate(-50%, 0); }
.has-drop.open > .drop.drop-right { transform: translateY(0); }
.drop a, .drop form button { display: flex; gap: 12px; align-items: center; padding: 10px; border-radius: 12px; width: 100%; text-align: left; transition: background .12s; color: var(--ink); }
.drop a:hover, .drop form button:hover { background: var(--primary-soft); }
.drop b { display: block; font-size: 14px; font-weight: 700; }
.drop small { display: block; color: var(--muted); font-size: 12.5px; line-height: 1.35; }
.drop-ico { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--primary-soft); border: 1.5px solid var(--ink); color: var(--ink); flex-shrink: 0; }
.drop-auth { padding: 16px; display: grid; gap: 10px; min-width: 250px; }
.drop-auth p { color: var(--muted); font-size: 13.5px; margin-bottom: 2px; }
.acc-btn {
  display: flex; align-items: center; gap: 9px; height: 42px; padding: 0 11px 0 5px; border-radius: 13px;
  border: 2px solid var(--ink); background: var(--frost); box-shadow: 0 2px 0 var(--ink);
}
.acc-btn:hover, .acc-btn[aria-expanded="true"] { background: var(--primary-soft); }
.acc-btn img { border-radius: 8px; image-rendering: pixelated; border: 1.5px solid var(--ink); }
.acc-meta { display: grid; line-height: 1.15; text-align: left; }
.acc-meta b { font-size: 13.5px; font-weight: 700; }
.acc-meta small { font-size: 11.5px; color: var(--primary-deep); font-weight: 700; }

/* Mobile Drawer */
.drawer { position: fixed; inset: 0; z-index: 60; background: rgba(4, 31, 22, .55); backdrop-filter: blur(4px); opacity: 0; visibility: hidden; transition: opacity .22s, visibility .22s; }
.drawer.open { opacity: 1; visibility: visible; }
.drawer-panel {
  position: absolute; right: 0; top: 0; bottom: 0; width: min(320px, 86vw); background: var(--ice);
  border-left: 2px solid var(--ink); padding: 18px; display: flex; flex-direction: column; gap: 4px;
  transform: translateX(100%); transition: transform .28s var(--ease); overflow-y: auto;
}
.drawer.open .drawer-panel { transform: none; }
.drawer-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.drawer-brand { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-size: 19px; }
.drawer-panel > a { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 13px; font-family: var(--font-display); font-weight: 600; color: var(--ink); }
.drawer-panel > a:hover { background: var(--cloud); box-shadow: inset 0 0 0 2px var(--ink); }
.drawer-panel > a.sub { padding-left: 28px; font-size: 14.5px; color: var(--ink-soft); }
.drawer-langs { display: flex; gap: 6px; flex-wrap: wrap; padding: 12px 0; margin-top: 8px; border-top: 2px dashed var(--line); }
.drawer-langs a {
  padding: 6px 11px; border-radius: 10px; background: var(--cloud); border: 2px solid var(--ink);
  font-family: var(--font-display); font-weight: 700; font-size: 12.5px;
}
.drawer-langs a.is-active { background: var(--primary); }
.drawer-foot { margin-top: auto; padding-top: 12px; }

/* Search Overlay */
.search-layer { position: fixed; inset: 0; z-index: 70; background: rgba(4, 31, 22, .62); backdrop-filter: blur(8px); opacity: 0; visibility: hidden; transition: opacity .18s, visibility .18s; padding: 90px 16px 16px; }
.search-layer.open { opacity: 1; visibility: visible; }
.search-box { max-width: 600px; margin: 0 auto; transform: translateY(-10px); transition: transform .22s var(--ease); }
.search-layer.open .search-box { transform: none; }
.search-input {
  display: flex; align-items: center; gap: 12px; height: 60px; padding: 0 20px; border-radius: 18px;
  background: var(--cloud); border: 2px solid var(--ink); box-shadow: 0 6px 0 var(--ink); color: var(--muted);
}
.search-input input { flex: 1; background: none; border: 0; outline: 0; font-size: 18px; font-weight: 600; color: var(--ink); min-width: 0; }
.search-hint { color: #DCFCEB; font-size: 13.5px; margin: 12px 6px; font-weight: 600; }
.search-results { display: grid; gap: 6px; }
.search-results a {
  display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 14px;
  background: var(--cloud); border: 2px solid var(--ink); box-shadow: 0 3px 0 var(--ink);
}
.search-results a:hover, .search-results a.is-focus { background: var(--primary-soft); }
.search-results img { width: 32px; height: 32px; border-radius: 8px; image-rendering: pixelated; border: 1.5px solid var(--ink); }
.search-results .ico { margin-left: auto; color: var(--ink-soft); }

/* Toasts */
.toast {
  position: relative; z-index: 30; max-width: 1180px; margin: 16px auto 0;
  display: flex; align-items: center; gap: 10px; padding: 13px 16px; border-radius: 16px;
  border: 2px solid var(--ink); box-shadow: 0 4px 0 var(--ink); font-size: 14.5px; font-weight: 600;
  width: calc(100% - 32px); animation: drop-in .3s var(--ease);
}
.page-home .toast { margin-top: 90px; }
.toast span { flex: 1; }
.toast button { opacity: .75; }
.toast-success { background: #D1FAE5; color: #064E3B; }
.toast-error { background: #FFE4E6; color: #881337; }
.toast-info { background: var(--cloud); color: var(--ink); }
@keyframes drop-in { from { opacity: 0; transform: translateY(-8px); } }

/* =========================================================
   DAYLIGHT MINT-SKY HERO (SmileMoreCraft Signature!)
   ========================================================= */
.hero {
  position: relative; overflow: hidden;
  padding: 110px 0 130px; min-height: clamp(610px, 90svh, 820px);
  display: flex; align-items: center;
  background: linear-gradient(180deg, var(--sky-top) 0%, var(--sky-mid) 50%, var(--sky-low) 100%);
}
.hero.has-img { background-image: linear-gradient(180deg, rgba(4, 154, 106, .76), rgba(23, 200, 139, .62)), var(--hero); background-size: cover; background-position: center; }
@media (max-width: 700px) { .hero.has-img { background-image: linear-gradient(180deg, rgba(4, 154, 106, .78), rgba(23, 200, 139, .64)), var(--hero-m, var(--hero)); } }

.hero-sky { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.sky-cloud { position: absolute; opacity: .94; filter: drop-shadow(0 6px 0 rgba(4, 31, 22, .08)); }
.sky-cloud.sc1 { width: 155px; top: 14%; left: 7%; animation: cloud-drift 18s ease-in-out infinite alternate; }
.sky-cloud.sc2 { width: 115px; top: 27%; left: 26%; opacity: .82; animation: cloud-drift 22s ease-in-out infinite alternate-reverse; }
.sky-cloud.sc3 { width: 145px; top: 13%; right: 8%; animation: cloud-drift 20s ease-in-out infinite alternate-reverse; }
.sky-cloud.sc4 { width: 108px; top: 26%; right: 16%; opacity: .86; animation: cloud-drift 16s ease-in-out infinite alternate; }
@keyframes cloud-drift { from { transform: translateX(-14px); } to { transform: translateX(18px); } }

.sky-gust { position: absolute; opacity: .55; stroke-dasharray: 260; stroke-dashoffset: 260; animation: gust 6.5s ease-in-out infinite; }
.sky-gust.g1 { width: 220px; top: 21%; right: 27%; }
.sky-gust.g2 { width: 180px; bottom: 26%; left: 22%; animation-delay: 2.8s; }
@keyframes gust { 0% { stroke-dashoffset: 260; opacity: 0; } 25% { opacity: .65; } 70% { stroke-dashoffset: -260; opacity: .55; } 100% { stroke-dashoffset: -260; opacity: 0; } }

.hero-clouds { position: absolute; left: 0; right: 0; bottom: -2px; pointer-events: none; z-index: 2; }
.hero-clouds svg { display: block; width: 100%; }
.hero-clouds .hc-back { height: clamp(64px, 8vw, 118px); margin-bottom: clamp(-52px, -6.5vw, -92px); }
.hero-clouds .hc-front { height: clamp(56px, 7vw, 104px); position: relative; z-index: 1; }

.hero-stage {
  position: relative; z-index: 3;
  display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center; gap: clamp(20px, 3vw, 44px);
}

/* Puffy Pure-White Cloud Cards (Left Join + Right Community) */
.cloud-card {
  position: relative; display: flex; align-items: center; justify-content: center;
  width: 100%; max-width: 315px; min-height: 205px; padding: 34px 28px;
  color: var(--ink); text-align: center;
  filter: drop-shadow(0 11px 0 var(--cloud-shadow)) drop-shadow(0 2px 0 rgba(4, 31, 22, .08));
  transition: transform .22s var(--ease);
}
.cloud-card:hover { transform: translateY(-4px); }
.cloud-join { justify-self: start; }
.cloud-community { justify-self: end; }

.cc-puffs { position: absolute; inset: 14px 10px; pointer-events: none; z-index: 0; background: #fff; border-radius: 50%; }
.cc-puffs i { position: absolute; background: #fff; border-radius: 50%; display: block; }
.cc-puffs i:nth-child(1) { width: 112px; height: 112px; left: -12px; top: 34px; }
.cc-puffs i:nth-child(2) { width: 118px; height: 118px; left: 32px; top: -18px; }
.cc-puffs i:nth-child(3) { width: 124px; height: 124px; left: 112px; top: -24px; }
.cc-puffs i:nth-child(4) { width: 110px; height: 110px; right: -8px; top: 18px; }
.cc-puffs i:nth-child(5) { width: 112px; height: 112px; right: 4px; bottom: -10px; }
.cc-puffs i:nth-child(6) { width: 120px; height: 120px; left: 96px; bottom: -20px; }
.cc-puffs i:nth-child(7) { width: 112px; height: 112px; left: 16px; bottom: -14px; }
.cc-puffs i:nth-child(8) { width: 96px; height: 96px; left: -14px; bottom: 16px; }
.cloud-community .cc-puffs { transform: scaleX(-1); }

.cc-body { position: relative; z-index: 1; display: grid; gap: 4px; justify-items: center; }
.cc-title { font-family: var(--font-heavy); font-size: 25px; font-weight: 800; letter-spacing: -.025em; color: var(--ink); line-height: 1.05; margin-bottom: 4px; }
.cc-kicker { font-size: 10.5px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.cc-ip {
  display: inline-flex; align-items: center; gap: 7px; font-family: var(--font-display); font-size: 17px; font-weight: 700;
  color: var(--ink); padding: 4px 10px; border-radius: 10px; background: var(--frost); border: 1.5px solid rgba(4, 31, 22, .16);
}
.cloud-join.copied .cc-ip { background: var(--primary); border-color: var(--ink); }
.cc-sub { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; color: var(--muted); margin-top: 4px; }

.cc-comm-row { display: flex; align-items: center; gap: 16px; text-align: left; }
.cc-comm-meta { display: grid; gap: 1px; }
.cc-count { font-family: var(--font-heavy); font-size: 28px; font-weight: 800; line-height: 1.05; color: var(--ink); }
.cc-comm-meta small { font-size: 12.5px; font-weight: 700; color: var(--primary-deep); }
.cc-dc {
  width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; flex-shrink: 0;
  background: var(--primary); color: var(--ink); border: 2px solid var(--ink); box-shadow: 0 4px 0 var(--ink);
  transition: transform .18s var(--ease);
}
.cloud-community:hover .cc-dc { transform: rotate(-6deg) scale(1.06); }

/* Center MintPvP Emblem & CTAs */
.hero-brand { display: flex; flex-direction: column; align-items: center; text-align: center; }
.hero-logo { width: clamp(190px, 21vw, 250px); height: clamp(190px, 21vw, 250px); position: relative; animation: float 5.5s ease-in-out infinite; }
.hero-logo img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 16px 0 rgba(4, 31, 22, .16)); }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
.hero-spark {
  position: absolute; right: 6%; top: 4%; width: 24px; height: 24px; background: #fff;
  filter: drop-shadow(0 0 8px #fff);
  clip-path: polygon(50% 0, 60% 40%, 100% 50%, 60% 60%, 50% 100%, 40% 60%, 0 50%, 40% 40%);
  animation: spark 2.4s ease-in-out infinite;
}
@keyframes spark { 0%, 100% { transform: scale(.65); opacity: .75; } 50% { transform: scale(1.15); opacity: 1; } }

.hero-wordmark {
  margin-top: 8px; font-family: var(--font-heavy); font-size: clamp(38px, 4.8vw, 58px); font-weight: 800;
  letter-spacing: -.03em; color: #fff; line-height: 1;
  -webkit-text-stroke: 2.5px var(--ink); paint-order: stroke fill;
  text-shadow: 0 5px 0 var(--ink);
}
.hero-tag {
  margin-top: 10px; font-size: 16px; font-weight: 700; color: var(--ink);
  background: rgba(255, 255, 255, .86); border: 2px solid var(--ink); border-radius: 999px;
  padding: 5px 16px; box-shadow: 0 3px 0 var(--ink); max-width: 420px;
}
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; margin-top: 20px; }

/* ---------- Quick Access Cards ---------- */
.quick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 12px; position: relative; z-index: 4; }
.quick-card {
  display: flex; align-items: center; gap: 14px; padding: 20px; border-radius: var(--r-lg);
  background: var(--cloud); border: 2px solid var(--ink); box-shadow: 0 6px 0 var(--ink);
  transition: transform .15s var(--ease), box-shadow .15s var(--ease), background .15s;
}
.quick-card:hover { transform: translateY(3px); box-shadow: 0 3px 0 var(--ink); background: var(--primary-soft); }
.quick-card b { display: block; font-family: var(--font-display); font-size: 18px; color: var(--ink); }
.quick-card small { color: var(--ink-soft); font-size: 13.5px; }
.quick-ico {
  width: 50px; height: 50px; border-radius: 14px; display: grid; place-items: center;
  background: var(--primary); color: var(--ink); border: 2px solid var(--ink); box-shadow: 0 3px 0 var(--ink); flex-shrink: 0;
}
.quick-arrow { margin-left: auto; color: var(--ink); transition: transform .18s; }
.quick-card:hover .quick-arrow { transform: translateX(4px); }

/* ---------- Pixel F1 Race Scene (Preserved in Comic-3D Frame!) ---------- */
.race-scene {
  --px: 2px; --lane: calc(19 * var(--px) + 32px); --stand-top: 42px;
  position: relative; border-radius: var(--r-xl); overflow: hidden;
  border: 2px solid var(--ink); box-shadow: 0 8px 0 var(--ink); isolation: isolate;
  height: calc(var(--stand-top) + 80px + 2 * var(--lane) + 46px);
  background: linear-gradient(180deg, #031510 0%, #072A1E 100%);
}
.f1-sprites { position: absolute; width: 0; height: 0; overflow: hidden; }
.rs-sky { position: absolute; inset: 0 0 auto; height: 120px; }
.rs-stars { position: absolute; inset: 0; background-image:
  linear-gradient(#fff, #fff), linear-gradient(#a7f3d0, #a7f3d0), linear-gradient(#fff, #fff), linear-gradient(#6ee7b7, #6ee7b7), linear-gradient(#fff, #fff), linear-gradient(#a7f3d0, #a7f3d0), linear-gradient(#fff, #fff);
  background-size: 2px 2px; background-repeat: no-repeat;
  background-position: 7% 18%, 19% 42%, 33% 10%, 48% 30%, 63% 14%, 84% 36%, 92% 8%; animation: twinkle 3s steps(2) infinite alternate; }
@keyframes twinkle { to { opacity: .5; } }
.rs-moon { position: absolute; right: 7%; top: 10px; width: 30px; height: 30px; background: #ecfdf5; box-shadow: inset -6px -4px 0 #a7f3d0, 0 0 30px 6px rgba(167, 243, 208, .25);
  clip-path: polygon(30% 0, 70% 0, 70% 10%, 90% 10%, 90% 30%, 100% 30%, 100% 70%, 90% 70%, 90% 90%, 70% 90%, 70% 100%, 30% 100%, 30% 90%, 10% 90%, 10% 70%, 0 70%, 0 30%, 10% 30%, 10% 10%, 30% 10%); }
.rs-lights i { position: absolute; top: 6px; width: 4px; height: calc(var(--stand-top) + 10px); background: #1e3a30; z-index: 1; }
.rs-lights i::before { content: ""; position: absolute; left: -9px; top: 0; width: 22px; height: 9px; background: #fff7d1;
  box-shadow: inset 0 3px 0 #ffe9a3, 0 0 0 2px #264a3e, 0 0 22px 6px rgba(255, 240, 190, .45); }
.rs-lights i::after { content: ""; position: absolute; left: -90px; top: 6px; width: 184px; height: 240px; pointer-events: none;
  background: radial-gradient(ellipse at 50% 0, rgba(255, 244, 205, .16), transparent 70%); }
.rs-stand { position: absolute; left: 0; right: 0; top: var(--stand-top); height: 60px; z-index: 0;
  background: url("../img/crowd.svg") 0 0 / 144px 60px repeat-x; image-rendering: pixelated; box-shadow: inset 0 6px 0 #1e3a30, inset 0 10px 0 #0e241c; }
.rs-stand::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(4, 31, 22, .55), transparent 60%); }
.rs-flash { position: absolute; top: 18px; width: 4px; height: 4px; background: #fff; opacity: 0; animation: flash 4s steps(1) infinite; animation-delay: var(--d); box-shadow: 0 0 10px 3px rgba(255, 255, 255, .7); z-index: 1; }
@keyframes flash { 0% { opacity: 1; } 3% { opacity: 0; } }
.rs-wall { position: absolute; left: 0; right: 0; top: calc(var(--stand-top) + 60px); height: 20px; display: flex; gap: 4px; background: #04150f; padding: 0 4px; z-index: 1; }
.rs-ad { flex: 1; min-width: 0; display: grid; place-items: center; background: var(--primary-deep); color: #fff; font: 800 10px/1 var(--font); letter-spacing: .14em; text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 0 6px; box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .25); }
.rs-ad.ip { text-transform: none; letter-spacing: .06em; }
.rs-ad.alt { background: #ecfdf5; color: var(--ink); }
.rs-track { position: absolute; left: 0; right: 0; bottom: 0; top: calc(var(--stand-top) + 80px); z-index: 2;
  background-color: #242c2a;
  background-image: linear-gradient(90deg, rgba(255, 255, 255, .025) 50%, transparent 50%), linear-gradient(rgba(0, 0, 0, .12) 50%, transparent 50%);
  background-size: 6px 6px, 6px 6px; border-top: 2px solid #04150f; }
.rs-track::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 12px; background: repeating-linear-gradient(90deg, #065f46 0 12px, #047857 12px 24px); }
.rs-kerb { position: absolute; left: 0; right: 0; height: 8px; background: repeating-linear-gradient(90deg, var(--primary) 0 18px, #f8fafc 18px 36px); }
.rs-kerb.top { top: 0; }
.rs-kerb.bottom { bottom: 12px; }
.rs-divider { position: absolute; left: 0; right: 0; top: calc(14px + var(--lane) + 3px); height: 3px; background: repeating-linear-gradient(90deg, rgba(248, 250, 252, .75) 0 24px, transparent 24px 48px); }
.rs-finish { position: absolute; top: 8px; bottom: 20px; left: 16%; width: 18px; opacity: .85;
  background: conic-gradient(#f8fafc 25%, #04150f 0 50%, #f8fafc 0 75%, #04150f 0) 0 0 / 12px 12px; }
.rs-lane { --n: var(--n-lg); --dur: 15s; position: absolute; left: 0; right: 0; height: var(--lane); container-type: inline-size; }
.rs-lane.l0 { top: 12px; }
.rs-lane.l1 { top: calc(12px + var(--lane) + 12px); --dur: 19s; }
.rs-lane .f1 { position: absolute; left: 0; bottom: 0; transform: translateX(-200px);
  animation: race var(--dur) linear infinite; animation-delay: calc(var(--dur) * var(--i) / var(--n) * -1 - var(--off, 0s)); }
.rs-lane.l1 .f1 { --off: 3.5s; }
.rs-lane .f1.x-lg { display: none; }
.rs-lane:hover .f1, .rs-lane:focus-within .f1 { animation-play-state: paused; }
@keyframes race { from { transform: translateX(-200px); } to { transform: translateX(calc(100cqw + 30px)); } }
@media (max-width: 1000px) { .rs-lane { --n: var(--n-md); } .rs-lane .f1.x-md { display: none; } }
.f1 { display: flex; flex-direction: column; align-items: center; color: #fff; will-change: transform; }
.f1-tag { display: inline-flex; align-items: center; gap: 5px; height: 20px; padding: 0 7px 0 3px; margin-bottom: 5px; white-space: nowrap;
  background: rgba(4, 31, 22, .9); border: 1.5px solid rgba(255, 255, 255, .25); border-radius: 6px; font: 700 11px/1 var(--font); transition: border-color .15s; }
.f1-tag b { background: var(--c1); color: #fff; padding: 2px 5px; border-radius: 3px; font-size: 10px; text-shadow: 0 1px 0 rgba(0, 0, 0, .35); }
.f1-tag small { display: none; color: #a7f3d0; font-size: 10.5px; font-weight: 500; }
.f1:hover .f1-tag, .f1:focus-visible .f1-tag { border-color: var(--c1); }
.f1:hover .f1-tag small, .f1:focus-visible .f1-tag small { display: inline; }
.f1:focus-visible { outline: none; }
.f1-car { position: relative; display: block; width: calc(57 * var(--px)); height: calc(19 * var(--px)); animation: rumble .16s steps(2) infinite;
  filter: drop-shadow(0 calc(var(--px) * 1.5) 0 rgba(0, 0, 0, .35)); }
@keyframes rumble { 50% { transform: translateY(-1px); } }
.f1-car::before, .f1-car::after { content: ""; position: absolute; right: 100%; height: var(--px); background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .45)); animation: streak .3s steps(2) infinite; }
.f1-car::before { top: calc(4 * var(--px)); width: 34px; }
.f1-car::after { top: calc(12 * var(--px)); width: 52px; animation-delay: .15s; }
@keyframes streak { 50% { opacity: .35; } }
.f1-body { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1; shape-rendering: crispEdges; }
.f1-driver { position: absolute; left: calc(27 * var(--px)); top: var(--px); width: calc(6 * var(--px)); height: calc(6 * var(--px)); image-rendering: pixelated; z-index: 0; background: #c68c5e; }
.f1-wheel { position: absolute; top: calc(8 * var(--px)); width: calc(11 * var(--px)); height: calc(11 * var(--px)); z-index: 2; shape-rendering: crispEdges; animation: spin .2s steps(4) infinite; }
.f1-wheel.r { left: calc(4 * var(--px)); }
.f1-wheel.f { left: calc(40 * var(--px)); }
@keyframes spin { to { transform: rotate(360deg); } }
.f1-light { position: absolute; left: 0; top: calc(7 * var(--px)); width: calc(2 * var(--px)); height: var(--px); background: #ff2d3d; z-index: 3; animation: blink 1s steps(1) infinite; box-shadow: 0 0 8px #ff2d3d; }
@keyframes blink { 50% { opacity: .2; box-shadow: none; } }

/* ---------- SmileMoreCraft-Style Sky-Stage Store Cards ---------- */
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 20px; }
.product {
  position: relative; display: flex; flex-direction: column; border-radius: 22px; overflow: hidden;
  background: var(--cloud); border: 2px solid var(--ink); box-shadow: 0 8px 0 var(--ink);
  transition: transform .16s var(--ease), box-shadow .16s var(--ease);
}
.product:hover { transform: translateY(4px); box-shadow: 0 4px 0 var(--ink); }
.product-tag {
  position: absolute; top: 12px; left: 12px; z-index: 3; font-family: var(--font-display); font-size: 12px; font-weight: 700;
  padding: 4px 10px; border-radius: 10px; background: #FDE047; color: var(--ink); border: 2px solid var(--ink); box-shadow: 0 2px 0 var(--ink);
}
.product-media {
  display: grid; place-items: center; height: 196px; position: relative; width: 100%; overflow: hidden;
  background: linear-gradient(180deg, var(--sky-top) 0%, var(--sky-mid) 56%, var(--sky-low) 100%);
}
.pm-cloud { position: absolute; background: rgba(255, 255, 255, .42); border-radius: 999px; pointer-events: none; }
.pm-cloud.c1 { width: 58px; height: 22px; top: 24px; left: 14%; }
.pm-cloud.c2 { width: 48px; height: 18px; top: 44px; right: 12%; }
.product-media img {
  position: relative; z-index: 1; width: 122px; height: 122px; image-rendering: pixelated; margin-bottom: 10px;
  transition: transform .3s var(--ease); filter: drop-shadow(0 12px 14px rgba(4, 31, 22, .3));
}
.product:hover .product-media img { transform: translateY(-6px) rotate(-4deg) scale(1.06); }
.pm-floor { position: absolute; left: 0; right: 0; bottom: -1px; width: 100%; height: 32px; z-index: 2; pointer-events: none; }
.product-body { padding: 14px 18px 18px; display: flex; flex-direction: column; flex: 1; background: var(--cloud); }
.product-body h3 { font-size: 21px; color: var(--ink); }
.product-meta { color: var(--muted); font-size: 13px; font-weight: 600; margin-top: 2px; }
.product-price { display: flex; align-items: baseline; gap: 6px; margin: 10px 0 4px; }
.product-price b { font-family: var(--font-heavy); font-size: 25px; font-weight: 800; color: var(--ink); }
.product-price span { color: var(--muted); font-size: 13.5px; font-weight: 700; }
.product-price s { color: var(--muted); font-size: 13.5px; margin-left: auto; }
.product-det-link {
  align-self: flex-start; color: var(--primary-deep); font-size: 13.5px; font-weight: 700;
  text-decoration: underline; text-underline-offset: 3px; margin-bottom: 12px;
}
.product-det-link:hover { color: var(--ink); }
.product-actions { margin-top: auto; }

/* Product Detail Modal */
.modal { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 16px; background: rgba(4, 31, 22, .68); backdrop-filter: blur(6px); opacity: 0; visibility: hidden; transition: opacity .12s, visibility .12s; }
.modal.open { opacity: 1; visibility: visible; }
.modal-card {
  width: min(740px, 100%); max-height: calc(100vh - 32px); overflow: auto; border-radius: var(--r-xl);
  background: var(--cloud); border: 2px solid var(--ink); box-shadow: 0 10px 0 var(--ink);
  display: grid; grid-template-columns: 260px 1fr; transform: scale(.97); transition: transform .15s var(--ease); position: relative;
}
.modal.open .modal-card { transform: none; }
.modal-media { display: grid; place-items: center; background: linear-gradient(180deg, var(--sky-top), var(--sky-low)); padding: 30px; border-right: 2px solid var(--ink); }
.modal-media img { width: 164px; height: 164px; image-rendering: pixelated; filter: drop-shadow(0 14px 18px rgba(4, 31, 22, .35)); }
.modal-body { padding: 26px; display: flex; flex-direction: column; gap: 14px; background: var(--cloud); }
.modal-close { position: absolute; top: 12px; right: 12px; background: var(--cloud); border: 2px solid var(--ink); }
.feature-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.feature-list li { display: flex; gap: 10px; align-items: flex-start; color: var(--ink-soft); font-size: 14.5px; font-weight: 500; }
.feature-list li .ico { color: var(--primary-deep); margin-top: 2px; }

/* ---------- News Cards ---------- */
.news-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.news-card {
  display: flex; flex-direction: column; gap: 10px; padding: 22px; border-radius: var(--r-lg);
  background: var(--cloud); border: 2px solid var(--ink); box-shadow: 0 7px 0 var(--ink);
  transition: transform .15s var(--ease), box-shadow .15s var(--ease), background .15s;
}
.news-card:hover { transform: translateY(3px); box-shadow: 0 4px 0 var(--ink); background: var(--surface-2); }
.news-card .chip { align-self: flex-start; }
.news-card h3 { font-size: 19px; }
.news-card p { color: var(--ink-soft); font-size: 14.5px; flex: 1; }
.news-date { display: inline-flex; gap: 6px; align-items: center; color: var(--muted); font-size: 13px; font-weight: 600; }

/* ---------- Page Hero & Breadcrumbs ---------- */
.page-hero { position: relative; padding: 48px 0 30px; text-align: center; }
.page-hero h1 { font-family: var(--font-heavy); font-size: clamp(32px, 4.5vw, 48px); font-weight: 800; }
.page-hero p { color: var(--ink-soft); margin-top: 8px; font-size: 16.5px; }
.page-hero .eyebrow {
  display: inline-flex; align-items: center; gap: 8px; padding: 5px 14px; border-radius: 999px;
  background: var(--primary-soft); border: 2px solid var(--ink); box-shadow: 0 3px 0 var(--ink);
  color: var(--ink); font-family: var(--font-display); font-size: 13px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; margin-bottom: 14px;
}
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 14px; color: var(--muted); margin-bottom: 22px; font-weight: 600; }
.crumbs a:hover { color: var(--ink); }
.crumbs .ico { opacity: .65; }
.crumbs b { color: var(--primary-deep); font-weight: 700; }

/* ---------- Cards & Layout Grids ---------- */
.card { background: var(--cloud); border: 2px solid var(--ink); border-radius: var(--r-lg); box-shadow: 0 7px 0 var(--ink); }
.card-pad { padding: 24px; }
.card h2 { font-size: 20px; }
.card-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.grid-side { display: grid; grid-template-columns: 1fr 370px; gap: 22px; align-items: start; }
.stack { display: grid; gap: 16px; }

/* Category Banners */
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; }
.cat-card {
  position: relative; height: 148px; border-radius: 22px; overflow: hidden; display: flex; align-items: center; gap: 18px; padding: 0 24px;
  background: linear-gradient(125deg, var(--cloud) 45%, var(--primary-soft) 100%);
  border: 2px solid var(--ink); box-shadow: 0 7px 0 var(--ink);
  transition: transform .15s var(--ease), box-shadow .15s var(--ease);
}
.cat-card:hover { transform: translateY(3px); box-shadow: 0 4px 0 var(--ink); }
.cat-card .cat-logo { width: 64px; height: 64px; position: relative; object-fit: contain; }
.cat-card .cat-sep { width: 3px; height: 54px; border-radius: 3px; background: var(--primary); border: 1px solid var(--ink); position: relative; }
.cat-card .cat-text { position: relative; }
.cat-card h3 { font-family: var(--font-heavy); font-size: 25px; font-weight: 800; letter-spacing: -.01em; }
.cat-card p { color: var(--ink-soft); font-size: 13.5px; margin-top: 3px; }
.cat-card .cat-icon { position: absolute; right: 20px; bottom: 16px; color: var(--primary-deep); opacity: .4; }
.subcats { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 22px; }
.subcats a {
  display: inline-flex; align-items: center; gap: 8px; height: 42px; padding: 0 16px; border-radius: 13px;
  border: 2px solid var(--ink); background: var(--cloud); box-shadow: 0 3px 0 var(--ink);
  font-family: var(--font-display); font-size: 14.5px; font-weight: 600; color: var(--ink);
}
.subcats a:hover { background: var(--primary-soft); }
.subcats a.is-active { background: var(--primary); }

/* ---------- Forms ---------- */
.form { display: grid; gap: 16px; }
.field { display: grid; gap: 7px; }
.field label, .label { font-size: 14px; font-weight: 700; color: var(--ink); }
.field small, .hint { color: var(--muted); font-size: 13px; }
.input, .select, .textarea {
  width: 100%; height: 48px; padding: 0 14px; border-radius: var(--r);
  background: var(--surface-2); border: 2px solid var(--ink);
  outline: none; transition: border-color .15s, box-shadow .15s, background .15s; font-size: 15px; color: var(--ink); font-weight: 500;
}
.textarea { height: auto; min-height: 140px; padding: 12px 14px; resize: vertical; }
.input:focus, .select:focus, .textarea:focus { background: var(--cloud); box-shadow: 0 0 0 4px rgba(20, 230, 141, .35); }
.input::placeholder, .textarea::placeholder { color: #7C9B8E; }
.input-wrap { position: relative; }
.input-wrap .input { padding-right: 48px; }
.input-wrap .input-act { position: absolute; right: 6px; top: 6px; width: 36px; height: 36px; border-radius: 9px; display: grid; place-items: center; color: var(--ink-soft); }
.input-wrap .input-act:hover { color: var(--ink); background: var(--primary-soft); }
.input-suffix { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: 13px; font-weight: 700; pointer-events: none; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--ink-soft); cursor: pointer; }
.check input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--primary-deep); flex-shrink: 0; }
.check a { color: var(--primary-deep); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.rules { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12.5px; color: var(--muted); font-weight: 600; }
.rules span.ok { color: var(--primary-deep); }
.row-between { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.alert { display: flex; gap: 10px; padding: 12px 14px; border-radius: var(--r); font-size: 14px; font-weight: 600; border: 2px solid var(--ink); }
.alert-error { background: #FFE4E6; color: #881337; border-color: #9F1239; }
.alert-info { background: var(--primary-soft); color: var(--ink); }
.alert-warn { background: #FEF3C7; color: #78350F; border-color: #B45309; }

/* Auth Pages */
.auth-wrap { display: grid; grid-template-columns: 1fr 1fr; max-width: 1040px; margin: 30px auto 0; border-radius: var(--r-xl); overflow: hidden; border: 2px solid var(--ink); box-shadow: 0 9px 0 var(--ink); background: var(--cloud); }
.auth-art {
  position: relative; padding: 40px; display: flex; flex-direction: column; justify-content: flex-end; gap: 12px; min-height: 540px;
  background: linear-gradient(180deg, var(--sky-top) 0%, var(--sky-mid) 55%, var(--sky-low) 100%);
  border-right: 2px solid var(--ink); overflow: hidden; color: var(--ink);
}
.auth-art img { position: absolute; width: min(260px, 64%); height: auto; aspect-ratio: 1; object-fit: contain; left: 0; right: 0; margin: 0 auto; top: 44px; filter: drop-shadow(0 16px 0 rgba(4, 31, 22, .16)); animation: float 6.5s ease-in-out infinite; }
.auth-art h2 { font-family: var(--font-heavy); font-size: 28px; position: relative; color: #fff; -webkit-text-stroke: 1.5px var(--ink); paint-order: stroke fill; text-shadow: 0 3px 0 var(--ink); }
.auth-art p { color: var(--ink); font-weight: 600; position: relative; background: rgba(255, 255, 255, .86); padding: 10px 14px; border-radius: 14px; border: 2px solid var(--ink); }
.auth-art .ip-pill { position: relative; align-self: flex-start; }
.auth-form { padding: 44px; display: flex; flex-direction: column; justify-content: center; }
.auth-form h1 { font-family: var(--font-heavy); font-size: 32px; }
.auth-form > p { color: var(--ink-soft); margin: 6px 0 24px; }
.auth-foot { text-align: center; margin-top: 20px; color: var(--muted); font-size: 14px; }
.auth-foot a { color: var(--primary-deep); font-weight: 700; }
.otp { display: flex; gap: 10px; justify-content: space-between; }
.otp input { width: 100%; max-width: 56px; height: 62px; text-align: center; font-size: 26px; font-weight: 700; font-family: var(--font-display); padding: 0; }

.ip-pill {
  display: inline-flex; align-items: center; gap: 9px; height: 42px; padding: 0 14px; border-radius: 13px;
  background: var(--cloud); border: 2px solid var(--ink); box-shadow: 0 3px 0 var(--ink);
  font-family: var(--font-display); font-weight: 700; font-size: 14.5px; color: var(--ink); transition: transform .12s, box-shadow .12s;
}
.ip-pill:hover { transform: translateY(1.5px); box-shadow: 0 1.5px 0 var(--ink); background: var(--primary-soft); }
.ip-pill.dark { background: var(--ink-2); color: #fff; border-color: rgba(92, 247, 182, .45); box-shadow: 0 3px 0 #020E09; }
.ip-pill.dark:hover { background: #104634; }
.ip-pill .ico { opacity: .75; }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table { width: 100%; border-collapse: collapse; font-size: 14.5px; min-width: 640px; }
.table th { text-align: left; font-size: 11.5px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); padding: 13px 16px; border-bottom: 2px solid var(--ink); background: var(--surface-2); white-space: nowrap; }
.table td { padding: 13px 16px; border-bottom: 1.5px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: var(--surface-2); }
.player-cell { display: flex; align-items: center; gap: 10px; font-weight: 700; }
.player-cell img { width: 28px; height: 28px; border-radius: 7px; image-rendering: pixelated; border: 1.5px solid var(--ink); }
.table .reason { color: var(--ink-soft); max-width: 280px; }
.empty { padding: 48px 20px; text-align: center; color: var(--muted); display: grid; justify-items: center; gap: 10px; }
.empty .ico { color: var(--primary-deep); }

/* Stats & Tabs */
.stats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; margin-bottom: 20px; }
.stat { position: relative; padding: 18px; border-radius: var(--r-lg); background: var(--cloud); border: 2px solid var(--ink); box-shadow: 0 5px 0 var(--ink); overflow: hidden; }
.stat b { display: block; font-family: var(--font-heavy); font-size: 30px; line-height: 1.1; }
.stat span { font-size: 11.5px; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.stat .ico { position: absolute; right: 14px; top: 14px; color: var(--primary-deep); }
.stat.hl { background: var(--primary-soft); }

.tabs { display: flex; gap: 6px; padding: 5px; border-radius: 15px; background: var(--frost); border: 2px solid var(--ink); overflow-x: auto; }
.tabs a { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 14px; border-radius: 10px; font-family: var(--font-display); font-size: 14px; font-weight: 600; color: var(--ink-soft); white-space: nowrap; }
.tabs a:hover { color: var(--ink); background: rgba(255, 255, 255, .6); }
.tabs a.is-active { background: var(--primary); color: var(--ink); box-shadow: inset 0 0 0 2px var(--ink); }
.toolbar { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; padding: 16px; border-bottom: 2px solid var(--ink); }
.toolbar .search-mini { display: flex; align-items: center; gap: 8px; height: 42px; padding: 0 12px; border-radius: 12px; background: var(--surface-2); border: 2px solid var(--ink); color: var(--muted); min-width: 240px; flex: 1; max-width: 380px; }
.toolbar .search-mini input { background: none; border: 0; outline: 0; flex: 1; min-width: 0; color: var(--ink); font-weight: 600; }
.pager { display: flex; justify-content: center; gap: 6px; padding: 16px; }
.pager a, .pager span { min-width: 38px; height: 38px; padding: 0 10px; display: grid; place-items: center; border-radius: 11px; border: 2px solid var(--ink); background: var(--cloud); font-family: var(--font-display); font-weight: 700; font-size: 14px; box-shadow: 0 2px 0 var(--ink); }
.pager a:hover { background: var(--primary-soft); }
.pager .is-active { background: var(--primary); }

/* Profile */
.profile-head { display: flex; align-items: center; gap: 26px; padding: 28px; border-radius: var(--r-xl); position: relative; overflow: hidden;
  background: linear-gradient(125deg, var(--cloud) 55%, var(--primary-soft) 100%); border: 2px solid var(--ink); box-shadow: 0 7px 0 var(--ink); }
.profile-skin { width: 120px; height: 200px; object-fit: contain; filter: drop-shadow(0 14px 16px rgba(4, 31, 22, .25)); flex-shrink: 0; }
.profile-head h1 { font-family: var(--font-heavy); font-size: 34px; }
.profile-badges { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.info-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 18px; }
.info { padding: 16px 18px; border-radius: var(--r-lg); background: var(--cloud); border: 2px solid var(--ink); box-shadow: 0 5px 0 var(--ink); }
.info span { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; font-weight: 700; }
.info b { display: block; font-size: 17px; margin-top: 4px; }

/* Support & FAQ */
.support-search { max-width: 640px; margin: 0 auto; }
.topic-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.topic { padding: 20px; border-radius: var(--r-lg); background: var(--cloud); border: 2px solid var(--ink); box-shadow: 0 6px 0 var(--ink); display: grid; gap: 8px; transition: transform .15s, box-shadow .15s, background .15s; text-align: left; }
.topic:hover, .topic.is-active { transform: translateY(3px); box-shadow: 0 3px 0 var(--ink); background: var(--primary-soft); }
.topic .quick-ico { width: 44px; height: 44px; margin-bottom: 4px; }
.topic b { font-family: var(--font-display); font-size: 16.5px; }
.topic small { color: var(--ink-soft); font-size: 13px; }
.faq { border-radius: var(--r); border: 2px solid var(--ink); background: var(--cloud); box-shadow: 0 4px 0 var(--ink); overflow: hidden; }
.faq + .faq { margin-top: 12px; }
.faq summary { list-style: none; cursor: pointer; padding: 16px 18px; display: flex; justify-content: space-between; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 700; font-size: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary .ico { transition: transform .2s; color: var(--ink); }
.faq[open] summary .ico { transform: rotate(180deg); color: var(--primary-deep); }
.faq p { padding: 0 18px 16px; color: var(--ink-soft); font-size: 14.5px; }
.ticket-list a { display: flex; align-items: center; gap: 14px; padding: 14px 18px; border-bottom: 1.5px solid var(--line); }
.ticket-list a:last-child { border-bottom: 0; }
.ticket-list a:hover { background: var(--surface-2); }
.ticket-list .t-main { flex: 1; min-width: 0; }
.ticket-list .t-main b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ticket-list .t-main small { color: var(--muted); font-size: 12.5px; }
.msgs { display: grid; gap: 14px; }
.msg { display: flex; gap: 12px; }
.msg img { width: 40px; height: 40px; border-radius: 10px; image-rendering: pixelated; border: 2px solid var(--ink); flex-shrink: 0; }
.msg-bubble { flex: 1; padding: 14px 16px; border-radius: 4px 16px 16px 16px; background: var(--cloud); border: 2px solid var(--ink); box-shadow: 0 4px 0 var(--ink); }
.msg.staff .msg-bubble { background: var(--primary-soft); }
.msg-head { display: flex; gap: 10px; align-items: center; font-size: 13.5px; margin-bottom: 6px; }
.msg-head time { color: var(--muted); margin-left: auto; font-size: 12px; }
.msg-bubble p { white-space: pre-wrap; word-break: break-word; font-size: 14.5px; color: var(--ink-soft); }

/* Credit & Cart */
.amounts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.amount { height: 68px; border-radius: 14px; border: 2px solid var(--ink); background: var(--cloud); box-shadow: 0 4px 0 var(--ink); display: grid; place-items: center; align-content: center; transition: transform .12s, box-shadow .12s, background .12s; }
.amount b { font-family: var(--font-heavy); font-size: 20px; }
.amount small { color: var(--muted); font-size: 12px; font-weight: 700; }
.amount:hover { background: var(--primary-soft); transform: translateY(2px); box-shadow: 0 2px 0 var(--ink); }
.amount.is-active { background: var(--primary); transform: translateY(2px); box-shadow: 0 2px 0 var(--ink); }
.amount.is-active small { color: var(--ink); }
.pay-methods { display: grid; gap: 10px; }
.pay-method { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 14px; border: 2px solid var(--ink); background: var(--cloud); box-shadow: 0 3px 0 var(--ink); cursor: pointer; }
.pay-method:has(input:checked) { background: var(--primary-soft); }
.pay-method input { accent-color: var(--primary-deep); width: 18px; height: 18px; }
.pay-method b { display: block; font-size: 14.5px; }
.pay-method small { color: var(--muted); font-size: 12.5px; }
.pay-logo { margin-left: auto; font-family: var(--font-display); font-weight: 700; font-size: 13px; padding: 4px 10px; border-radius: 8px; background: var(--ink); color: var(--primary-2); }
.balance { font-family: var(--font-heavy); font-size: 42px; font-weight: 800; color: var(--primary-deep); line-height: 1.1; }
.summary-row { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1.5px dashed var(--line); font-size: 15px; }
.summary-row:last-child { border-bottom: 0; }
.summary-row.total { font-weight: 800; font-size: 18px; }
.tx-list { display: grid; }
.tx { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1.5px solid var(--line); font-size: 14px; }
.tx:last-child { border-bottom: 0; }
.tx-ico { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--frost); border: 1.5px solid var(--ink); color: var(--ink); flex-shrink: 0; }
.tx-main { flex: 1; min-width: 0; font-weight: 600; }
.tx-main small { display: block; color: var(--muted); font-size: 12px; font-weight: 500; }
.tx-amt { font-weight: 800; font-family: var(--font-display); }
.tx-amt.plus { color: var(--primary-deep); }
.tx-amt.minus { color: var(--ink-soft); }

.cart-item { display: flex; align-items: center; gap: 16px; padding: 16px 0; border-bottom: 1.5px solid var(--line); }
.cart-item:last-child { border-bottom: 0; }
.cart-thumb { width: 66px; height: 66px; border-radius: 14px; display: grid; place-items: center; background: linear-gradient(180deg, var(--sky-mid), var(--sky-low)); border: 2px solid var(--ink); flex-shrink: 0; }
.cart-thumb img { width: 46px; height: 46px; image-rendering: pixelated; }
.cart-info { flex: 1; min-width: 0; }
.cart-info b { display: block; font-size: 16px; }
.cart-info small { color: var(--muted); font-size: 13px; }
.qty { display: inline-flex; align-items: center; border: 2px solid var(--ink); border-radius: 11px; overflow: hidden; background: var(--cloud); }
.qty button { width: 34px; height: 34px; display: grid; place-items: center; color: var(--ink); }
.qty button:hover { background: var(--primary-soft); }
.qty span { min-width: 30px; text-align: center; font-weight: 700; }
.cart-line { font-family: var(--font-display); font-weight: 700; min-width: 90px; text-align: right; }

/* Legal & Prose */
.legal { display: grid; grid-template-columns: 240px 1fr; gap: 24px; align-items: start; }
.legal-nav { position: sticky; top: 96px; display: grid; gap: 4px; padding: 10px; border-radius: var(--r-lg); background: var(--cloud); border: 2px solid var(--ink); box-shadow: 0 5px 0 var(--ink); }
.legal-nav a { padding: 10px 12px; border-radius: 10px; font-size: 14px; font-weight: 600; color: var(--ink-soft); }
.legal-nav a:hover { background: var(--surface-2); color: var(--ink); }
.legal-nav a.is-active { background: var(--primary); color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--ink); }
.prose { padding: 32px; min-width: 0; overflow-wrap: anywhere; }
.prose h1 { font-family: var(--font-heavy); font-size: 32px; margin-bottom: 18px; }
.prose h2 { font-size: 20px; margin: 26px 0 8px; }
.prose p, .prose li { color: var(--ink-soft); font-size: 15.5px; line-height: 1.75; }
.prose p + p { margin-top: 10px; }
.prose ul { padding-left: 20px; margin: 10px 0; }
.prose a { color: var(--primary-deep); font-weight: 700; }
.prose .muted { margin-top: 20px; font-size: 13px; }
.updated { color: var(--muted); font-size: 13px; font-weight: 600; margin-bottom: 18px; display: flex; align-items: center; gap: 6px; }

/* Contact */
.channel-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.channel { padding: 26px; border-radius: var(--r-lg); background: var(--cloud); border: 2px solid var(--ink); box-shadow: 0 7px 0 var(--ink); display: grid; gap: 10px; justify-items: start; }
.channel .quick-ico.discord { background: #5865F2; color: #fff; }
.channel h3 { font-size: 20px; }
.channel p { color: var(--ink-soft); font-size: 14.5px; }
.route { display: flex; justify-content: space-between; align-items: center; padding: 14px 18px; border-bottom: 1.5px solid var(--line); font-size: 15px; font-weight: 600; }
.route:last-child { border-bottom: 0; }
.route a { color: var(--primary-deep); display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: 14px; }

/* 404 / Error */
.notfound { min-height: 58vh; display: grid; place-items: center; text-align: center; padding: 40px 20px; }
.notfound .eyebrow { color: var(--primary-deep); letter-spacing: .12em; font-weight: 800; font-size: 13px; }
.notfound .code { font-family: var(--font-heavy); font-size: clamp(90px, 18vw, 150px); font-weight: 800; line-height: 1; color: var(--primary); -webkit-text-stroke: 3px var(--ink); paint-order: stroke fill; text-shadow: 0 7px 0 var(--ink); }
.notfound img { width: 120px; height: 120px; margin: 0 auto 12px; animation: float 6s ease-in-out infinite; }
.notfound p { color: var(--ink-soft); margin: 10px 0 24px; }

/* =========================================================
   STARRY NIGHT FOOTER (SmileMoreCraft Night Transition!)
   ========================================================= */
.footer {
  position: relative; z-index: 1; margin-top: 90px;
  background: var(--ink); color: #D4F3E5; overflow: hidden;
}
.night-canopy { position: relative; z-index: 2; line-height: 0; margin-top: -1px; }
.night-cloud { width: 100%; height: clamp(44px, 5.5vw, 82px); display: block; }
.night-stars {
  position: absolute; inset: 0; pointer-events: none; z-index: 0; opacity: .7;
  background-image:
    radial-gradient(2px 2px at 12% 18%, #fff, transparent),
    radial-gradient(1.5px 1.5px at 26% 42%, #8FFFD0, transparent),
    radial-gradient(2px 2px at 44% 14%, #fff, transparent),
    radial-gradient(1.5px 1.5px at 62% 32%, #fff, transparent),
    radial-gradient(2px 2px at 78% 20%, #8FFFD0, transparent),
    radial-gradient(1.5px 1.5px at 88% 48%, #fff, transparent),
    radial-gradient(2px 2px at 18% 72%, #fff, transparent),
    radial-gradient(1.5px 1.5px at 54% 66%, #8FFFD0, transparent),
    radial-gradient(2px 2px at 84% 78%, #fff, transparent);
  background-size: 420px 320px;
  animation: twinkle 4s ease-in-out infinite alternate;
}

.night-cta {
  position: relative; z-index: 1; text-align: center;
  padding: clamp(44px, 6vw, 76px) 20px clamp(42px, 5vw, 66px);
  display: grid; justify-items: center; gap: 10px;
  border-bottom: 1px solid rgba(92, 247, 182, .16);
}
.night-logo { width: 136px; height: 136px; object-fit: contain; animation: float 6s ease-in-out infinite; filter: drop-shadow(0 16px 26px rgba(0, 0, 0, .5)); }
.night-cta h2 { font-family: var(--font-heavy); font-size: clamp(32px, 4.6vw, 54px); font-weight: 800; color: #fff; margin-top: 6px; }
.night-ip { font-family: var(--font-heavy); font-size: clamp(22px, 2.8vw, 32px); font-weight: 800; color: var(--primary); letter-spacing: -.01em; }
.night-sub { color: #A6D7C2; max-width: 520px; font-size: 16px; }
.night-btns { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; margin-top: 14px; }

.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1.2fr; gap: 32px; padding-top: 48px; padding-bottom: 32px; position: relative; z-index: 1; }
.footer-brand img { width: 64px; height: 64px; margin-bottom: 14px; object-fit: contain; }
.footer-brand p { color: #B4DCCB; font-size: 14.5px; max-width: 420px; margin-bottom: 10px; }
.footer .tiny { color: #7AA794; }
.footer h3 { font-size: 15px; margin-bottom: 14px; color: #fff; }
.footer-grid > div:not(.footer-brand) { display: flex; flex-direction: column; align-items: flex-start; gap: 9px; }
.footer-grid > div > a { color: #A6D7C2; font-size: 14.5px; font-weight: 500; }
.footer-grid > div > a:hover { color: var(--primary); }

.footer-band { position: relative; margin-top: 10px; padding: 34px 16px clamp(16px, 2.6vw, 32px); background: linear-gradient(180deg, transparent, #02120C 40%); text-align: center; overflow: hidden; }
.footer-word {
  position: relative; z-index: 1; display: inline-flex; justify-content: center; font-family: var(--font-heavy); font-weight: 800; line-height: .84;
  font-size: min(160px, calc(140vw / var(--len))); letter-spacing: -.035em; color: #fff; white-space: nowrap; user-select: none; margin-bottom: -.05em;
  text-shadow: 0 .04em 0 var(--primary-deep), 0 0 .5em rgba(20, 230, 141, .28);
}
.footer-word span { display: inline-block; transform: translateY(var(--y)) rotate(var(--r)); transition: transform .35s var(--ease), color .35s; }
.footer-band:hover .footer-word span { animation: wiggle .9s var(--ease) both; animation-delay: calc(var(--i) * 35ms); }
@keyframes wiggle { 40% { transform: translateY(calc(var(--y) - .08em)) rotate(calc(var(--r) * -1)); color: var(--primary-2); } }
.footer-wave { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; width: 100%; height: clamp(24px, 4vw, 56px); display: block; }
.footer-wave .w1 { fill: var(--primary); }
.footer-wave .w2 { fill: var(--primary-2); opacity: .55; }

/* Cookie & Demo Ribbon */
.cookie {
  position: fixed; z-index: 90; left: 16px; right: 16px; bottom: 16px; max-width: 760px; margin: 0 auto;
  display: flex; align-items: center; gap: 18px; padding: 16px 18px; border-radius: var(--r-lg);
  background: var(--cloud); border: 2px solid var(--ink); box-shadow: 0 7px 0 var(--ink); animation: drop-in .35s var(--ease);
}
.cookie b { font-size: 15px; }
.cookie p { color: var(--ink-soft); font-size: 13.5px; }
.cookie p a { color: var(--primary-deep); font-weight: 700; text-decoration: underline; }
.cookie-actions { display: flex; gap: 8px; flex-shrink: 0; }
.demo-ribbon {
  position: fixed; right: 14px; bottom: 14px; z-index: 85; font-size: 12px; font-weight: 700; padding: 7px 13px; border-radius: 12px;
  background: #FEF3C7; border: 2px solid var(--ink); box-shadow: 0 3px 0 var(--ink); color: var(--ink);
  white-space: nowrap; cursor: default;
}
.cookie:not([hidden]) ~ .demo-ribbon { display: none; }

/* File input */
input[type=file].input { padding: 7px; height: auto; color: var(--muted); font-size: 13.5px; cursor: pointer; }
input[type=file].input::file-selector-button { margin-right: 12px; padding: 8px 14px; border: 1.5px solid var(--ink); border-radius: 9px; font: 700 13px/1 var(--font-display); color: var(--ink); background: var(--primary-soft); cursor: pointer; }
input[type=file].input:hover::file-selector-button { background: var(--primary); }

/* ---------- Responsive ---------- */
@media (max-width: 1120px) {
  .nav-links { display: none; }
  .nav { width: 100%; max-width: 680px; }
  .nav-links + .nav-actions { border-left: 0; margin-left: auto; }
  .nav-logo { border-right: 0; }
  .nav-burger { display: inline-grid; }
  .acc-meta { display: none; }
  .acc-btn { padding: 0 5px; }
  .stats { grid-template-columns: repeat(3, 1fr); }
  .topic-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 960px) {
  .hero { padding: 122px 0 96px; min-height: 0; }
  .hero-stage { grid-template-columns: 1fr; justify-items: center; gap: 22px; }
  .hero-brand { order: -1; }
  .cloud-join, .cloud-community { justify-self: center; max-width: 340px; min-height: 165px; padding: 24px 22px; }
  .quick, .news-grid, .grid-side, .grid-2, .channel-grid { grid-template-columns: 1fr; }
  .auth-wrap { grid-template-columns: 1fr; }
  .auth-art { min-height: 0; padding: 24px; flex-direction: row; align-items: center; border-right: 0; border-bottom: 2px solid var(--ink); }
  .auth-art img { position: static; width: 84px; height: 84px; margin: 0; animation: none; flex-shrink: 0; }
  .auth-art h2 { font-size: 20px; }
  .auth-art p, .auth-art .ip-pill { display: none; }
  .auth-form { padding: 28px 22px; }
  .legal { grid-template-columns: 1fr; }
  .legal-nav { position: static; display: flex; overflow-x: auto; }
  .legal-nav a { white-space: nowrap; }
  .prose { padding: 22px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
  .modal-card { grid-template-columns: 1fr; }
  .modal-media { padding: 20px; border-right: 0; border-bottom: 2px solid var(--ink); }
  .modal-media img { width: 120px; height: 120px; }
  .info-grid { grid-template-columns: 1fr; }
  .profile-head { flex-direction: column; text-align: center; padding: 24px; }
  .profile-badges { justify-content: center; }
}
@media (max-width: 640px) {
  .topbar { padding: 10px 10px 0; }
  .nav { height: 58px; border-radius: 17px; padding: 0 10px; }
  .nav-logo span { display: none; }
  .hero { padding: 112px 0 84px; }
  .hero-logo { width: 168px; height: 168px; }
  .demo-ribbon { font-size: 11px; padding: 6px 10px; right: 10px; bottom: 10px; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stat b { font-size: 24px; }
  .topic-grid, .product-grid, .cat-grid { grid-template-columns: 1fr; }
  .amounts { grid-template-columns: repeat(2, 1fr); }
  .cookie { flex-direction: column; align-items: stretch; }
  .cookie-actions .btn { flex: 1; }
  .card-pad { padding: 18px; }
  .toolbar .search-mini { min-width: 0; max-width: none; width: 100%; }
  .cart-item { flex-wrap: wrap; }
  .cart-line { min-width: 0; margin-left: auto; }
  .footer-grid { grid-template-columns: 1fr; }
  .otp { gap: 6px; }
  .otp input { height: 54px; font-size: 22px; }
  .title-cloud { display: none; }
  .race-scene { --px: 1.6px; --lane: calc(19 * var(--px) + 26px); --stand-top: 32px; border-radius: var(--r-lg); }
  .rs-stand { height: 48px; background-size: 115px 48px; }
  .rs-wall { top: calc(var(--stand-top) + 48px); height: 16px; }
  .rs-ad { font-size: 8.5px; letter-spacing: .1em; }
  .rs-ad:nth-child(n+4) { display: none; }
  .rs-track { top: calc(var(--stand-top) + 64px); }
  .race-scene { height: calc(var(--stand-top) + 64px + 2 * var(--lane) + 46px); }
  .rs-lane { --n: var(--n-sm); --dur: 9s; }
  .rs-lane.l1 { --dur: 11.5s; }
  .rs-lane .f1.x-sm { display: none; }
  @keyframes race { from { transform: translateX(-140px); } to { transform: translateX(calc(100cqw + 20px)); } }
  .f1-tag { height: 18px; font-size: 10px; }
  .rs-lights i:nth-child(2n) { display: none; }
  /* Tables stack on mobile */
  .table.stack-sm { min-width: 0; }
  .table.stack-sm thead { display: none; }
  .table.stack-sm tr { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; padding: 14px 16px; border-bottom: 1.5px solid var(--line); }
  .table.stack-sm tbody tr:last-child { border-bottom: 0; }
  .table.stack-sm td { padding: 0; border: 0; }
  .table.stack-sm td[data-label]::before { content: attr(data-label) ": "; color: var(--muted); font-size: 12.5px; }
  .table.stack-sm td.t-wide { grid-column: 1 / -1; max-width: none; }
  .table.stack-sm td.t-end { text-align: right; }
  .table.stack-sm td.t-small { font-size: 13px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .rs-lane .f1 { transform: translateX(calc((100cqw - 200px) * var(--i) / var(--n) + 20px)); }
}
