:root {
  --bg-dark: #0a0b1a;
  --panel-bg: #151b3b;
  --panel-2: #1a224a;
  --neon-blue: #00e5ff;
  --neon-purple: #9d00ff;
  --neon-orange: #ff8c00;
  --neon-yellow: #ffea00;
  --neon-green: #43ff9b;
  --danger: #ff4f7b;
  --text-light: #e0e6ff;
  --muted: #9ca8d6;
  --border-dark: #30385f;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background-color: var(--bg-dark);
  color: var(--text-light);
  font-family: 'VT323', monospace;
  margin: 0;
  background-image:
    linear-gradient(rgba(10, 11, 26, 0.90), rgba(10, 11, 26, 0.94)),
    repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(0, 229, 255, 0.05) 2px, rgba(0, 229, 255, 0.05) 4px);
}

h1, h2, h3, .pixel-btn, .badge, .slot-number, .nav-btn, .eyebrow, .label {
  font-family: 'Press Start 2P', cursive;
}

button, input { font: inherit; }
button { cursor: pointer; }
a { color: inherit; }
.hidden { display: none !important; }

.site-header {
  text-align: center;
  padding: 22px 20px 34px;
  border-bottom: 4px solid var(--neon-purple);
  box-shadow: 0 4px 15px rgba(157, 0, 255, 0.3);
  background: #0f1228;
}

.topbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: center;
  margin-bottom: 22px;
}

.topbar a, .nav-btn {
  background: rgba(21, 27, 59, 0.9);
  border: 2px solid var(--border-dark);
  color: var(--text-light);
  text-decoration: none;
  padding: 10px 12px;
  font-size: 10px;
  box-shadow: 3px 3px 0 #000;
}

.nav-btn.primary, .topbar a:hover, .nav-btn:hover {
  border-color: var(--neon-blue);
  color: var(--neon-blue);
}

.logo {
  max-width: 430px;
  width: 100%;
  height: auto;
  filter: drop-shadow(0 0 10px rgba(0, 229, 255, 0.5));
}

.site-header h1 {
  font-size: clamp(16px, 3vw, 26px);
  line-height: 1.5;
  margin: 14px 0 10px;
}

.hero-copy {
  max-width: 880px;
  margin: 0 auto 22px;
  font-size: 24px;
  color: #c9d2ff;
  line-height: 1.25;
}

.plan-strip {
  max-width: 980px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 14px;
  align-items: stretch;
}

.plan-strip div, .status-panel, .panel, .slot {
  background-color: var(--panel-bg);
  border: 4px solid #333;
  box-shadow:
    inset 4px 4px 0 rgba(255, 255, 255, 0.1),
    inset -4px -4px 0 rgba(0, 0, 0, 0.5),
    0 8px 0 rgba(0,0,0,0.45);
}

.plan-strip div {
  padding: 14px;
  text-align: left;
}

.plan-strip strong {
  display: block;
  color: var(--neon-yellow);
  font-size: 24px;
}

.plan-strip span {
  display: block;
  color: var(--muted);
  font-size: 20px;
  margin-top: 4px;
}

.pixel-btn {
  background-color: var(--neon-orange);
  color: #000;
  border: 3px solid #fff;
  padding: 12px 15px;
  text-decoration: none;
  font-size: 11px;
  text-transform: uppercase;
  box-shadow: 4px 4px 0 #000;
  transition: transform 0.1s, box-shadow 0.1s, background-color 0.1s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.pixel-btn:hover {
  background-color: var(--neon-yellow);
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0 #000;
}

.pixel-btn.small {
  font-size: 9px;
  padding: 9px 10px;
}

.status-panel {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  max-width: 1180px;
  margin: 28px auto 0;
  padding: 16px;
}

.status-panel div {
  background: #0f1228;
  border: 2px solid var(--border-dark);
  padding: 12px;
}

.label, .eyebrow {
  display: block;
  color: var(--neon-blue);
  font-size: 9px;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.status-panel strong { font-size: 24px; }

.content-section {
  max-width: 1400px;
  margin: 0 auto;
  padding: 40px;
}

.section-heading {
  max-width: 900px;
  margin-bottom: 22px;
}

.section-heading h2 {
  margin: 0 0 12px;
  font-size: clamp(16px, 2vw, 22px);
  line-height: 1.5;
}

.section-heading p:not(.eyebrow) {
  color: var(--muted);
  font-size: 23px;
  line-height: 1.25;
  margin: 0;
}

.arcade-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 25px;
}

.slot {
  position: relative;
  padding: 22px;
  min-height: 260px;
  display: flex;
  flex-direction: column;
  border-color: var(--neon-blue);
  background-color: var(--panel-2);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.slot:hover {
  transform: translateY(-5px);
  box-shadow:
    inset 4px 4px 0 rgba(255, 255, 255, 0.18),
    inset -4px -4px 0 rgba(0, 0, 0, 0.5),
    0 13px 0 rgba(0,0,0,0.5),
    0 0 20px rgba(0, 229, 255, 0.35);
}

.badge {
  align-self: flex-start;
  background-color: var(--neon-purple);
  color: #fff;
  padding: 6px 9px;
  font-size: 9px;
  border: 2px solid #fff;
  box-shadow: 2px 2px 0 #000;
}

.slot h3 {
  font-size: 13px;
  line-height: 1.45;
  margin: 18px 0 8px;
}

.slot p {
  flex: 1;
  color: #aeb9e6;
  font-size: 21px;
  line-height: 1.2;
}

.slot-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: auto;
}

.secondary-link {
  border: 2px solid var(--border-dark);
  background: #0f1228;
  color: var(--text-light);
  padding: 10px 12px;
  text-decoration: none;
  box-shadow: 3px 3px 0 #000;
  font-size: 20px;
}

.dashboard-grid, .avatar-layout, .friends-layout {
  display: grid;
  gap: 24px;
}

.dashboard-grid { grid-template-columns: minmax(280px, 0.8fr) minmax(320px, 1.2fr); }
.avatar-layout { grid-template-columns: minmax(280px, 0.6fr) minmax(420px, 1.4fr); }
.friends-layout { grid-template-columns: repeat(2, minmax(300px, 1fr)); }

.panel {
  padding: 22px;
  border-color: var(--border-dark);
}

.panel h3 {
  font-size: 13px;
  line-height: 1.5;
  margin: 0 0 16px;
}

.profile-card {
  display: flex;
  align-items: center;
  gap: 20px;
}

.profile-card h3 { margin-bottom: 6px; }
.profile-card p, .mini-stats, .activity-list, .list-stack, .message-thread { font-size: 22px; color: var(--muted); }
.mini-stats { display: flex; flex-wrap: wrap; gap: 10px; }
.mini-stats span { background: #0f1228; border: 2px solid var(--border-dark); padding: 8px 10px; }

.avatar-preview {
  position: relative;
  width: 96px;
  height: 96px;
  border: 3px solid var(--neon-blue);
  background: radial-gradient(circle at 50% 20%, rgba(255,255,255,.15), transparent 35%), #080b1d;
  image-rendering: pixelated;
  box-shadow: 0 0 18px rgba(0,229,255,.25), inset 4px 4px 0 rgba(255,255,255,.08), inset -4px -4px 0 rgba(0,0,0,.45);
  overflow: hidden;
}
.avatar-preview.large { width: 120px; height: 120px; flex: 0 0 120px; }
.avatar-preview.giant { width: 230px; height: 230px; margin: 0 auto 20px; }
.avatar-preview::before {
  content: '';
  position: absolute;
  left: 23%; top: 24%;
  width: 54%; height: 58%;
  background: var(--sprite-a, #00e5ff);
  border: 4px solid #050711;
  box-shadow: inset -10px -10px 0 var(--sprite-b, #006eff), inset 8px 8px 0 rgba(255,255,255,.22);
  clip-path: polygon(20% 0, 80% 0, 100% 25%, 88% 100%, 12% 100%, 0 25%);
}
.avatar-preview::after {
  content: '••';
  position: absolute;
  left: 0; right: 0; top: 38%;
  text-align: center;
  color: #04050c;
  letter-spacing: 12px;
  font-size: 22px;
  transform: translateX(5px);
}
.avatar-preview.giant::after { font-size: 40px; letter-spacing: 22px; transform: translateX(10px); }
.avatar-wearable {
  position: absolute;
  z-index: 3;
  font-size: 22px;
  text-shadow: 2px 2px 0 #000;
}
.avatar-preview.giant .avatar-wearable { font-size: 42px; }
.wear-hat { top: 2%; left: 50%; transform: translateX(-50%); }
.wear-shirt { top: 58%; left: 50%; transform: translateX(-50%); }
.wear-face { top: 34%; left: 50%; transform: translateX(-50%); }
.wear-accessory { bottom: 8%; right: 9%; }

.sprite-01 { --sprite-a:#00e5ff; --sprite-b:#006eff; }
.sprite-02 { --sprite-a:#2aff7e; --sprite-b:#008b3a; }
.sprite-03 { --sprite-a:#ff65c8; --sprite-b:#8b1468; }
.sprite-04 { --sprite-a:#c6d0ff; --sprite-b:#6571ff; }
.sprite-05 { --sprite-a:#f2f7ff; --sprite-b:#8b93ad; }
.sprite-06 { --sprite-a:#ff8c00; --sprite-b:#ad3a00; }
.sprite-07 { --sprite-a:#ffffff; --sprite-b:#30385f; }
.sprite-08 { --sprite-a:#9d00ff; --sprite-b:#41007a; }
.sprite-09 { --sprite-a:#9fff00; --sprite-b:#527b00; }
.sprite-10 { --sprite-a:#ffea00; --sprite-b:#b77a00; }
.sprite-11 { --sprite-a:#43ff9b; --sprite-b:#0b7851; }
.sprite-12 { --sprite-a:#ffb2d8; --sprite-b:#d64f90; }
.sprite-13 { --sprite-a:#ff4f4f; --sprite-b:#690000; }
.sprite-14 { --sprite-a:#bdf8ff; --sprite-b:#4096bd; }
.sprite-15 { --sprite-a:#f5e6ff; --sprite-b:#bc79ff; }
.sprite-16 { --sprite-a:#8affd2; --sprite-b:#197d77; }
.sprite-17 { --sprite-a:#c28bff; --sprite-b:#53229d; }
.sprite-18 { --sprite-a:#79ffe1; --sprite-b:#16a6a6; border-radius: 40%; }
.sprite-19 { --sprite-a:#d9ecff; --sprite-b:#455d7f; }
.sprite-20 { --sprite-a:#1f214a; --sprite-b:#9d00ff; }

.avatar-stage { text-align: center; position: sticky; top: 16px; align-self: start; }
.item-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-bottom: 22px; }
.item-card {
  background: #0f1228;
  border: 2px solid var(--border-dark);
  color: var(--text-light);
  padding: 10px;
  text-align: left;
  min-height: 88px;
}
.item-card.selected { border-color: var(--neon-yellow); box-shadow: 0 0 12px rgba(255,234,0,.25); }
.item-card.locked { opacity: .78; }
.item-card strong { display: block; font-size: 20px; color: #fff; }
.item-card span { display: block; color: var(--muted); font-size: 18px; }
.item-card button { margin-top: 8px; }

.inline-form { display: flex; gap: 10px; }
input {
  width: 100%;
  background: #0f1228;
  border: 2px solid var(--border-dark);
  color: var(--text-light);
  padding: 11px 12px;
  font-size: 22px;
  outline: none;
}
input:focus { border-color: var(--neon-blue); }

.list-stack { display: grid; gap: 10px; }
.list-row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 10px;
  background: #0f1228;
  border: 2px solid var(--border-dark);
  padding: 12px;
}
.list-row strong { color: #fff; }
.list-row span { display: block; color: var(--muted); }
.row-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }

.message-thread {
  height: 260px;
  overflow: auto;
  background: #0f1228;
  border: 2px solid var(--border-dark);
  padding: 12px;
  margin-bottom: 12px;
}
.message { margin-bottom: 10px; }
.message.me { text-align: right; }
.message b { color: var(--neon-blue); }
.message p { display: inline-block; max-width: 80%; background: #151b3b; border: 2px solid var(--border-dark); padding: 8px 10px; margin: 4px 0 0; color: var(--text-light); }
.message.me p { border-color: var(--neon-purple); }
.empty-state { color: #6f7aaa; }

.auth-dialog {
  max-width: 440px;
  width: calc(100% - 30px);
  background: var(--panel-bg);
  color: var(--text-light);
  border: 4px solid var(--neon-blue);
  box-shadow: 0 0 0 200vmax rgba(0,0,0,.65), 0 0 24px rgba(0,229,255,.35);
  padding: 22px;
}
.auth-dialog::backdrop { background: rgba(0,0,0,.65); }
.dialog-close-form { text-align: right; margin: 0; }
.dialog-close-form button { background: transparent; border: 0; color: var(--text-light); font-size: 34px; }
.auth-tabs { display: flex; gap: 8px; margin-bottom: 18px; }
.auth-tabs button { flex: 1; background: #0f1228; color: var(--text-light); border: 2px solid var(--border-dark); padding: 10px; }
.auth-tabs button.active { border-color: var(--neon-yellow); color: var(--neon-yellow); }
.auth-form { display: grid; gap: 12px; }
.auth-form h2 { margin: 0 0 8px; font-size: 15px; }
.form-message { font-size: 20px; min-height: 24px; color: var(--danger); }
.toast {
  position: fixed;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  background: #0f1228;
  border: 3px solid var(--neon-green);
  padding: 14px 18px;
  color: var(--text-light);
  box-shadow: 4px 4px 0 #000;
  z-index: 10;
  font-size: 22px;
}

footer {
  text-align: center;
  padding: 30px;
  background-color: #0f1228;
  border-top: 4px solid var(--neon-blue);
  font-size: 18px;
  color: #6a7aab;
}

@media (max-width: 860px) {
  .plan-strip, .status-panel, .dashboard-grid, .avatar-layout, .friends-layout { grid-template-columns: 1fr; }
  .content-section { padding: 28px 18px; }
  .profile-card { align-items: flex-start; flex-direction: column; }
  .inline-form { flex-direction: column; }
}

.topbar a.active {
  border-color: var(--neon-yellow);
  color: var(--neon-yellow);
}

.profile-page-header {
  padding-bottom: 26px;
}

.small-logo {
  max-width: 310px;
}

.quick-profile-actions {
  max-width: 1180px;
  margin: 22px auto 0;
  padding: 0 40px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.auth-required .panel {
  max-width: 820px;
  margin: 0 auto;
}

.auth-required h2 {
  margin-top: 0;
  font-size: clamp(16px, 2vw, 22px);
  line-height: 1.5;
}

.auth-required p:not(.eyebrow) {
  font-size: 23px;
  color: var(--muted);
  line-height: 1.25;
}

.avatar-preview.mini {
  width: 54px;
  height: 54px;
  flex: 0 0 54px;
  border-width: 2px;
}

.avatar-preview.mini::after {
  font-size: 13px;
  letter-spacing: 7px;
  transform: translateX(3px);
}

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

.friend-row .secondary-link {
  font-size: 16px;
  padding: 9px 10px;
}

@media (max-width: 860px) {
  .quick-profile-actions { padding: 0 18px; }
  .friend-row { grid-template-columns: auto 1fr; }
  .friend-row > button, .friend-row .row-actions { grid-column: 1 / -1; justify-content: flex-start; }
}

/* v4 profile/avatar/friends pages */
.subpage-actions,
.wrap-actions {
  flex-wrap: wrap;
}

.muted-copy {
  color: var(--muted);
  font-size: 21px;
  line-height: 1.25;
}

.dashboard-grid.one-two {
  grid-template-columns: minmax(260px, .8fr) minmax(320px, 1.2fr);
}

.level-panel h3,
.invite-card h3 {
  margin-bottom: 12px;
}

.level-meter {
  width: 100%;
  height: 28px;
  background: #070914;
  border: 3px solid var(--border-dark);
  box-shadow: inset 3px 3px 0 rgba(0,0,0,.6);
  overflow: hidden;
  margin: 14px 0 10px;
}

.level-meter-fill {
  height: 100%;
  width: 0%;
  background: repeating-linear-gradient(90deg, var(--neon-yellow) 0 12px, var(--neon-orange) 12px 24px);
  box-shadow: 0 0 14px rgba(255,234,0,.45);
  transition: width .25s ease;
}

.level-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 22px;
}

.avatar-preview::before,
.avatar-preview::after {
  display: none;
}

.avatar-preview {
  display: grid;
  place-items: center;
}

.avatar-base-img,
.avatar-wearable-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  pointer-events: none;
}

.avatar-base-img { z-index: 1; }
.avatar-wearable-img { z-index: 3; }
.avatar-wearable-img.wear-shirt { z-index: 2; }
.avatar-wearable-img.wear-accessory { z-index: 4; }
.avatar-wearable-img.wear-face { z-index: 5; }
.avatar-wearable-img.wear-hat { z-index: 6; }

.item-card {
  display: grid;
  gap: 7px;
}

.item-preview {
  width: 74px;
  height: 74px;
  position: relative;
  border: 2px solid var(--border-dark);
  background: radial-gradient(circle at 50% 20%, rgba(255,255,255,.12), transparent 35%), #080b1d;
  overflow: hidden;
  image-rendering: pixelated;
}

.item-preview img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

.wearable-preview img {
  transform: scale(1.18);
}

.invite-card {
  margin-bottom: 22px;
}

.invite-form input {
  min-width: min(100%, 480px);
}

.invite-accept {
  margin-top: 14px;
  padding: 12px;
  border: 2px solid var(--neon-yellow);
  background: #0f1228;
  box-shadow: 0 0 12px rgba(255,234,0,.18);
}

.invite-accept strong {
  color: var(--neon-yellow);
  font-family: 'Press Start 2P', cursive;
  font-size: 11px;
}

.invite-accept p {
  color: var(--muted);
  font-size: 21px;
  margin: 8px 0 12px;
}

@media (max-width: 860px) {
  .dashboard-grid.one-two { grid-template-columns: 1fr; }
  .level-meta { font-size: 20px; }
  .invite-form input { min-width: 0; width: 100%; }
}


/* v5 premium avatars and golden friend names */
.premium-name {
  color: #ffea88;
  text-shadow: 0 0 10px rgba(255, 214, 64, 0.45), 2px 2px 0 #5a4100;
}

.premium-pill {
  display: inline-block;
  margin-left: 8px;
  padding: 3px 7px;
  border: 2px solid #fff1b2;
  background: linear-gradient(180deg, #ffea88 0%, #d39400 100%);
  color: #251700;
  font-size: 11px;
  vertical-align: middle;
  box-shadow: 2px 2px 0 #000;
}

.avatar-preview[data-premium="true"] {
  border-color: #ffd44d;
  box-shadow: 0 0 18px rgba(255,212,77,.35), inset 4px 4px 0 rgba(255,255,255,.08), inset -4px -4px 0 rgba(0,0,0,.45);
}

.item-card.premium-item {
  border-color: #c08a00;
  background: linear-gradient(180deg, rgba(255,220,96,.12), rgba(21,27,59,1));
}

.item-preview.premium-preview {
  border-color: #e0b63e;
  box-shadow: 0 0 12px rgba(255,216,96,.24);
}

.premium-lock {
  border-color: #ffd44d;
  color: #ffea88;
}

.premium-note {
  margin-top: 12px;
  padding: 12px;
  border: 2px solid #e0b63e;
  background: rgba(255,220,96,.08);
  box-shadow: 0 0 12px rgba(255,216,96,.15);
}

.premium-note strong {
  color: #ffea88;
}


/* v6 full-body avatar customisation */
.avatar-section-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
}

.item-section h3 {
  margin: 0 0 10px;
  font-size: 12px;
}

.item-section {
  padding-top: 6px;
}

.avatar-wearable-img.wear-body { z-index: 2; }
.avatar-wearable-img.wear-shirt { z-index: 3; }
.avatar-wearable-img.wear-legs { z-index: 4; }
.avatar-wearable-img.wear-shoes { z-index: 5; }
.avatar-wearable-img.wear-accessory { z-index: 6; }
.avatar-wearable-img.wear-face { z-index: 7; }
.avatar-wearable-img.wear-hat { z-index: 8; }

.friend-row.premium-friend {
  border-color: #d6a42a;
  background: linear-gradient(180deg, rgba(255, 228, 126, 0.13), rgba(21, 27, 59, 0.98));
  box-shadow: 0 0 14px rgba(255, 211, 77, 0.15);
}


/* v7 wearable tuning, notifications, install prompt, and friend duels */
.avatar-wearable-img.wear-hat {
  transform: translateY(-4%) scale(.98);
  transform-origin: 50% 8%;
}
.avatar-wearable-img.wear-face {
  transform: translateY(-1%);
}
.avatar-wearable-img.wear-body,
.avatar-wearable-img.wear-shirt,
.avatar-wearable-img.wear-legs,
.avatar-wearable-img.wear-shoes {
  transform: none;
}
.avatar-wearable-img.wear-accessory {
  transform: scale(1.01);
}
.avatar-preview.giant .avatar-wearable-img.wear-hat {
  transform: translateY(-5%) scale(.99);
}
.item-card .premium-pill { font-size: 9px; }
.install-tip-dialog {
  max-width: min(92vw, 560px);
  border: 4px solid var(--neon-yellow);
  background: #111735;
  color: var(--text-light);
  box-shadow: 0 0 28px rgba(255,234,0,.26), 8px 8px 0 #000;
  padding: 24px;
}
.install-tip-dialog h2 {
  font-size: 15px;
  line-height: 1.5;
}
.install-tip-dialog p {
  font-size: 23px;
  color: var(--muted);
  line-height: 1.25;
}
.challenge-layout {
  display: grid;
  grid-template-columns: minmax(280px, .8fr) minmax(360px, 1.4fr);
  gap: 24px;
}
.challenge-row .row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}
.small-status {
  display: inline-block;
  border: 2px solid var(--border-dark);
  padding: 8px 10px;
  background: #0f1228;
  color: var(--muted);
  font-size: 17px;
}
.duel-arena {
  margin-top: 22px;
  border-color: var(--neon-orange);
  background: radial-gradient(circle at 50% 0%, rgba(255,140,0,.16), transparent 38%), #101430;
}
.duel-header {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 16px;
  align-items: center;
  text-align: center;
  margin-bottom: 18px;
}
.duel-header > div {
  display: grid;
  place-items: center;
  gap: 8px;
}
.mini-game-board {
  min-height: 280px;
  padding: 18px;
  border: 3px solid var(--border-dark);
  background: #070914;
  position: relative;
  overflow: hidden;
}
.mini-game-board p {
  color: var(--muted);
  font-size: 22px;
  margin: 0 0 12px;
}
.game-stat-line {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  font-family: 'Press Start 2P', cursive;
  font-size: 12px;
  color: var(--neon-yellow);
  margin-bottom: 14px;
}
.coin-arena {
  height: 220px;
  position: relative;
  border: 2px dashed rgba(0,229,255,.35);
  background-image: repeating-linear-gradient(0deg, rgba(0,229,255,.05) 0 3px, transparent 3px 12px), repeating-linear-gradient(90deg, rgba(157,0,255,.05) 0 3px, transparent 3px 12px);
}
.duel-coin {
  position: absolute;
  width: 36px;
  height: 36px;
  border-radius: 0;
  border: 3px solid #fff4b8;
  background: var(--neon-yellow);
  color: #111;
  box-shadow: 0 0 12px rgba(255,234,0,.5), 3px 3px 0 #000;
  font-size: 18px;
  cursor: pointer;
}
#miniAvatar {
  position: absolute;
  left: 8%;
  top: 50%;
  transform: translate(-50%, -50%);
  transition: left .16s linear, top .16s linear;
  z-index: 3;
}
.avatar-preview.mini-game-player {
  width: 70px;
  height: 70px;
  border-width: 2px;
}
.reflex-zone {
  display: grid;
  place-items: center;
  min-height: 190px;
  border: 4px solid var(--neon-purple);
  background: #161b3a;
  color: var(--neon-orange);
  font-family: 'Press Start 2P', cursive;
  font-size: 20px;
  cursor: pointer;
  box-shadow: inset 4px 4px 0 rgba(255,255,255,.08), inset -4px -4px 0 rgba(0,0,0,.45);
}
.reflex-zone.go {
  border-color: var(--neon-yellow);
  color: var(--neon-yellow);
  box-shadow: 0 0 18px rgba(255,234,0,.3), inset 4px 4px 0 rgba(255,255,255,.08), inset -4px -4px 0 rgba(0,0,0,.45);
}
.tile-hunt-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(70px, 1fr));
  gap: 10px;
  max-width: 360px;
  margin: 0 auto 16px;
}
.hunt-tile {
  min-height: 76px;
  border: 3px solid var(--border-dark);
  background: #151b3b;
  color: var(--neon-blue);
  font-size: 22px;
  box-shadow: 4px 4px 0 #000;
}
.hunt-tile.miss {
  opacity: .45;
  color: #6a7aab;
}
.hunt-tile.found {
  border-color: var(--neon-yellow);
  color: var(--neon-yellow);
  box-shadow: 0 0 14px rgba(255,234,0,.3), 4px 4px 0 #000;
}
@media (max-width: 900px) {
  .challenge-layout { grid-template-columns: 1fr; }
  .duel-header { grid-template-columns: 1fr; }
}

.vertical-form { flex-direction: column; align-items: stretch; }
.vertical-form label { display: grid; gap: 6px; color: var(--muted); font-size: 20px; }
.vertical-form select, .vertical-form input { width: 100%; }


/* v8 referrals, rarity ranks, crates, and wearable positioning refinement */
.avatar-wearable-img.wear-hat {
  transform: translateY(-13%) scale(.96) !important;
  transform-origin: 50% 4%;
}
.avatar-preview.giant .avatar-wearable-img.wear-hat {
  transform: translateY(-15%) scale(.98) !important;
}
.avatar-preview.large .avatar-wearable-img.wear-hat,
.avatar-preview.mini .avatar-wearable-img.wear-hat,
.avatar-preview.mini-game-player .avatar-wearable-img.wear-hat {
  transform: translateY(-12%) scale(.96) !important;
}
.avatar-wearable-img.wear-face { transform: translateY(-3%) !important; }
.avatar-wearable-img.wear-accessory { transform: scale(1.02) !important; }

.item-title-line {
  display: grid;
  gap: 6px;
  align-items: start;
}
.rarity-badge {
  display: inline-block !important;
  width: max-content;
  padding: 3px 7px;
  border: 2px solid #fff;
  color: #06101f !important;
  font-family: 'Press Start 2P', cursive;
  font-size: 8px !important;
  line-height: 1.4;
  text-transform: uppercase;
  box-shadow: 2px 2px 0 #000;
}
.rarity-badge.rarity-common { background: #b8c7d9; }
.rarity-badge.rarity-rare { background: #00e5ff; }
.rarity-badge.rarity-super_rare { background: #ff8c00; }
.rarity-badge.rarity-legendary { background: linear-gradient(135deg, #a100ff, #ff65ff 45%, #ffffff 50%, #6d00b8 60%, #d66bff); color: #fff !important; text-shadow: 1px 1px 0 #2a0040; }
.item-card.rarity-rare { border-color: rgba(0,229,255,.65); }
.item-card.rarity-super_rare { border-color: rgba(255,140,0,.75); box-shadow: 0 0 12px rgba(255,140,0,.14); }
.item-card.rarity-legendary {
  border-color: #c06cff;
  background: linear-gradient(180deg, rgba(157,0,255,.22), rgba(21,27,59,1));
  box-shadow: 0 0 18px rgba(180,70,255,.28), inset 3px 3px 0 rgba(255,255,255,.08);
}
.item-card.shiny-item::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(120deg, transparent 0 42%, rgba(255,255,255,.3) 48%, transparent 54% 100%);
  animation: shinySweep 2.6s linear infinite;
}
.item-card.shiny-item { position: relative; overflow: hidden; }
@keyframes shinySweep { from { transform: translateX(-120%); } to { transform: translateX(120%); } }
.crate-panel {
  padding: 16px;
  margin: 0 0 22px;
  border: 3px solid var(--neon-yellow);
  background: linear-gradient(180deg, rgba(255,234,0,.10), rgba(15,18,40,1));
  box-shadow: 0 0 18px rgba(255,234,0,.18), 5px 5px 0 #000;
}
.crate-panel h3 { color: var(--neon-yellow); }
.crate-results { margin-top: 14px; }
.crate-result-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(145px, 1fr)); gap: 10px; }
.crate-emote-chance{margin:9px 0 0!important;color:#bfefff!important;font-size:.82rem}.crate-emote-chance strong{color:#7cf4ff}.crate-emote-reward{border-color:rgba(124,244,255,.44)}.crate-emote-reward-art{display:grid;place-items:center;min-height:150px;font-size:clamp(3.5rem,8vw,5.4rem);background:radial-gradient(circle,rgba(124,244,255,.2),rgba(98,67,179,.13) 48%,transparent 70%);filter:drop-shadow(0 8px 12px rgba(0,0,0,.38))}.crate-emote-reward .item-rarity{font-size:.78rem;text-transform:uppercase;letter-spacing:.07em;color:#7cf4ff}.crate-emote-reward .pixel-btn{margin-top:8px;text-align:center}.crate-emote-prize-art{font-size:64px;text-shadow:0 8px 16px rgba(0,0,0,.42)}.crate-reel-emote span{display:grid;place-items:center;width:96px;height:96px;font-size:64px;filter:drop-shadow(4px 7px 5px rgba(0,0,0,.5))}@media(max-width:600px){.crate-reel-emote span{width:72px;height:72px;font-size:50px}}
.crate-only-lock[disabled] { opacity: .9; cursor: not-allowed; }
.crate-only-item { border-style: dashed; }


/* v9 inventory, account management and leaderboard */
.rank-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  margin-right: 6px;
  padding: 3px 6px;
  border: 2px solid rgba(255,255,255,.8);
  background: linear-gradient(135deg, rgba(255,234,0,.95), rgba(255,140,0,.85));
  color: #090914;
  box-shadow: 2px 2px 0 #000;
  font-family: 'Press Start 2P', cursive;
  font-size: 8px;
}
.leaderboard-row.current-player {
  border-color: var(--neon-yellow);
  box-shadow: 0 0 18px rgba(255,234,0,.3), inset 3px 3px 0 rgba(255,255,255,.08);
}
.leaderboard-rank, .big-rank {
  font-family: 'Press Start 2P', cursive;
  color: var(--neon-yellow);
  text-shadow: 0 0 8px rgba(255,234,0,.5);
}
.big-rank {
  display: block;
  font-size: 28px;
  margin: 15px 0;
}
.inventory-summary {
  margin-bottom: 24px;
}
.inventory-list.empty-state,
#leaderboardTop.empty-state {
  background: rgba(21,27,59,.75);
  border: 3px dashed rgba(0,229,255,.35);
  padding: 24px;
}
.inventory-group {
  margin-bottom: 34px;
}
.inventory-group h3 {
  color: var(--neon-blue);
  margin-bottom: 16px;
}
.account-form {
  display: grid;
  gap: 16px;
}
.account-form label {
  display: grid;
  gap: 8px;
  font-size: 20px;
  color: #cdd6ff;
}
.account-form input {
  width: 100%;
  box-sizing: border-box;
  background: #090d22;
  color: var(--text-light);
  border: 3px solid rgba(0,229,255,.45);
  padding: 12px;
  font-family: 'VT323', monospace;
  font-size: 22px;
}
.muted-inline {
  color: #8d99c7;
  font-size: 18px;
}
.rank-summary {
  text-align: center;
}
@media (max-width: 760px) {
  .rank-pill { min-width: 36px; font-size: 7px; }
  .big-rank { font-size: 22px; }
}


/* v11 retention and polish */
.notification-link { position: relative; }
.notification-count { display: inline-flex; min-width: 20px; height: 20px; border-radius: 999px; align-items: center; justify-content: center; margin-left: 4px; background: var(--neon-orange); color: #000; font-family: 'Press Start 2P', cursive; font-size: 9px; box-shadow: 0 0 12px rgba(255,140,0,.65); }
.onboarding-callout { border-color: var(--neon-yellow); box-shadow: 0 0 26px rgba(255,234,0,.22), inset 4px 4px 0 rgba(255,255,255,.08); }
.compact-profile-card { min-height: 190px; }
.reward-panel { border-color: var(--neon-orange); }
.reward-panel h3 { margin-top: 0; }
.tiny-list { margin-top: 14px; display: grid; gap: 8px; }
.tiny-row { display: flex; justify-content: space-between; border-top: 1px solid rgba(255,255,255,.12); padding-top: 8px; }
.mission-list { display: grid; gap: 12px; }
.mission-card { display: grid; grid-template-columns: 1fr auto; gap: 14px; align-items: center; padding: 14px; border: 2px solid rgba(0,229,255,.24); background: rgba(10,11,26,.45); box-shadow: inset 2px 2px 0 rgba(255,255,255,.08); }
.mission-card.complete { border-color: var(--neon-yellow); }
.mission-card.claimed { opacity: .72; }
.mission-card strong, .mission-card span, .mission-card small { display: block; }
.mission-card span, .mission-card small { color: #aeb9e6; font-size: 18px; margin-top: 6px; }
.mission-progress { height: 10px; background: rgba(255,255,255,.1); border: 2px solid rgba(255,255,255,.16); margin-top: 10px; }
.mission-progress > div { height: 100%; background: linear-gradient(90deg, var(--neon-blue), var(--neon-yellow)); box-shadow: 0 0 10px rgba(0,229,255,.5); }
.notification-list { display: grid; gap: 10px; }
.notification-row { display: block; padding: 13px; border: 2px solid rgba(157,0,255,.34); text-decoration: none; color: var(--text-light); background: rgba(21,27,59,.75); }
.notification-row.urgent { border-color: var(--neon-orange); box-shadow: 0 0 14px rgba(255,140,0,.2); }
.notification-row strong, .notification-row span { display: block; }
.notification-row span { color: #aeb9e6; font-size: 18px; margin-top: 5px; }
.achievement-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin: 12px 0; }
.achievement-grid.wide { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.achievement-badge { display: grid; grid-template-columns: 42px 1fr; gap: 10px; align-items: center; padding: 12px; border: 2px solid rgba(255,255,255,.14); background: rgba(10,11,26,.45); opacity: .58; }
.achievement-badge.unlocked { opacity: 1; border-color: var(--neon-yellow); box-shadow: 0 0 18px rgba(255,234,0,.18); }
.achievement-badge > span:first-child { width: 42px; height: 42px; display: inline-flex; align-items: center; justify-content: center; background: #0f1228; border: 2px solid var(--neon-purple); color: var(--neon-yellow); font-family: 'Press Start 2P', cursive; }
.achievement-badge strong, .achievement-badge small { display: block; }
.achievement-badge small { color: #aeb9e6; font-size: 16px; margin-top: 4px; }
.starter-avatar-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 12px; margin-top: 18px; }
.starter-avatar-card { cursor: pointer; background: rgba(10,11,26,.5); border: 3px solid rgba(255,255,255,.16); color: var(--text-light); padding: 10px; font-family: 'VT323', monospace; font-size: 18px; }
.starter-avatar-card.selected { border-color: var(--neon-yellow); box-shadow: 0 0 20px rgba(255,234,0,.24); }
.starter-avatar-card img { width: 82px; height: 82px; display: block; margin: 0 auto 8px; image-rendering: pixelated; }
.setup-steps { font-size: 20px; line-height: 1.5; color: #aeb9e6; }
@media (max-width: 760px) {
  .mission-card { grid-template-columns: 1fr; }
  .achievement-grid { grid-template-columns: 1fr; }
}


/* v12 dedicated games library page */
.compact-header { padding-bottom: 30px; }
.games-toolbar { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 18px; align-items: end; }
.games-toolbar label { display: flex; flex-direction: column; gap: 8px; color: var(--text-light); font-size: 18px; }
.games-toolbar input, .games-toolbar select { width: 100%; box-sizing: border-box; background: #090d24; border: 2px solid rgba(0,229,255,.45); color: var(--text-light); padding: 12px; font-family: 'VT323', monospace; font-size: 20px; }
.library-help-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; margin: 22px auto; max-width: 1400px; padding: 0 40px; }
.games-page-grid .game-library-card { justify-content: flex-start; }
.game-library-card h3 { min-height: 44px; }
.game-meta-row { width: 100%; display: flex; justify-content: space-between; gap: 10px; align-items: center; margin: 10px 0; padding: 8px 10px; background: rgba(0,0,0,.22); border: 1px solid rgba(255,255,255,.08); box-sizing: border-box; }
.game-meta-row span { color: #9fb0e4; font-size: 16px; }
.game-meta-row strong { color: var(--neon-blue); font-size: 14px; word-break: break-all; text-align: right; }
.game-access-list { width: 100%; display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 18px; }
.premium-panel { border-color: rgba(255,234,0,.65); box-shadow: inset 4px 4px 0 rgba(255,255,255,.12), inset -4px -4px 0 rgba(0,0,0,.55), 0 0 18px rgba(255,234,0,.12); }
@media (max-width: 700px) { .library-help-grid { padding: 0 18px; } .games-toolbar { grid-template-columns: 1fr; } }


/* v13 account overview and score reward polish */
.account-overview-section {
  padding-top: 18px;
  padding-bottom: 12px;
}

.account-overview-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 22px;
  align-items: center;
  border-color: rgba(255, 234, 0, 0.55);
  box-shadow: 0 0 24px rgba(255, 234, 0, 0.12), inset 4px 4px 0 rgba(255,255,255,0.08), inset -4px -4px 0 rgba(0,0,0,0.42);
}

.account-overview-copy h2 {
  margin: 0 0 8px;
  line-height: 1.25;
}

.account-overview-copy p {
  margin: 0 0 12px;
}

.account-overview-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(90px, 1fr));
  gap: 10px;
  margin: 14px 0;
}

.account-overview-stats div {
  border: 2px solid rgba(0, 229, 255, 0.25);
  background: rgba(10, 11, 26, 0.55);
  padding: 10px;
  box-shadow: inset 2px 2px 0 rgba(255,255,255,0.05), inset -2px -2px 0 rgba(0,0,0,0.35);
}

.account-overview-stats span {
  display: block;
  color: #9fb0e7;
  font-size: 17px;
}

.account-overview-stats strong {
  display: block;
  margin-top: 4px;
  color: #fff;
  font-family: 'Press Start 2P', cursive;
  font-size: 13px;
}

@media (max-width: 760px) {
  .account-overview-card {
    grid-template-columns: 1fr;
    text-align: center;
    justify-items: center;
  }
  .account-overview-stats {
    grid-template-columns: repeat(2, minmax(110px, 1fr));
    width: 100%;
  }
}


/* v14 game icons, signup page and inventory avatar preview */
.game-icon-frame {
  width: 86px;
  height: 86px;
  margin: 0 auto 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 3px solid rgba(255, 234, 0, .78);
  background: radial-gradient(circle at 35% 25%, rgba(255,255,255,.25), transparent 34%), rgba(7, 10, 28, .92);
  box-shadow: 0 0 18px rgba(255,234,0,.18), inset 3px 3px 0 rgba(255,255,255,.1), 5px 5px 0 #000;
  overflow: hidden;
}
.game-store-icon {
  width: 72px;
  height: 72px;
  object-fit: contain;
  image-rendering: auto;
}
.game-library-card .badge { align-self: center; }
.signup-page-card {
  max-width: 760px;
  margin: 0 auto;
}
.signup-page-card .auth-form {
  display: grid;
  gap: 14px;
}
.signup-page-card input {
  width: 100%;
  box-sizing: border-box;
  background: #090d22;
  color: var(--text-light);
  border: 3px solid rgba(0,229,255,.45);
  padding: 13px;
  font-family: 'VT323', monospace;
  font-size: 22px;
}
.inventory-layout {
  display: grid;
  grid-template-columns: minmax(260px, 340px) minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}
.inventory-avatar-panel {
  position: sticky;
  top: 18px;
  text-align: center;
  border-color: rgba(255, 234, 0, .62);
}
.inventory-avatar-panel h3 { margin-top: 0; color: var(--neon-yellow); }
.inventory-selected-summary {
  display: block;
  min-height: 48px;
  color: #aeb9e6;
  font-size: 19px;
  line-height: 1.25;
}
.inventory-selected-summary strong,
.inventory-selected-summary span {
  display: block;
}
.inventory-selected-summary strong { color: var(--text-light); margin-bottom: 6px; }
@media (max-width: 900px) {
  .inventory-layout { grid-template-columns: 1fr; }
  .inventory-avatar-panel { position: static; }
}

/* Sandbox Fields */
.sandbox-header {
  background-image:
    radial-gradient(circle at 20% 10%, rgba(67, 255, 155, 0.18), transparent 28%),
    radial-gradient(circle at 80% 20%, rgba(0, 229, 255, 0.16), transparent 26%),
    linear-gradient(180deg, #111936 0%, #0a0b1a 100%);
}

.sandbox-status {
  grid-template-columns: repeat(4, 1fr);
}

.sandbox-shell {
  max-width: 1680px;
}

.sandbox-toolbar {
  padding: 14px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 22px;
}

.sandbox-layout {
  display: grid;
  grid-template-columns: 330px minmax(520px, 1fr) 360px;
  gap: 20px;
  align-items: start;
}

.sandbox-left-panel,
.sandbox-right-panel {
  position: sticky;
  top: 16px;
  max-height: calc(100vh - 32px);
  overflow: auto;
}

.sandbox-filter {
  display: block;
  margin: 12px 0;
}

.sandbox-filter span,
.offer-form span {
  display: block;
  color: var(--neon-blue);
  font-size: 18px;
  margin-bottom: 5px;
}

.sandbox-filter input,
.sandbox-filter select,
.offer-form input {
  width: 100%;
  background: #0f1228;
  color: var(--text-light);
  border: 2px solid var(--border-dark);
  padding: 10px;
  font-size: 20px;
}

.sandbox-catalogue {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 12px;
}

.catalogue-card {
  min-height: 150px;
  background: #101530;
  color: var(--text-light);
  border: 2px solid var(--border-dark);
  box-shadow: 3px 3px 0 #000;
  padding: 9px;
  text-align: center;
}

.catalogue-card.active {
  border-color: var(--neon-yellow);
  box-shadow: 0 0 18px rgba(255, 234, 0, 0.35), 3px 3px 0 #000;
}

.catalogue-card strong,
.catalogue-card span {
  display: block;
}

.catalogue-card strong {
  font-size: 17px;
  line-height: 1.05;
  margin-top: 8px;
}

.catalogue-card span {
  color: var(--muted);
  font-size: 15px;
}

.sandbox-world-panel {
  min-height: 760px;
  overflow: hidden;
  position: relative;
  background:
    linear-gradient(180deg, rgba(0,229,255,0.12), transparent 38%),
    linear-gradient(180deg, #0d1735 0%, #101b2d 48%, #0b2218 100%);
}

.sandbox-skyline {
  height: 94px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 60px;
  border-bottom: 3px solid rgba(67,255,155,0.22);
  opacity: 0.8;
}

.sandbox-skyline span {
  display: block;
  width: 115px;
  height: 58px;
  background: linear-gradient(135deg, rgba(0,229,255,0.35), rgba(157,0,255,0.12));
  clip-path: polygon(0 100%, 15% 35%, 35% 70%, 50% 15%, 65% 65%, 82% 30%, 100% 100%);
  filter: drop-shadow(0 0 14px rgba(0,229,255,0.45));
}

.sandbox-viewport {
  position: relative;
  height: 660px;
  overflow: hidden;
  perspective: 1200px;
}

.sandbox-grid {
  --world-zoom: 1;
  --world-pan-x: 0px;
  --world-pan-y: 0px;
  position: absolute;
  left: 50%;
  top: 48%;
  width: 1625px;
  height: 1625px;
  transform: translate(calc(-50% + var(--world-pan-x)), calc(-50% + var(--world-pan-y))) rotateX(58deg) rotateZ(45deg) scale(var(--world-zoom));
  transform-style: preserve-3d;
  display: grid;
  grid-template-columns: repeat(25, 65px);
  grid-template-rows: repeat(25, 65px);
  gap: 3px;
}

.sandbox-tile {
  position: relative;
  background: linear-gradient(135deg, #203f20, #2e6b2e 60%, #1d351f);
  border: 1px solid rgba(255,255,255,0.12);
  transform-style: preserve-3d;
  color: #fff;
  box-shadow: inset 0 0 0 2px rgba(0,0,0,0.18), 0 9px 0 #07110b;
  overflow: visible;
}

.sandbox-tile::before {
  content: '';
  position: absolute;
  inset: 4px;
  background: repeating-linear-gradient(90deg, rgba(255,255,255,0.06) 0 2px, transparent 2px 13px);
  opacity: 0.35;
}

.sandbox-tile.owned {
  background: linear-gradient(135deg, #295b73, #23508a 55%, #172e62);
}

.sandbox-tile.mine {
  background: linear-gradient(135deg, #5c5514, #b68a19 55%, #6b3c11);
}

.sandbox-tile.selected {
  outline: 4px solid var(--neon-yellow);
  z-index: 12;
  filter: brightness(1.22);
}

.tile-coord,
.tile-owner {
  position: absolute;
  left: 4px;
  right: 4px;
  font-size: 11px;
  line-height: 1;
  text-shadow: 1px 1px 0 #000;
  pointer-events: none;
  transform: rotateZ(-45deg) rotateX(-58deg);
}

.tile-coord { top: 5px; color: rgba(255,255,255,0.75); }
.tile-owner { bottom: 5px; color: #fff; }
.tile-objects { position: absolute; inset: 0; pointer-events: none; }
.tile-mini-object { position: absolute; transform: translate(-50%, -50%) rotateZ(-45deg) rotateX(-58deg); }

.selected-land-preview {
  position: relative;
  height: 270px;
  border: 3px solid var(--border-dark);
  background:
    linear-gradient(135deg, rgba(255,255,255,0.08), transparent 22%),
    radial-gradient(circle at 50% 50%, rgba(67,255,155,0.14), transparent 45%),
    linear-gradient(135deg, #183b1c, #306e28);
  margin: 12px 0 16px;
  overflow: hidden;
  cursor: crosshair;
}

.selected-land-preview::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.07) 1px, transparent 1px);
  background-size: 30px 30px;
}

.empty-land-label {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: rgba(255,255,255,0.72);
  font-size: 22px;
}

.land-object-placement {
  position: absolute;
  transform: translate(-50%, -50%);
}

.sandbox-object3d {
  --obj-size: 90px;
  --obj-rot: 0deg;
  width: var(--obj-size);
  height: var(--obj-size);
  position: relative;
  display: inline-block;
  transform-style: preserve-3d;
  transform: rotateZ(var(--obj-rot));
}

.sandbox-object3d span,
.sandbox-object3d i,
.sandbox-object3d b {
  position: absolute;
  display: block;
}

.sandbox-object3d span {
  left: 24%;
  top: 18%;
  width: 52%;
  height: 54%;
  background: linear-gradient(135deg, #38d9ff, #1863c9);
  border: 2px solid rgba(255,255,255,0.72);
  box-shadow: inset -8px -10px 0 rgba(0,0,0,0.25), 0 10px 0 rgba(0,0,0,0.35), 0 0 14px rgba(0,229,255,0.3);
  transform: skewY(-10deg);
}

.sandbox-object3d i {
  left: 30%;
  top: 4%;
  width: 48%;
  height: 25%;
  background: linear-gradient(135deg, #fff27a, #ff8c00);
  border: 2px solid rgba(255,255,255,0.72);
  transform: skewX(-30deg);
}

.sandbox-object3d b {
  left: 32%;
  bottom: 8%;
  width: 36%;
  height: 14%;
  background: rgba(0,0,0,0.35);
  border-radius: 50%;
  filter: blur(2px);
}

.sandbox-object3d.shop span { border-radius: 4px 4px 12px 12px; }
.sandbox-object3d.shop i { height: 18%; background: repeating-linear-gradient(90deg, #ff4f7b 0 10px, #fff 10px 20px); }
.sandbox-object3d.factory span { width: 62%; left: 19%; background: linear-gradient(135deg, #8792aa, #37415d); }
.sandbox-object3d.factory i { width: 14%; height: 52%; left: 66%; top: 8%; background: #9ca8d6; }
.sandbox-object3d.tower span { width: 34%; left: 33%; height: 72%; top: 4%; background: linear-gradient(135deg, #d0d8ff, #4a64d8); }
.sandbox-object3d.tower i { left: 26%; width: 48%; top: 0; height: 20%; clip-path: polygon(50% 0, 100% 100%, 0 100%); }
.sandbox-object3d.nature span { left: 38%; top: 34%; width: 22%; height: 38%; background: #7a4b27; }
.sandbox-object3d.nature i { left: 18%; top: 8%; width: 64%; height: 46%; border-radius: 50%; background: linear-gradient(135deg, #43ff9b, #14743e); }
.sandbox-object3d.road span { left: 16%; top: 40%; width: 70%; height: 22%; background: repeating-linear-gradient(90deg, #2a2d36 0 18px, #ffea00 18px 22px); transform: rotate(0); }
.sandbox-object3d.road i { display: none; }
.sandbox-object3d.decor span { border-radius: 50% 50% 12px 12px; background: linear-gradient(135deg, #ffea00, #ff8c00); }
.sandbox-object3d.arcade span { background: linear-gradient(135deg, #9d00ff, #00e5ff); box-shadow: inset -8px -10px 0 rgba(0,0,0,0.25), 0 10px 0 rgba(0,0,0,0.35), 0 0 20px rgba(157,0,255,0.6); }
.sandbox-object3d.farm span { background: linear-gradient(135deg, #d84343, #7b1d1d); }
.sandbox-object3d.farm i { clip-path: polygon(50% 0, 100% 100%, 0 100%); background: #fff; }
.sandbox-object3d.fantasy span { border-radius: 18px 18px 8px 8px; background: linear-gradient(135deg, #ff4fdb, #6734ff); }
.sandbox-object3d.fantasy i { background: linear-gradient(135deg, #43ff9b, #00e5ff); clip-path: polygon(50% 0, 100% 70%, 50% 100%, 0 70%); }

.sandbox-object3d.purple span { background: linear-gradient(135deg, #cf7cff, #6b1ca8); }
.sandbox-object3d.orange span { background: linear-gradient(135deg, #ffc16b, #d75600); }
.sandbox-object3d.yellow span { background: linear-gradient(135deg, #fff27a, #c58c00); }
.sandbox-object3d.green span { background: linear-gradient(135deg, #43ff9b, #0f7d45); }
.sandbox-object3d.pink span { background: linear-gradient(135deg, #ff87d5, #b51c75); }
.sandbox-object3d.blue span { background: linear-gradient(135deg, #75a8ff, #2350c9); }
.sandbox-object3d.mint span { background: linear-gradient(135deg, #9cffdf, #159d83); }

.offer-form {
  display: grid;
  gap: 8px;
  margin: 12px 0;
}

.offer-list,
.sandbox-offers {
  display: grid;
  gap: 8px;
}

.offer-row {
  display: grid;
  grid-template-columns: 1fr auto auto auto;
  gap: 8px;
  align-items: center;
  background: #0f1228;
  border: 2px solid var(--border-dark);
  padding: 9px;
  font-size: 18px;
}

.offer-row span,
.offer-row small {
  color: var(--muted);
}

@media (max-width: 1250px) {
  .sandbox-layout { grid-template-columns: 1fr; }
  .sandbox-left-panel,
  .sandbox-right-panel { position: static; max-height: none; }
  .sandbox-world-panel { min-height: 620px; }
  .sandbox-viewport { height: 540px; }
}

@media (max-width: 760px) {
  .sandbox-status { grid-template-columns: 1fr 1fr; }
  .sandbox-catalogue { grid-template-columns: 1fr; }
  .sandbox-grid { transform: translate(calc(-50% + var(--world-pan-x)), calc(-50% + var(--world-pan-y))) rotateX(58deg) rotateZ(45deg) scale(calc(var(--world-zoom) * .78)); }
  .offer-row { grid-template-columns: 1fr; }
}

/* --- Enhanced Sandbox Fields 3D page --- */
.sandbox-layout {
  align-items: start;
}

.sandbox-world-panel {
  min-height: 980px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.sandbox-world-stage {
  position: relative;
  min-height: 640px;
  border-radius: 26px;
  overflow: hidden;
  border: 2px solid rgba(124, 244, 255, 0.22);
  background:
    radial-gradient(circle at 30% 22%, rgba(124, 244, 255, 0.16), transparent 28%),
    radial-gradient(circle at 75% 18%, rgba(188, 124, 255, 0.18), transparent 24%),
    linear-gradient(180deg, #122042 0%, #071224 100%);
  box-shadow: inset 0 0 40px rgba(8, 13, 28, 0.65), 0 30px 60px rgba(0, 0, 0, 0.35);
}

#sandboxCanvas {
  width: 100%;
  height: 100%;
  display: block;
  min-height: 640px;
  cursor: pointer;
  touch-action: none;
  image-rendering: auto;
}

/* Retired sandbox pages must never reappear in cached or server-injected navigation. */
nav a[href$="sandbox.html"],
nav a[href*="sandbox.html?"],
nav a[href*="sandbox.html#"],
nav a[href$="my-empire.html"],
nav a[href*="my-empire.html?"],
nav a[href*="my-empire.html#"] { display: none !important; }

.sandbox-world-overlay {
  position: absolute;
  top: 14px;
  left: 14px;
  right: 14px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  pointer-events: none;
}

.world-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: rgba(7, 16, 30, 0.78);
  border: 1px solid rgba(124, 244, 255, 0.26);
  border-radius: 999px;
  color: #f6fbff;
  font-size: 0.84rem;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(10px);
}

.world-badge.subtle {
  color: #a9c7ff;
  max-width: 360px;
  text-align: right;
}

.sandbox-world-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-end;
}

.minimap-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  align-items: center;
  color: var(--muted-text, #a9b8de);
  font-size: 0.88rem;
}

.legend-swatch {
  width: 14px;
  height: 14px;
  display: inline-block;
  border-radius: 4px;
  margin-right: 6px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  vertical-align: middle;
}
.legend-swatch.unowned { background: #5cab53; }
.legend-swatch.owned { background: #4f74ff; }
.legend-swatch.mine { background: #2dcf91; }

.sandbox-minimap {
  display: grid;
  grid-template-columns: repeat(25, minmax(0, 1fr));
  gap: 4px;
  padding: 12px;
  border-radius: 20px;
  background: rgba(7, 16, 30, 0.65);
  border: 1px solid rgba(124, 244, 255, 0.16);
  box-shadow: inset 0 0 24px rgba(10, 14, 26, 0.5);
}

.minimap-cell {
  aspect-ratio: 1;
  border-radius: 7px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.65rem;
  font-weight: 700;
  color: #ecf7ff;
  background: #5cab53;
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}
.minimap-cell.owned { background: #4f74ff; }
.minimap-cell.mine { background: #2dcf91; color: #07231a; }
.minimap-cell.player {
  color: #fff;
  font-size: .68rem;
  box-shadow: 0 0 0 2px #fff, 0 0 14px #7cf4ff;
  z-index: 2;
}
.minimap-cell.selected {
  border-color: #ffffff;
  box-shadow: 0 0 0 2px rgba(124, 244, 255, 0.55);
  transform: scale(1.08);
}
.minimap-cell:hover {
  transform: translateY(-1px);
}

.sandbox-inspector {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.inspector-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pill {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(124, 244, 255, 0.12);
  border: 1px solid rgba(124, 244, 255, 0.18);
  color: #dcf4ff;
  font-size: 0.82rem;
}

.control-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  align-items: end;
}

.control-grid label,
.offer-form {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.control-grid span,
.offer-form span {
  color: #dbe9ff;
  font-size: 0.84rem;
}

.control-grid select,
.control-grid input,
.offer-form input {
  width: 100%;
  border-radius: 12px;
  border: 1px solid rgba(124, 244, 255, 0.22);
  background: rgba(255, 255, 255, 0.06);
  color: #ffffff;
  padding: 10px 12px;
}

.control-grid small {
  color: #93b2e7;
}

.selected-land-preview {
  position: relative;
  min-height: 240px;
  border-radius: 20px;
  overflow: hidden;
  background:
    radial-gradient(circle at 60% 22%, rgba(255, 255, 255, 0.12), transparent 30%),
    linear-gradient(180deg, #7bd3ff 0%, #9be8ff 36%, #69b96f 36%, #3f8d47 100%);
  border: 1px solid rgba(124, 244, 255, 0.2);
  box-shadow: inset 0 18px 40px rgba(255, 255, 255, 0.08), inset 0 -20px 40px rgba(0, 0, 0, 0.2);
}

.selected-land-preview::before {
  content: '';
  position: absolute;
  inset: auto 0 28px 0;
  height: 2px;
  background: rgba(255, 255, 255, 0.22);
}

.land-object-placement {
  position: absolute;
  transform: translate(-50%, -50%);
}

.empty-land-label {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #eff9ff;
  text-shadow: 0 3px 10px rgba(0, 0, 0, 0.25);
}

.placement-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 250px;
  overflow: auto;
  padding-right: 4px;
}

.placement-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(124, 244, 255, 0.14);
}

.placement-row span {
  font-weight: 600;
  color: #f6fbff;
}

.placement-row small {
  color: #94b4e9;
}

.catalogue-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-start;
  text-align: left;
  min-height: 152px;
  padding: 14px;
  border-radius: 18px;
  border: 1px solid rgba(124, 244, 255, 0.14);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.04));
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.catalogue-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 32px rgba(0, 0, 0, 0.22);
  border-color: rgba(124, 244, 255, 0.32);
}
.catalogue-card.active {
  border-color: rgba(124, 244, 255, 0.7);
  box-shadow: 0 0 0 1px rgba(124, 244, 255, 0.35), 0 20px 34px rgba(28, 93, 255, 0.2);
  background: linear-gradient(180deg, rgba(76, 104, 255, 0.2), rgba(29, 35, 65, 0.35));
}
.catalogue-card strong {
  color: #f6fbff;
}
.catalogue-card span {
  color: #9eb7e8;
  font-size: 0.84rem;
}

.slot-actions.wrap-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pixel-btn.is-active {
  box-shadow: 0 0 0 2px rgba(124, 244, 255, 0.38), inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.offer-list,
.sandbox-offers {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.offer-row {
  display: grid;
  grid-template-columns: 1fr auto auto auto;
  gap: 8px;
  align-items: center;
  padding: 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(124, 244, 255, 0.14);
}
.offer-row strong {
  color: #f7fbff;
}
.offer-row span,
.offer-row small {
  color: #9fb5df;
}

@media (max-width: 1080px) {
  .sandbox-world-panel {
    min-height: 820px;
  }
  .sandbox-world-stage,
  #sandboxCanvas {
    min-height: 520px;
  }
  .sandbox-minimap {
    grid-template-columns: repeat(25, minmax(10px, 1fr));
  }
  .control-grid {
    grid-template-columns: 1fr;
  }
  .world-badge.subtle {
    max-width: 220px;
    font-size: 0.76rem;
  }
}

@media (max-width: 720px) {
  .sandbox-world-panel {
    min-height: 760px;
  }
  .sandbox-world-stage,
  #sandboxCanvas {
    min-height: 420px;
  }
  .sandbox-world-overlay {
    flex-direction: column;
    align-items: flex-start;
  }
  .sandbox-world-meta {
    flex-direction: column;
    align-items: flex-start;
  }
  .sandbox-minimap {
    gap: 3px;
    padding: 8px;
  }
  .minimap-cell {
    font-size: 0.55rem;
  }
  .placement-row,
  .offer-row {
    grid-template-columns: 1fr;
  }
}

.sandbox-directory {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.directory-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(124, 244, 255, 0.14);
}
.directory-row strong {
  color: #f6fbff;
}
.directory-row span {
  color: #9fb5df;
  display: block;
  font-size: 0.84rem;
  margin-top: 4px;
}

.sandbox-showcase-dialog {
  max-width: 840px;
}
.showcase-shell {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 20px;
  align-items: center;
}
.showcase-copy h2 {
  margin-bottom: 8px;
}
.sandbox-showcase-avatar {
  display: grid;
  place-items: center;
}
.sandbox-showcase-avatar .avatar-preview {
  margin: 0 auto;
}

@media (max-width: 720px) {
  .directory-row {
    grid-template-columns: 1fr;
  }
  .showcase-shell {
    grid-template-columns: 1fr;
  }
}

.commercial-panel,
.permissions-panel {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px;
  border-radius: 18px;
  background: rgba(255, 214, 77, 0.06);
  border: 1px solid rgba(255, 214, 77, 0.18);
}

.commercial-list,
.builder-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.builder-check {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  color: #eaf6ff;
}

.builder-check input {
  accent-color: #7cf4ff;
}

.secondary-link[disabled],
.pixel-btn[disabled] {
  opacity: 0.48;
  cursor: not-allowed;
}

/* --- Sandbox usability expansion patch --- */
.sandbox-shell {
  width: min(98vw, 2300px);
  max-width: none;
  padding-left: clamp(12px, 1.5vw, 28px);
  padding-right: clamp(12px, 1.5vw, 28px);
}

.sandbox-toolbar.panel {
  display: grid;
  grid-template-columns: auto auto auto minmax(280px, 1fr);
  align-items: center;
  gap: 10px;
  border-radius: 20px;
}

.sandbox-layout {
  grid-template-columns: minmax(210px, 260px) minmax(920px, 1fr) minmax(260px, 320px);
  gap: 14px;
}

.sandbox-left-panel,
.sandbox-right-panel {
  max-height: calc(100vh - 18px);
  padding: 14px;
}

.sandbox-world-panel {
  min-height: 980px;
  padding: 14px;
}

.sandbox-world-stage,
#sandboxCanvas {
  min-height: min(86vh, 900px);
}

.sandbox-catalogue {
  grid-template-columns: 1fr;
  max-height: 58vh;
  overflow: auto;
  padding-right: 4px;
}

.catalogue-card {
  display: grid !important;
  grid-template-columns: 98px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  min-height: 112px;
  padding: 12px 14px;
  text-align: left;
}

.catalogue-art {
  width: 92px;
  height: 92px;
  display: grid !important;
  place-items: center;
  border-radius: 16px;
  background:
    radial-gradient(circle at 45% 35%, rgba(255,255,255,0.18), transparent 38%),
    linear-gradient(145deg, rgba(124,244,255,0.16), rgba(157,0,255,0.1));
  border: 1px solid rgba(124, 244, 255, 0.22);
  box-shadow: inset 0 -10px 18px rgba(0,0,0,0.18);
  flex: 0 0 92px;
  overflow: hidden;
}

.catalogue-thumb {
  width: 88px;
  height: 88px;
  display: block;
  filter: drop-shadow(0 8px 10px rgba(0,0,0,0.24));
}

.catalogue-art .sandbox-object3d {
  --obj-size: 58px !important;
  display: block !important;
  transform: scale(.92) rotateZ(var(--obj-rot));
}

.catalogue-art .sandbox-object3d span,
.catalogue-art .sandbox-object3d i,
.catalogue-art .sandbox-object3d b {
  position: absolute !important;
  display: block !important;
}

.catalogue-copy {
  display: flex !important;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.catalogue-copy strong {
  font-size: 0.95rem;
  line-height: 1.2;
  color: #f6fbff;
}

.catalogue-copy small {
  color: #9eb7e8;
  font-size: 0.78rem;
  line-height: 1.25;
}

.catalogue-card > span:not(.catalogue-art):not(.catalogue-copy) {
  color: inherit;
}

.sandbox-inspector,
.commercial-panel,
.permissions-panel {
  border-radius: 20px;
}

.sandbox-inspector > h3,
.sandbox-right-panel > h3,
.sandbox-left-panel > h3 {
  margin-bottom: 8px;
}

.control-grid,
.slot-actions.wrap-actions,
.inspector-pills {
  padding: 10px;
  border-radius: 16px;
  background: rgba(255,255,255,0.035);
  border: 1px solid rgba(124,244,255,0.10);
}

.sandbox-minimap {
  grid-template-columns: repeat(22, minmax(7px, 1fr));
  gap: 2px;
  max-height: 340px;
  overflow: auto;
}

.minimap-cell {
  min-width: 6px;
  border-radius: 3px;
  font-size: 0;
  padding: 0;
}

.minimap-cell.owned,
.minimap-cell.mine,
.minimap-cell.selected {
  font-size: 0.48rem;
}

@media (max-width: 1500px) {
  .sandbox-layout {
    grid-template-columns: 230px minmax(720px, 1fr) 300px;
  }
  .sandbox-world-stage,
  #sandboxCanvas {
    min-height: 740px;
  }
}

@media (max-width: 1150px) {
  .sandbox-layout {
    grid-template-columns: 1fr;
  }
  .sandbox-left-panel,
  .sandbox-right-panel {
    position: static;
    max-height: none;
  }
  .sandbox-catalogue {
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    max-height: none;
  }
  .sandbox-toolbar.panel {
    grid-template-columns: 1fr 1fr;
  }
}

/* Tycoon upgrade layer */
.sandbox-event-panel,
.sandbox-leaderboards {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 12px;
}
.event-card,
.leader-row {
  padding: 12px;
  border-radius: 16px;
  border: 1px solid rgba(124, 244, 255, 0.18);
  background: linear-gradient(135deg, rgba(124, 244, 255, 0.10), rgba(141, 101, 255, 0.08));
}
.event-card strong,
.leader-row strong {
  display: block;
  color: #f6fbff;
  margin-bottom: 4px;
}
.event-card span,
.leader-row span,
.event-card small {
  display: block;
  color: #9eb7e8;
  font-size: 0.84rem;
  line-height: 1.25;
}
.sandbox-leaderboards h4 {
  margin: 8px 0 0;
}
.leader-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: center;
}
.leader-row span {
  grid-column: 1 / -1;
}
.catalogue-thumb {
  image-rendering: auto;
}


/* Games page sandbox hero */
.sandbox-promo-feature {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(280px, 0.9fr);
  gap: 18px;
  align-items: stretch;
  margin-bottom: 10px;
}
.sandbox-promo-link {
  display: block;
  border-radius: 28px;
  overflow: hidden;
  border: 1px solid rgba(124, 244, 255, 0.24);
  box-shadow: 0 26px 60px rgba(0,0,0,0.28);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.sandbox-promo-link:hover {
  transform: translateY(-3px);
  box-shadow: 0 32px 70px rgba(0,0,0,0.34), 0 0 0 1px rgba(124,244,255,0.18);
}
.sandbox-promo-banner {
  display: block;
  width: 100%;
  height: auto;
}
.sandbox-promo-copy {
  display: grid;
  align-content: center;
  gap: 10px;
  padding: 24px;
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(17,25,52,0.94), rgba(10,16,34,0.96));
}
.sandbox-promo-copy h2 { margin: 0; }
.sandbox-promo-copy p { margin: 0; }
@media (max-width: 1100px) {
  .sandbox-promo-feature { grid-template-columns: 1fr; }
}


/* Sandbox catalogue comfort pass */
.sandbox-left-panel { min-width: 0; }
.sandbox-catalogue {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}
.sandbox-catalogue-section {
  display: grid;
  gap: 10px;
}
.sandbox-catalogue-heading {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 10px 12px;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(20,31,58,0.96), rgba(14,22,40,0.96));
  border: 1px solid rgba(124, 244, 255, 0.14);
  color: #f6fbff;
  font-size: 0.95rem;
}
.sandbox-catalogue-heading small { color: #8fb5e8; }
.catalogue-card {
  grid-template-columns: 110px minmax(0, 1fr);
  min-height: 124px;
  padding: 14px 16px;
  gap: 16px;
}
.catalogue-art { width: 102px; height: 102px; flex-basis: 102px; }
.catalogue-thumb { width: 96px; height: 96px; }
.catalogue-copy { gap: 5px; }
.catalogue-copy strong { font-size: 1rem; }
.catalogue-copy small { font-size: 0.83rem; }


.sandbox-quality-control {
  display: inline-grid;
  grid-template-columns: auto minmax(130px, 1fr);
  align-items: center;
  gap: 8px;
  color: #b8d9ff;
  font-size: 0.85rem;
}
.sandbox-quality-control select {
  border-radius: 999px;
  border: 1px solid rgba(124,244,255,0.26);
  background: rgba(7,14,30,0.92);
  color: #f6fbff;
  padding: 8px 12px;
}


/* Sandbox stability/performance pass */
.sandbox-debug-panel{width:100%;display:grid;grid-template-columns:repeat(6,minmax(90px,1fr));gap:8px;margin-top:10px;padding:10px;border-radius:14px;background:rgba(4,10,22,.62);border:1px solid rgba(124,244,255,.18);font-size:.78rem}
.sandbox-debug-panel[hidden]{display:none}
.sandbox-debug-panel span{display:grid;gap:2px;color:#9fb8d8}.sandbox-debug-panel strong{color:#f7fbff;font-size:.95rem}.sandbox-debug-bad strong{color:#ffb0a4}.sandbox-debug-ok strong{color:#baffc9}
.catalogue-tabs{display:flex;gap:8px;flex-wrap:wrap;margin:10px 0 12px}.catalogue-tabs .active{border-color:rgba(124,244,255,.75);background:rgba(124,244,255,.13)}
.catalogue-card{position:relative}.catalogue-fav{position:absolute;right:8px;top:8px;border:1px solid rgba(255,255,255,.2);border-radius:999px;background:rgba(8,14,26,.75);color:#ffd86b;width:28px;height:28px;line-height:24px;cursor:pointer;z-index:2}.catalogue-fav.active{background:rgba(255,216,107,.2);border-color:rgba(255,216,107,.7)}
.sandbox-qa-panel{display:flex;gap:12px;align-items:center;flex-wrap:wrap;margin-bottom:14px}.sandbox-qa-panel strong{color:#fff}.sandbox-qa-panel span{color:#adc4df}.qa-results{display:flex;flex-wrap:wrap;gap:8px;width:100%}.qa-pill{padding:6px 9px;border-radius:999px;border:1px solid rgba(124,244,255,.18);font-size:.78rem}.qa-pill.ok{color:#baffc9;background:rgba(57,180,105,.12)}.qa-pill.warn{color:#ffdba4;background:rgba(255,186,73,.12)}.qa-pill.bad{color:#ffb0a4;background:rgba(255,91,91,.12)}
.unsaved-badge{display:inline-flex;align-items:center;padding:4px 8px;border-radius:999px;background:rgba(255,186,73,.16);color:#ffdba4;border:1px solid rgba(255,186,73,.3);font-size:.78rem}.saving-badge{display:inline-flex;align-items:center;padding:4px 8px;border-radius:999px;background:rgba(124,244,255,.12);color:#b8f8ff;border:1px solid rgba(124,244,255,.3);font-size:.78rem}
.economy-hint{padding:10px 12px;border-radius:14px;background:rgba(255,216,77,.08);border:1px solid rgba(255,216,77,.18);color:#f8e7a8;font-size:.85rem}.progression-card{padding:10px 12px;border-radius:14px;background:rgba(124,244,255,.08);border:1px solid rgba(124,244,255,.18);color:#dffcff}


/* Sandbox UX full pass */
.sandbox-tutorial-panel,
.sandbox-quest-panel,
.sandbox-economy-panel,
.sandbox-qa-panel {
  display: grid;
  gap: 12px;
  margin-bottom: 14px;
}
.section-heading.compact { margin: 0; }
.section-heading.compact h3 { margin: 4px 0 0; }
.tutorial-steps,
.quest-list,
.economy-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
}
.tutorial-step,
.quest-row,
.economy-grid span {
  padding: 12px;
  border-radius: 14px;
  border: 1px solid rgba(124,244,255,.16);
  background: rgba(9, 18, 36, .58);
  display: grid;
  gap: 6px;
}
.tutorial-step.done,
.quest-row.done {
  border-color: rgba(81, 219, 139, .5);
  background: rgba(42, 120, 76, .22);
}
.tile-status-badge {
  display: inline-flex;
  align-items: center;
  margin: 0 0 10px;
  padding: 7px 10px;
  border-radius: 999px;
  font-size: .82rem;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.08);
}
.tile-status-badge.ready,
.minimap-cell.ready { box-shadow: 0 0 0 2px rgba(255,214,77,.8), 0 0 18px rgba(255,214,77,.35); }
.tile-status-badge.earning,
.minimap-cell.standard { border-color: rgba(81,219,139,.65); }
.tile-status-badge.commercial,
.minimap-cell.commercial { border-color: rgba(255,170,80,.75); }
.tile-status-badge.available { border-color: rgba(124,244,255,.45); }
.template-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  padding: 10px;
  border-radius: 14px;
  background: rgba(255,255,255,.045);
  border: 1px solid rgba(124,244,255,.12);
  margin: 10px 0;
}
.sandbox-income-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  background: linear-gradient(135deg, rgba(255,214,77,.18), rgba(124,244,255,.12));
}
.sandbox-income-card h2 { margin: 4px 0; }
.sandbox-income-card p { margin: 0; }
code { background: rgba(255,255,255,.08); padding: 2px 5px; border-radius: 6px; }
@media (max-width: 900px) {
  .sandbox-layout { grid-template-columns: 1fr; }
  .sandbox-left-panel,
  .sandbox-right-panel { max-height: none; overflow: visible; }
  .sandbox-toolbar { align-items: stretch; }
  .sandbox-toolbar > * { width: 100%; }
  .sandbox-world-stage { min-height: 58vh; }
  .control-grid,
  .tutorial-steps,
  .quest-list,
  .economy-grid { grid-template-columns: 1fr; }
  .sandbox-income-card { flex-direction: column; align-items: flex-start; }
}

/* Sandbox economy editor */
.economy-editor {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
  align-items: end;
  padding: 12px;
  border-radius: 16px;
  background: rgba(255,255,255,.045);
  border: 1px solid rgba(124,244,255,.12);
}
.economy-editor label {
  display: grid;
  gap: 5px;
}
.economy-editor input {
  width: 100%;
}
@media (max-width: 900px) {
  .economy-editor { grid-template-columns: 1fr; }
}

/* Retention / onboarding release */
.retention-hub-section .dashboard-grid { align-items: stretch; }
.next-action-panel {
  display: grid;
  gap: 10px;
  background: linear-gradient(180deg, rgba(33, 48, 92, 0.95), rgba(16, 25, 50, 0.96));
  border: 1px solid rgba(124, 244, 255, 0.22);
}
.checklist-panel { display: grid; gap: 10px; }
.checklist-progress {
  height: 12px;
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
  overflow: hidden;
  border: 1px solid rgba(124,244,255,0.16);
}
.checklist-progress > div {
  height: 100%;
  background: linear-gradient(90deg, #43e38f, #7cf4ff);
  box-shadow: 0 0 18px rgba(124,244,255,0.24);
}
.starter-checklist {
  display: grid;
  gap: 8px;
}
.checklist-item {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border-radius: 14px;
  text-decoration: none;
  color: inherit;
  background: rgba(255,255,255,0.045);
  border: 1px solid rgba(255,255,255,0.08);
}
.checklist-item.done {
  background: rgba(67,227,143,0.11);
  border-color: rgba(67,227,143,0.28);
}
.checklist-item span {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(124,244,255,0.12);
  color: #7cf4ff;
}
.checklist-item.done span {
  background: rgba(67,227,143,0.2);
  color: #afffdf;
}
.checklist-item strong,
.activity-feed-row strong { display: block; }
.checklist-item small,
.activity-feed-row small { color: #9fb9dc; }
.activity-feed-list {
  display: grid;
  gap: 8px;
  max-height: 320px;
  overflow: auto;
}
.activity-feed-row {
  display: grid;
  gap: 3px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(255,255,255,0.045);
  border: 1px solid rgba(255,255,255,0.08);
}
.update-feed {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}
.update-card { display: grid; gap: 8px; }
.starter-pack-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0;
}
.starter-pack-strip span,
.starter-pack-strip strong {
  display: inline-flex;
  align-items: center;
  padding: 8px 10px;
  border-radius: 999px;
  background: rgba(124,244,255,0.1);
  border: 1px solid rgba(124,244,255,0.18);
}
@media (max-width: 760px) {
  .retention-hub-section .dashboard-grid,
  .dashboard-grid.one-two {
    grid-template-columns: 1fr;
  }
  .starter-pack-strip { align-items: stretch; }
  .starter-pack-strip span,
  .starter-pack-strip strong { width: 100%; justify-content: center; }
}


/* Sandbox debug removed */
#sandboxDebugToggle,#sandboxPerfDebug,#sandboxQaPanel{display:none!important}


/* Mobile sandbox fix: keep the map fully visible and stop the full catalogue taking over the page */
@media (max-width: 760px) {
  html, body { overflow-x: hidden; }
  .sandbox-shell {
    width: 100% !important;
    padding-left: 8px !important;
    padding-right: 8px !important;
  }
  .sandbox-toolbar.panel {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 8px !important;
  }
  .sandbox-layout {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 12px !important;
    width: 100% !important;
  }
  .sandbox-world-panel {
    order: 1;
    width: 100% !important;
    min-width: 0 !important;
    min-height: auto !important;
    padding: 8px !important;
    overflow: visible !important;
  }
  .sandbox-world-stage {
    width: 100% !important;
    height: 68vh !important;
    min-height: 430px !important;
    max-height: 620px !important;
    overflow: hidden !important;
    border-radius: 18px !important;
  }
  #sandboxCanvas {
    width: 100% !important;
    height: 100% !important;
    min-width: 0 !important;
    min-height: 0 !important;
    display: block !important;
    touch-action: none;
  }
  .sandbox-world-overlay {
    top: 8px !important;
    left: 8px !important;
    right: 8px !important;
    gap: 6px !important;
  }
  .world-badge {
    max-width: calc(100vw - 48px) !important;
    font-size: 0.74rem !important;
    padding: 7px 9px !important;
  }
  .sandbox-left-panel {
    order: 2;
    width: 100% !important;
    min-width: 0 !important;
    max-height: 48vh !important;
    overflow: auto !important;
    position: static !important;
  }
  .sandbox-right-panel {
    order: 3;
    width: 100% !important;
    min-width: 0 !important;
    max-height: none !important;
    overflow: visible !important;
    position: static !important;
  }
  .sandbox-catalogue {
    grid-template-columns: 1fr !important;
    max-height: 30vh !important;
    overflow-y: auto !important;
    padding-right: 2px !important;
  }
  .catalogue-tabs {
    display: flex !important;
    overflow-x: auto !important;
    gap: 6px !important;
    padding-bottom: 4px !important;
  }
  .catalogue-tabs button { flex: 0 0 auto; }
  .catalogue-card {
    grid-template-columns: 72px minmax(0, 1fr) !important;
    min-height: 86px !important;
    padding: 8px !important;
    gap: 10px !important;
  }
  .catalogue-art {
    width: 66px !important;
    height: 66px !important;
    flex-basis: 66px !important;
  }
  .catalogue-thumb {
    width: 64px !important;
    height: 64px !important;
  }
  .catalogue-copy strong { font-size: 0.86rem !important; }
  .catalogue-copy small { font-size: 0.72rem !important; }
  .sandbox-minimap {
    grid-template-columns: repeat(22, minmax(8px, 1fr)) !important;
    max-height: 180px !important;
    overflow: auto !important;
  }
}


/* Full sandbox game-loop pass */
.rarity-chip{display:inline-flex;align-items:center;padding:2px 6px;border-radius:999px;font-size:.68rem;border:1px solid rgba(255,255,255,.18);background:rgba(255,255,255,.08);font-style:normal}.rarity-chip.common{color:#dbeafe}.rarity-chip.uncommon{color:#86efac}.rarity-chip.rare{color:#7dd3fc}.rarity-chip.epic{color:#c084fc}.rarity-chip.legendary{color:#facc15}.catalogue-card.locked{opacity:.48;filter:grayscale(.35)}.catalogue-card.rarity-rare,.catalogue-card.rarity-epic,.catalogue-card.rarity-legendary{box-shadow:inset 0 0 0 1px rgba(124,244,255,.12)}.catalogue-card.rarity-legendary{box-shadow:inset 0 0 0 1px rgba(250,204,21,.42),0 0 24px rgba(250,204,21,.08)}
.reaction-row{display:flex;flex-wrap:wrap;gap:8px;margin:10px 0;padding:10px;border:1px solid rgba(124,244,255,.12);border-radius:14px;background:rgba(255,255,255,.035)}
.featured-plot-sections{display:grid;gap:20px}.featured-plot-section h2{margin-top:0}.featured-plot-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:14px}.featured-plot-card{display:grid;gap:8px;padding:14px;border-radius:18px;border:1px solid rgba(124,244,255,.16);background:linear-gradient(180deg,rgba(18,29,54,.88),rgba(9,16,30,.92))}.featured-plot-card strong{color:#f6fbff}.featured-plot-card span,.featured-plot-card small{color:#9eb7e8}.commercial-entry{border-left:3px solid rgba(250,204,21,.45);padding-left:10px}
@media (max-width: 760px){body[data-page="sandbox"] .page-shell{padding:8px}body[data-page="sandbox"] .sandbox-toolbar.panel{position:sticky;top:0;z-index:30;display:grid;grid-template-columns:1fr 1fr;gap:8px}body[data-page="sandbox"] .sandbox-layout{display:flex;flex-direction:column}body[data-page="sandbox"] .sandbox-world-panel{order:1}body[data-page="sandbox"] .sandbox-left-panel{order:2;max-height:46vh;overflow:auto}body[data-page="sandbox"] .sandbox-right-panel{order:3}body[data-page="sandbox"] .sandbox-world-stage,body[data-page="sandbox"] #sandboxCanvas{min-height:62vh;height:62vh;width:100%}body[data-page="sandbox"] .sandbox-catalogue{max-height:34vh;overflow:auto;grid-template-columns:1fr}body[data-page="sandbox"] .catalogue-card{grid-template-columns:72px 1fr;min-height:88px;padding:10px}body[data-page="sandbox"] .catalogue-art{width:66px;height:66px}body[data-page="sandbox"] .catalogue-thumb{width:62px;height:62px}.reaction-row{overflow-x:auto;flex-wrap:nowrap}.featured-plot-grid{grid-template-columns:1fr}}


/* Sandbox major UX game pass */
.sandbox-homebase-panel,
.sandbox-myland-panel {
  display: grid;
  gap: 14px;
  margin-bottom: 16px;
  background: linear-gradient(135deg, rgba(20,32,68,.94), rgba(8,16,35,.94));
  border: 1px solid rgba(124,244,255,.16);
}
.homebase-grid,
.myland-grid,
.quest-card-grid,
.economy-summary-grid,
.achievement-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 12px;
}
.homebase-card,
.myland-card,
.quest-card,
.economy-summary-card,
.achievement-card {
  padding: 12px;
  border-radius: 16px;
  background: rgba(255,255,255,.055);
  border: 1px solid rgba(255,255,255,.095);
  display: grid;
  gap: 6px;
}
.homebase-card strong,
.myland-card strong,
.quest-card strong,
.economy-summary-card strong { color: #fff; }
.homebase-card span,
.myland-card span,
.quest-card span,
.economy-summary-card span { color: #a9bfdc; font-size: .88rem; }
.quest-card .progress-bar,
.myland-card .progress-bar {
  height: 8px;
  border-radius: 999px;
  background: rgba(255,255,255,.08);
  overflow: hidden;
}
.quest-card .progress-bar i,
.myland-card .progress-bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg,#7cf4ff,#43ff9b);
}
.selected-tile-hero {
  border-radius: 18px;
  padding: 14px;
  background: linear-gradient(135deg, rgba(124,244,255,.12), rgba(255,255,255,.035));
  border: 1px solid rgba(124,244,255,.2);
  display: grid;
  gap: 10px;
}
.selected-tile-hero h3 { margin: 0; color: #fff; }
.selected-tile-hero .plot-name-row { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: end; }
.selected-tile-hero input,
.selected-tile-hero select { width: 100%; }
.tile-stat-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
.tile-stat { border-radius: 12px; background: rgba(0,0,0,.18); padding: 9px; display: grid; gap: 2px; }
.tile-stat span { color:#9fb8d8; font-size:.76rem; }
.tile-stat strong { color:#fff; }
.rarity-border-common{box-shadow: inset 0 0 0 1px rgba(226,232,240,.18)}
.rarity-border-uncommon{box-shadow: inset 0 0 0 1px rgba(134,239,172,.38)}
.rarity-border-rare{box-shadow: inset 0 0 0 1px rgba(125,211,252,.45)}
.rarity-border-epic{box-shadow: inset 0 0 0 1px rgba(192,132,252,.5), 0 0 20px rgba(192,132,252,.08)}
.rarity-border-legendary{box-shadow: inset 0 0 0 1px rgba(250,204,21,.65), 0 0 28px rgba(250,204,21,.14)}
.upgrade-comparison { display:grid; grid-template-columns:1fr auto 1fr; gap:8px; align-items:center; color:#cfe9ff; font-size:.86rem; }
.upgrade-comparison strong { color:#fff; }
.recommended-card { padding: 12px; border-radius: 16px; background: rgba(67,255,155,.08); border: 1px solid rgba(67,255,155,.18); }
.item-preview-body { display: grid; grid-template-columns: 180px minmax(0,1fr); gap: 18px; align-items: center; }
.item-preview-large { width: 180px; height: 150px; border-radius: 20px; background: rgba(15,28,52,.85); display: grid; place-items: center; border: 1px solid rgba(124,244,255,.18); }
.item-preview-large canvas { width: 160px; height: 120px; }
.item-preview-copy { display: grid; gap: 10px; }
.item-preview-copy h2 { margin: 0; }
.sandbox-levelup { position: fixed; left: 50%; top: 18%; transform: translateX(-50%); z-index: 1000; padding: 18px 24px; border-radius: 20px; background: linear-gradient(135deg,#111d3a,#1f7a62); color: #fff; border: 1px solid rgba(124,244,255,.45); box-shadow: 0 20px 70px rgba(0,0,0,.45); animation: sandboxPop .9s ease both; }
.sandbox-levelup.hidden { display: none; }
@keyframes sandboxPop { 0% { transform: translateX(-50%) scale(.85); opacity:0; } 15%,80% { transform: translateX(-50%) scale(1); opacity:1; } 100% { transform: translateX(-50%) scale(.95); opacity:0; } }
body.sandbox-build-mode .sandbox-world-stage { outline: 2px solid rgba(124,244,255,.45); outline-offset: 4px; }
body.sandbox-build-mode #sandboxBuildModeBtn { border-color: rgba(124,244,255,.85); background: rgba(124,244,255,.16); }

/* Massive 2D sandbox world */
body[data-page="sandbox"] .sandbox-minimap {
  grid-template-columns: repeat(21, minmax(7px, 1fr));
  max-height: none;
  overflow: hidden;
}

/* Admin access should be visible without scrolling on a normal laptop. */
body[data-page="admin"] .site-header { padding-bottom: 16px; }
body[data-page="admin"] .site-header .topbar { margin-bottom: 10px; }
body[data-page="admin"] .site-header .logo { max-width: 110px; }
body[data-page="admin"] .site-header h1 { margin-bottom: 8px; font-size: clamp(1.2rem, 2.4vw, 1.8rem); }
body[data-page="admin"] .site-header .hero-copy { margin-bottom: 4px; font-size: clamp(1.05rem, 1.8vw, 1.3rem); }
body[data-page="admin"] #adminAccess { padding-top: 20px; }
body[data-page="admin"] .admin-login-panel { max-width: 520px; margin-inline: auto; }
body[data-page="admin"] .admin-login-panel form { margin-top: 14px; }
body[data-page="admin"] .admin-fixed-username { display: block; padding: 11px 12px; border: 1px solid rgba(124,244,255,.26); border-radius: 10px; color: #fff0a6; background: rgba(4,10,25,.6); font-size: 1.1rem; }
@media (max-width: 560px) {
  body[data-page="admin"] .site-header { padding-bottom: 20px; }
  body[data-page="admin"] .site-header .topbar { margin-bottom: 12px; }
  body[data-page="admin"] .site-header .logo { max-width: 145px; }
  body[data-page="admin"] #adminAccess { padding-top: 22px; }
}
@media (max-height: 760px) {
  body[data-page="admin"] .site-header .logo { display: none; }
  body[data-page="admin"] .site-header .topbar { margin-bottom: 8px; }
  body[data-page="admin"] #adminAccess { padding-top: 12px; }
}

/* Unified 3D avatar rig. Every equipped art layer lives inside the same rig,
   so a dance never leaves hats, outfits, shoes, or accessories behind. */
.avatar-depth-scene{position:absolute;inset:0;z-index:2;display:block;perspective:900px;transform-style:preserve-3d;transform:rotateX(var(--avatar-tilt-x,0deg)) rotateY(var(--avatar-tilt-y,0deg));transition:transform .16s ease;}
.avatar-rig{position:absolute;inset:0;transform-style:preserve-3d;transform-origin:50% 86%;will-change:transform;}
.avatar-depth-scene::before{content:'';position:absolute;inset:4%;background:url('assets/avatar-3d-stage.png') center/cover no-repeat;opacity:.54;mix-blend-mode:screen;transform:translateZ(-12px);pointer-events:none;}
.avatar-rig .avatar-base-img,.avatar-rig .avatar-wearable-img{animation:none!important;transform-origin:50% 86%;will-change:transform;}
.avatar-rig .avatar-base-img{transform:translateZ(24px) rotateY(-4deg) rotateX(1deg)!important;filter:drop-shadow(10px 16px 9px rgba(0,0,0,.5)) drop-shadow(-2px -2px 2px rgba(255,255,255,.2));}
.avatar-rig .avatar-wearable-img{transform:translateZ(44px)!important;}
.avatar-rig .avatar-wearable-img.wear-hat{transform:translateY(-13%) scale(.96) translateZ(58px)!important;}
.avatar-rig .avatar-wearable-img.wear-face{transform:translateY(-3%) translateZ(62px)!important;}
.avatar-rig .avatar-wearable-img.wear-accessory{transform:scale(1.02) translateZ(72px)!important;}
.avatar-preview.giant .avatar-rig .avatar-wearable-img.wear-hat{transform:translateY(-15%) scale(.98) translateZ(68px)!important;}
.avatar-preview:hover .avatar-depth-scene{transform:rotateX(var(--avatar-tilt-x,0deg)) rotateY(var(--avatar-tilt-y,0deg)) scale(1.02);}
.emote-wave .avatar-rig,.emote-high_five .avatar-rig{animation:emoteWaveBody 1.05s ease-in-out infinite;}
.emote-dance .avatar-rig,.emote-floss .avatar-rig,.emote-silly_wiggle .avatar-rig{animation:emoteDanceBody .82s ease-in-out infinite;}
.emote-cheer .avatar-rig,.emote-victory_jump .avatar-rig,.emote-star_jump .avatar-rig{animation:emoteJumpBody .78s ease-in-out infinite;}
.emote-laugh .avatar-rig{animation:emoteLaughBody .58s ease-in-out infinite;}
.emote-spin .avatar-rig{animation:emoteSpinBody 1.05s linear infinite;}
.emote-breakdance .avatar-rig,.emote-ninja .avatar-rig{animation:emoteFlipBody 1.1s cubic-bezier(.4,0,.2,1) infinite;}
.emote-robot .avatar-rig{animation:emoteRobotBody .62s steps(2,end) infinite;}
.emote-moonwalk .avatar-rig{animation:emoteMoonwalkBody 1.2s ease-in-out infinite;}
.emote-dab .avatar-rig{animation:emoteDabBody 1.25s ease-in-out infinite;}
.emote-air_guitar .avatar-rig,.emote-drum_solo .avatar-rig{animation:emoteMusicBody .55s ease-in-out infinite;}
.emote-magic_trick .avatar-rig,.emote-sparkle_pose .avatar-rig{animation:emoteSparkleBody 1.2s ease-in-out infinite;filter:drop-shadow(0 0 10px rgba(255,214,77,.32));}
.emote-facepalm .avatar-rig{animation:emoteFacepalmBody 1.4s ease-in-out infinite;}
.emote-shrug .avatar-rig{animation:emoteShrugBody 1.1s ease-in-out infinite;}
.emote-heart_hands .avatar-rig{animation:emoteHeartBody 1.05s ease-in-out infinite;filter:drop-shadow(0 0 8px rgba(255,110,190,.25));}
.emote-salute .avatar-rig,.emote-superhero .avatar-rig{animation:emoteHeroBody 1.2s ease-in-out infinite;}
.emote-sleepy .avatar-rig{animation:emoteSleepyBody 1.8s ease-in-out infinite;}
.emote-panic .avatar-rig{animation:emotePanicBody .28s linear infinite;}
.emote-coin_toss .avatar-rig{animation:emoteCoinBody 1s ease-in-out infinite;}
.emote-ghost_float .avatar-rig{animation:emoteGhostBody 1.7s ease-in-out infinite;opacity:.92;filter:drop-shadow(0 0 10px rgba(124,244,255,.32));}
.avatar-motion-control{display:grid;gap:7px;width:100%;font-size:.9rem;text-align:left;color:#d9f6ff;}
.avatar-motion-control select{width:100%;}
@media (prefers-reduced-motion:reduce){.avatar-rig{animation:none!important}.avatar-depth-scene{transition:none}}

/* Admin operations console */
.popup-legal{margin:14px 0 4px;text-align:center;font-size:.72rem;line-height:1.5;color:#9fb5ca}.popup-legal a{color:#9fefff}
.admin-toolbar{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:16px}.admin-toolbar h2{margin:0}.admin-metric-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:12px;margin-bottom:16px}.admin-metric{padding:16px;border:1px solid rgba(124,244,255,.2);border-radius:16px;background:linear-gradient(145deg,rgba(17,35,68,.92),rgba(8,14,30,.94));display:grid;gap:8px}.admin-metric span{font-size:.8rem;color:#b9d9e8}.admin-metric strong{font-size:1.45rem;color:#fff}.admin-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(330px,.8fr);gap:16px}.admin-wide{grid-column:1/-1}.admin-table-wrap{overflow:auto}.admin-table-wrap table{width:100%;border-collapse:collapse;min-width:680px}.admin-table-wrap th,.admin-table-wrap td{padding:10px;border-bottom:1px solid rgba(124,244,255,.14);text-align:left}.admin-table-wrap th{font-size:.78rem;color:#b9d9e8}.admin-search{display:flex;gap:8px;margin-bottom:12px}.admin-search input{min-width:0;flex:1}.admin-user-list{display:grid;gap:7px;max-height:480px;overflow:auto}.admin-user-row{display:flex;justify-content:space-between;gap:12px;width:100%;padding:12px;border:1px solid rgba(124,244,255,.14);border-radius:12px;background:rgba(255,255,255,.035);color:inherit;text-align:left;cursor:pointer}.admin-user-row:hover{border-color:rgba(255,214,77,.55);background:rgba(255,214,77,.08)}.admin-user-row span{display:grid;gap:3px}.admin-user-row>span:last-child{text-align:right;font-size:.76rem;color:#b9d9e8}.admin-user-form{display:grid;gap:12px}.admin-user-form label{display:grid;gap:6px;color:#d9f6ff}.admin-user-form textarea{resize:vertical}.admin-form-row{display:grid;grid-template-columns:1fr 1fr;gap:10px}.admin-check{display:flex!important;grid-template-columns:auto 1fr;align-items:center;gap:9px!important}.admin-check input{width:auto}.admin-user-form .form-message{min-height:1.2em;margin:0}@media (max-width:900px){.admin-grid{grid-template-columns:1fr}.admin-toolbar{align-items:flex-start;flex-direction:column}.admin-wide{grid-column:auto}}@media (max-width:520px){.admin-form-row{grid-template-columns:1fr}.admin-search{flex-direction:column}}
.admin-login-panel{width:min(460px,100%);margin:0 auto;padding:26px;background:linear-gradient(145deg,rgba(20,36,70,.98),rgba(8,13,31,.98));border-color:rgba(124,244,255,.34);box-shadow:0 24px 70px rgba(0,0,0,.3)}.admin-login-panel h2{margin:5px 0 8px}.admin-login-panel form{margin-top:20px}.admin-login-panel input{width:100%}.admin-account-action{text-transform:capitalize}.admin-actor{display:grid;gap:2px}.admin-actor small{color:#9eb4cc}
.admin-insight-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.admin-insight{display:grid;gap:7px;padding:17px;border:1px solid rgba(124,244,255,.2);border-radius:16px;background:linear-gradient(145deg,rgba(20,42,76,.82),rgba(10,18,39,.9))}.admin-insight span{color:#9ebbd1;font-size:.78rem;text-transform:uppercase;letter-spacing:.05em}.admin-insight strong{font-size:1.05rem;color:#fff}.admin-insight small{color:#b9cbdf}.admin-trend-chart{display:flex;align-items:flex-end;gap:5px;min-height:230px;padding:24px 10px 4px;overflow-x:auto;border-bottom:1px solid rgba(124,244,255,.22)}.admin-trend-day{display:grid;grid-template-rows:20px 150px 36px;align-items:end;justify-items:center;gap:5px;min-width:30px;flex:1}.admin-trend-day i{display:block;width:min(22px,82%);height:var(--trend-height);min-height:5px;border-radius:7px 7px 2px 2px;background:linear-gradient(180deg,#7cf4ff,#735cff);box-shadow:0 0 16px rgba(124,244,255,.22)}.admin-trend-day small{font-size:.62rem;color:#9eb4cc;transform:rotate(-45deg);white-space:nowrap;transform-origin:center}.admin-trend-value{font-size:.67rem;color:#dcefff}.admin-forecast-list{display:grid;gap:11px}.admin-forecast-row{display:grid;grid-template-columns:minmax(170px,.85fr) minmax(320px,1.4fr);gap:8px 18px;padding:15px;border:1px solid rgba(124,244,255,.15);border-radius:15px;background:rgba(255,255,255,.03)}.admin-forecast-copy{display:grid;gap:3px}.admin-forecast-copy a{color:#fff;text-decoration:none}.admin-forecast-copy a:hover{color:#7cf4ff}.admin-forecast-copy small{color:#9eb4cc}.admin-forecast-numbers{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;align-items:center}.admin-forecast-numbers span{display:grid;gap:2px;color:#aebfd4;font-size:.72rem}.admin-forecast-numbers b{color:#f5f8ff;font-size:.9rem}.admin-forecast-numbers .positive b{color:#79f3b0}.admin-forecast-numbers .negative b{color:#ff8ea5}.admin-forecast-track{position:relative;grid-column:1/-1;height:7px;border-radius:999px;background:rgba(255,255,255,.08);overflow:hidden}.admin-forecast-track i{position:absolute;left:0;top:0;height:100%;width:var(--forecast-width);border-radius:inherit}.forecast-future{background:rgba(115,92,255,.48)}.forecast-current{z-index:1;background:#7cf4ff}.admin-table-wrap td{white-space:nowrap}.admin-table-wrap td:first-child{white-space:normal;min-width:145px}@media(max-width:800px){.admin-insight-grid{grid-template-columns:1fr}.admin-forecast-row{grid-template-columns:1fr}.admin-forecast-numbers{grid-template-columns:1fr 1fr}.admin-trend-day{min-width:34px}}

.admin-game-breakdown{display:grid;gap:14px;margin-top:16px}.admin-game-card{display:grid;gap:14px;padding:18px;border:1px solid rgba(124,244,255,.2);border-radius:18px;background:linear-gradient(145deg,rgba(17,35,68,.9),rgba(8,14,30,.94))}.admin-game-card>header{display:flex;align-items:flex-start;justify-content:space-between;gap:16px}.admin-game-card h3{margin:4px 0 0;color:#fff}.admin-game-stat-grid{display:grid;grid-template-columns:repeat(4,minmax(125px,1fr));gap:9px}.admin-game-stat-grid>span{display:grid;gap:5px;min-height:76px;padding:12px;border:1px solid rgba(124,244,255,.13);border-radius:13px;background:rgba(255,255,255,.035)}.admin-game-stat-grid small{color:#a9c4d8;font-size:.74rem;line-height:1.25}.admin-game-stat-grid strong{color:#fff;font-size:1.25rem}.admin-game-card-meta{display:flex;flex-wrap:wrap;gap:7px 16px;color:#9fb9cd;font-size:.76rem}.admin-advanced-metrics{margin-top:16px}.admin-advanced-metrics summary{cursor:pointer;color:#c9f9ff;font-weight:700}.admin-advanced-metrics .admin-table-wrap{margin-top:12px}@media(max-width:800px){.admin-game-card>header{display:grid}.admin-game-stat-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:460px){.admin-game-stat-grid{grid-template-columns:1fr}}
.admin-snapshot-form{display:grid;grid-template-columns:minmax(180px,1fr) 140px 155px auto;gap:10px;align-items:end;margin:0 0 16px;padding:13px;border-radius:14px;background:rgba(124,244,255,.045);border:1px solid rgba(124,244,255,.13)}.admin-snapshot-form label{display:grid;gap:5px;color:#bed8e8;font-size:.76rem}.admin-snapshot-form input,.admin-snapshot-form select{width:100%}.admin-snapshot-form .form-message{grid-column:1/-1;margin:0;min-height:0}@media(max-width:850px){.admin-snapshot-form{grid-template-columns:1fr 1fr}.admin-snapshot-form button{align-self:stretch}}@media(max-width:520px){.admin-snapshot-form{grid-template-columns:1fr}}
.admin-activity-controls{display:flex;flex-wrap:wrap;gap:12px;margin:0 0 12px;padding:13px;border:1px solid rgba(124,244,255,.16);border-radius:14px;background:rgba(124,244,255,.045)}.admin-activity-controls label{display:grid;gap:5px;min-width:min(260px,100%);color:#bed8e8;font-size:.78rem}.admin-activity-controls select{width:100%}

/* Chrome Web Store game-detail pages */
.game-detail-header .detail-logo-link{display:inline-flex;width:fit-content;margin:0 auto}.game-detail-header .hero-copy{margin-top:8px}.game-detail-app{display:grid;gap:24px;padding-top:22px}.detail-breadcrumb{display:flex;flex-wrap:wrap;gap:9px;align-items:center;color:#aebbd2;font-size:.92rem}.detail-breadcrumb a{color:#7cf4ff;text-decoration:none}.detail-breadcrumb a:hover{text-decoration:underline}.game-detail-hero{display:grid;grid-template-columns:164px minmax(0,1fr) minmax(220px,.65fr);gap:24px;align-items:center;padding:26px;overflow:hidden;position:relative;background:linear-gradient(135deg,rgba(18,31,62,.97),rgba(15,17,43,.97))}.game-detail-hero:before{content:"";position:absolute;width:380px;height:380px;right:-160px;top:-220px;border-radius:50%;background:radial-gradient(circle,rgba(124,244,255,.17),transparent 67%);pointer-events:none}.game-detail-hero>*{position:relative}.game-detail-icon-frame{width:164px;height:164px;display:grid;place-items:center;padding:14px;border-radius:27px;background:linear-gradient(145deg,#273d77,#0c112d);border:1px solid rgba(124,244,255,.35);box-shadow:0 16px 38px rgba(0,0,0,.32),inset 0 1px rgba(255,255,255,.16)}.game-detail-icon-frame img{display:block;max-width:100%;max-height:100%;object-fit:contain;filter:drop-shadow(0 8px 11px rgba(0,0,0,.28))}.game-detail-intro h1{margin:4px 0 11px;font-size:clamp(1.48rem,4vw,2.45rem);line-height:1.16}.game-detail-description{max-width:680px;color:#d6dff0;font-size:1.04rem;line-height:1.55}.game-detail-tags{display:flex;flex-wrap:wrap;gap:7px;margin:16px 0}.detail-actions{display:flex;align-items:center;flex-wrap:wrap;gap:12px;margin-top:18px}.game-detail-stats{display:grid;gap:1px;border:1px solid rgba(124,244,255,.2);border-radius:16px;overflow:hidden;background:rgba(2,7,23,.36)}.game-detail-stats>div{display:grid;gap:3px;padding:14px 15px;border-bottom:1px solid rgba(124,244,255,.13)}.game-detail-stats>div:last-child{border-bottom:0}.game-detail-stats span{font-size:.74rem;text-transform:uppercase;letter-spacing:.09em;color:#94a9c9}.game-detail-stats strong{color:#f6fbff;font-size:1.04rem}.game-detail-stats small{color:#b9c5d9;line-height:1.35}.game-detail-gallery-section{display:grid;gap:14px}.game-detail-gallery{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}.game-detail-gallery figure{margin:0;min-height:180px;overflow:hidden;border-radius:19px;border:1px solid rgba(124,244,255,.24);background:#091024;box-shadow:0 14px 30px rgba(0,0,0,.2)}.game-detail-gallery img{display:block;width:100%;height:100%;min-height:180px;aspect-ratio:16/10;object-fit:cover;transition:transform .3s ease}.game-detail-gallery figure:hover img{transform:scale(1.035)}.game-detail-info-grid{display:grid;grid-template-columns:1.2fr .8fr;gap:16px}.game-detail-info-grid .panel{padding:22px}.game-detail-info-grid h2{margin:4px 0 11px}.detail-about-card p:not(.eyebrow),.detail-reward-card p:not(.eyebrow){line-height:1.55;color:#d4deef}.detail-reward-card{background:linear-gradient(135deg,rgba(41,27,76,.94),rgba(12,29,63,.94));border-color:rgba(255,214,77,.34)}.detail-reward-card .pixel-btn{margin-top:8px}.game-detail-source-note{margin:0;color:#9eafc8;font-size:.84rem;line-height:1.45}.game-detail-related{display:grid;gap:13px;padding-top:5px}.game-related-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:13px}.related-game-card{display:grid;grid-template-columns:50px 1fr;column-gap:11px;align-items:center;text-decoration:none;color:#f4f7ff;padding:12px!important;transition:transform .18s ease,border-color .18s ease}.related-game-card:hover{transform:translateY(-3px);border-color:rgba(124,244,255,.6)}.related-game-card img{grid-row:span 2;width:50px;height:50px;object-fit:contain;border-radius:12px;background:#101a39}.related-game-card span{font-weight:700;line-height:1.2}.related-game-card small{color:#afbed3;margin-top:4px}.game-library-card .slot-actions .secondary-link{white-space:nowrap}
.detail-feature-list{display:grid;gap:8px;margin:15px 0;padding-left:20px;color:#d7e5f3}.detail-feature-list li::marker{color:#7cf4ff}

/* Avatar Builder: focused wardrobe browsing */
.avatar-wardrobe-panel{min-width:0;padding:22px!important}.wardrobe-heading{display:flex;align-items:end;justify-content:space-between;gap:12px;margin-bottom:16px}.wardrobe-heading h3{margin:3px 0 0;font-size:1.35rem}.wardrobe-heading>strong{color:#7cf4ff;font-size:.86rem}.avatar-filter-bar{display:grid;grid-template-columns:minmax(180px,1.4fr) repeat(4,minmax(120px,.8fr));gap:10px;margin-bottom:18px;padding:13px;border-radius:16px;background:rgba(5,12,31,.55);border:1px solid rgba(124,244,255,.14)}.avatar-filter-bar label{display:grid;gap:6px;min-width:0}.avatar-filter-bar label>span{color:#9fb6d1;font-size:.73rem;text-transform:uppercase;letter-spacing:.08em}.avatar-filter-bar input,.avatar-filter-bar select{width:100%;min-width:0}.avatar-filtered-grid{grid-template-columns:repeat(auto-fill,minmax(150px,1fr));max-height:780px;overflow:auto;padding:3px 7px 10px 3px;scrollbar-color:#405b86 #091329}.avatar-motion-status{min-height:2.7em;margin:8px 0 12px;color:#9fb6d1;font-size:.82rem;line-height:1.35}.avatar-extra-panel{margin-top:18px!important;padding:0!important;overflow:hidden}.avatar-extra-panel summary{display:flex;align-items:center;justify-content:space-between;gap:15px;padding:19px 22px;cursor:pointer;list-style:none}.avatar-extra-panel summary::-webkit-details-marker{display:none}.avatar-extra-panel summary>span:first-child{display:grid;gap:4px}.avatar-extra-panel summary small{color:#9fb6d1;font-weight:400}.avatar-extra-panel summary>span:last-child{color:#7cf4ff;font-size:1.7rem;transition:transform .2s ease}.avatar-extra-panel[open] summary>span:last-child{transform:rotate(45deg)}.avatar-extra-panel .avatar-emote-shop{margin:0;padding:0 22px 22px;border:0;background:transparent}.avatar-stage .secondary-link{width:100%;text-align:center}.avatar-stage>.pixel-btn{width:100%}
@media(max-width:1100px){.avatar-filter-bar{grid-template-columns:repeat(2,minmax(0,1fr))}.avatar-search-field{grid-column:1/-1}}@media(max-width:620px){.avatar-filter-bar{grid-template-columns:1fr}.avatar-search-field{grid-column:auto}.avatar-filtered-grid{grid-template-columns:repeat(2,minmax(0,1fr));max-height:none}}

/* Reliable whole-rig emote engine. The rig owns motion so all layered art stays attached. */
.emote-wave,.emote-high_five{--avatar-emote-animation:emoteWaveBody 1.05s ease-in-out infinite}.emote-dance,.emote-floss,.emote-silly_wiggle{--avatar-emote-animation:emoteDanceBody .82s ease-in-out infinite}.emote-cheer,.emote-victory_jump,.emote-star_jump{--avatar-emote-animation:emoteJumpBody .78s ease-in-out infinite}.emote-laugh{--avatar-emote-animation:emoteLaughBody .58s ease-in-out infinite}.emote-spin{--avatar-emote-animation:emoteSpinBody 1.05s linear infinite}.emote-breakdance,.emote-ninja{--avatar-emote-animation:emoteFlipBody 1.1s cubic-bezier(.4,0,.2,1) infinite}.emote-robot{--avatar-emote-animation:emoteRobotBody .62s steps(2,end) infinite}.emote-moonwalk{--avatar-emote-animation:emoteMoonwalkBody 1.2s ease-in-out infinite}.emote-dab{--avatar-emote-animation:emoteDabBody 1.25s ease-in-out infinite}.emote-air_guitar,.emote-drum_solo{--avatar-emote-animation:emoteMusicBody .55s ease-in-out infinite}.emote-magic_trick,.emote-sparkle_pose{--avatar-emote-animation:emoteSparkleBody 1.2s ease-in-out infinite}.emote-facepalm{--avatar-emote-animation:emoteFacepalmBody 1.4s ease-in-out infinite}.emote-shrug{--avatar-emote-animation:emoteShrugBody 1.1s ease-in-out infinite}.emote-heart_hands{--avatar-emote-animation:emoteHeartBody 1.05s ease-in-out infinite}.emote-salute,.emote-superhero{--avatar-emote-animation:emoteHeroBody 1.2s ease-in-out infinite}.emote-sleepy{--avatar-emote-animation:emoteSleepyBody 1.8s ease-in-out infinite}.emote-panic{--avatar-emote-animation:emotePanicBody .28s linear infinite}.emote-coin_toss{--avatar-emote-animation:emoteCoinBody 1s ease-in-out infinite}.emote-ghost_float{--avatar-emote-animation:emoteGhostBody 1.7s ease-in-out infinite}.avatar-preview[data-emote-active="true"] .avatar-rig{animation:var(--avatar-emote-animation)!important;transform-origin:50% 86%;will-change:transform}.avatar-preview[data-emote-active="true"]{filter:drop-shadow(0 0 12px rgba(124,244,255,.16))}
@media(prefers-reduced-motion:reduce){.avatar-preview:not([data-motion-preview]) .avatar-rig{animation:none!important}.avatar-preview[data-motion-preview] .avatar-rig{animation:var(--avatar-emote-animation)!important}}

/* Avatar expansion v9: motion belongs exclusively to the parent rig. This
   preserves every layer's calibrated 3D offset while the complete look moves. */
.avatar-preview[data-emote-active="true"] .avatar-rig>.avatar-base-img,
.avatar-preview[data-emote-active="true"] .avatar-rig>.avatar-wearable-img{animation:none!important}
.emote-head_bob{--avatar-emote-animation:emoteHeadBob .72s ease-in-out infinite}
.emote-twist{--avatar-emote-animation:emoteTwist .95s ease-in-out infinite}
.emote-side_step{--avatar-emote-animation:emoteSideStep 1.25s ease-in-out infinite}
.emote-power_pose{--avatar-emote-animation:emotePowerPose 1.35s ease-in-out infinite}
.emote-karate_combo{--avatar-emote-animation:emoteKarate 1.1s cubic-bezier(.3,.1,.2,1) infinite}
.emote-cartwheel{--avatar-emote-animation:emoteCartwheel 1.45s ease-in-out infinite}
.emote-pogo_bounce{--avatar-emote-animation:emotePogo .64s cubic-bezier(.2,.8,.3,1) infinite}
.emote-disco_point{--avatar-emote-animation:emoteDisco 1.2s ease-in-out infinite}
.emote-running_man{--avatar-emote-animation:emoteRunningMan .82s linear infinite}
.emote-toe_tap{--avatar-emote-animation:emoteToeTap .7s ease-in-out infinite}
.emote-royal_bow{--avatar-emote-animation:emoteRoyalBow 1.7s ease-in-out infinite}
.emote-zen_float{--avatar-emote-animation:emoteZenFloat 2.2s ease-in-out infinite}
.emote-lightning_charge{--avatar-emote-animation:emoteLightning .42s steps(3,end) infinite}
.emote-pixel_shuffle{--avatar-emote-animation:emotePixelShuffle 1.1s steps(4,end) infinite}
.emote-victory_lap{--avatar-emote-animation:emoteVictoryLap 1.8s ease-in-out infinite}
.emote-sneaky_step{--avatar-emote-animation:emoteSneaky 1.35s ease-in-out infinite}
.emote-titan_stomp{--avatar-emote-animation:emoteTitanStomp .9s cubic-bezier(.25,.7,.35,1) infinite}
.emote-salsa_spin{--avatar-emote-animation:emoteSalsa 1.3s ease-in-out infinite}
.emote-rave_pulse{--avatar-emote-animation:emoteRave .55s ease-in-out infinite}
.emote-freeze_frame{--avatar-emote-animation:emoteFreeze 1.8s steps(1,end) infinite}
@keyframes emoteHeadBob{0%,100%{transform:translateY(0) rotate(0)}35%{transform:translateY(3%) rotate(-3deg)}70%{transform:translateY(-2%) rotate(3deg)}}
@keyframes emoteTwist{0%,100%{transform:rotateY(-12deg) rotateZ(-2deg)}50%{transform:rotateY(15deg) rotateZ(3deg)}}
@keyframes emoteSideStep{0%,100%{transform:translateX(-9%) rotate(-2deg)}50%{transform:translateX(9%) rotate(2deg)}}
@keyframes emotePowerPose{0%,100%{transform:translateY(0) scale(1)}45%{transform:translateY(-3%) scale(1.08)}60%{transform:translateY(-3%) scale(1.08)}}
@keyframes emoteKarate{0%,100%{transform:translateX(-4%) rotate(-4deg)}30%{transform:translateX(8%) rotate(8deg) scaleX(.94)}55%{transform:translateX(-7%) rotate(-10deg)}75%{transform:translateY(-5%) rotate(5deg)}}
@keyframes emoteCartwheel{0%{transform:translateX(-12%) rotate(0)}50%{transform:translateY(-12%) rotate(180deg)}100%{transform:translateX(12%) rotate(360deg)}}
@keyframes emotePogo{0%,100%{transform:translateY(1%) scaleY(.97)}50%{transform:translateY(-15%) scaleY(1.03)}}
@keyframes emoteDisco{0%,100%{transform:translateX(-5%) rotate(-8deg) skewX(-3deg)}50%{transform:translateX(5%) rotate(9deg) skewX(3deg)}}
@keyframes emoteRunningMan{0%,100%{transform:translateX(-6%) translateY(0) rotate(-3deg)}25%{transform:translateX(0) translateY(-5%) rotate(4deg)}50%{transform:translateX(6%) translateY(0) rotate(3deg)}75%{transform:translateX(0) translateY(-5%) rotate(-4deg)}}
@keyframes emoteToeTap{0%,100%{transform:rotate(-1deg) translateY(0)}50%{transform:rotate(4deg) translateY(-2%) scaleY(.98)}}
@keyframes emoteRoyalBow{0%,25%,100%{transform:perspective(500px) rotateX(0)}50%,75%{transform:perspective(500px) rotateX(24deg) translateY(4%)}}
@keyframes emoteZenFloat{0%,100%{transform:translateY(1%) scale(.98)}50%{transform:translateY(-11%) scale(1.02)}}
@keyframes emoteLightning{0%,100%{transform:translate(-2%,0) scale(1)}33%{transform:translate(3%,-3%) scale(1.04)}66%{transform:translate(-1%,2%) scale(.99)}}
@keyframes emotePixelShuffle{0%{transform:translateX(-8%)}25%{transform:translateX(5%) translateY(-4%)}50%{transform:translateX(9%)}75%{transform:translateX(-3%) translateY(-5%)}100%{transform:translateX(-8%)}}
@keyframes emoteVictoryLap{0%,100%{transform:translateX(-12%) rotateY(0)}45%{transform:translateX(12%) rotateY(0)}50%{transform:translateX(12%) rotateY(180deg)}95%{transform:translateX(-12%) rotateY(180deg)}}
@keyframes emoteSneaky{0%,100%{transform:translateX(-7%) rotate(-4deg) scaleY(.96)}50%{transform:translateX(7%) rotate(4deg) scaleY(1)}}
@keyframes emoteTitanStomp{0%,100%{transform:translateY(0) scaleY(1)}55%{transform:translateY(-7%) scaleY(1.04)}70%{transform:translateY(3%) scaleY(.94)}}
@keyframes emoteSalsa{0%,100%{transform:translateX(-5%) rotate(-7deg)}40%{transform:translateX(4%) rotate(10deg)}70%{transform:translateY(-5%) rotate(2deg) scale(1.03)}}
@keyframes emoteRave{0%,100%{transform:translateY(0) rotate(-3deg) scale(1)}50%{transform:translateY(-6%) rotate(3deg) scale(1.06)}}
@keyframes emoteFreeze{0%{transform:translateX(-8%) rotate(-8deg)}30%{transform:translateX(8%) rotate(8deg)}60%,100%{transform:translateY(-5%) rotate(-12deg) scale(1.04)}}
.emote-filter-bar{position:sticky;top:0;z-index:3;display:grid;grid-template-columns:minmax(180px,1fr) minmax(150px,.55fr) auto;gap:10px;align-items:end;margin:14px 0;padding:12px;border:1px solid rgba(124,244,255,.16);border-radius:15px;background:rgba(7,14,30,.96);backdrop-filter:blur(12px)}
.emote-filter-bar label{display:grid;gap:5px}.emote-filter-bar label>span{color:#9fb6d1;font-size:.72rem;text-transform:uppercase;letter-spacing:.07em}.emote-filter-bar input,.emote-filter-bar select{width:100%}.emote-filter-bar>strong{padding:10px;color:#7cf4ff;white-space:nowrap}.avatar-emote-grid{grid-template-columns:repeat(auto-fill,minmax(190px,1fr));max-height:650px;overflow:auto;padding:3px 7px 10px 3px}.emote-card-actions{display:flex;flex-wrap:wrap;gap:7px;margin-top:auto}.emote-card-actions>*{flex:1}.emote-card.hidden{display:none}@media(max-width:680px){.emote-filter-bar{grid-template-columns:1fr}.avatar-emote-grid{grid-template-columns:1fr;max-height:none}}
.avatar-rig .avatar-wearable-img{backface-visibility:hidden;filter:drop-shadow(7px 11px 6px rgba(0,0,0,.5)) drop-shadow(-1px -2px 1px rgba(255,255,255,.22)) saturate(1.08) contrast(1.04)!important}
.item-preview{position:relative;isolation:isolate;overflow:hidden}.item-preview::after{content:'';position:absolute;z-index:2;inset:3% 48% 42% 4%;border-radius:50%;background:linear-gradient(135deg,rgba(255,255,255,.22),transparent 72%);filter:blur(3px);pointer-events:none;mix-blend-mode:screen}.item-preview img{position:relative;z-index:1}

/* Unique crate families and roulette reveal */
.crate-tier-art img{width:170px;max-height:170px;object-fit:contain;mix-blend-mode:normal}.crate-theme-mythic{--crate-glow:rgba(255,72,38,.46);--crate-shadow:rgba(255,57,34,.66);border-color:rgba(255,112,73,.48)}.crate-theme-celestial{--crate-glow:rgba(102,166,255,.48);--crate-shadow:rgba(101,165,255,.64);border-color:rgba(255,225,139,.55)}.crate-theme-mythic .crate-tier-art img{animation:crateDragonFloat 3.2s ease-in-out infinite}.crate-theme-celestial .crate-tier-art img{animation:crateCelestialFloat 4.5s ease-in-out infinite}.crate-tier-card:nth-child(even) .crate-tier-art{transform:rotate(1.5deg)}@keyframes crateDragonFloat{0%,100%{transform:translateY(0) rotate(-1deg);filter:drop-shadow(0 12px 16px rgba(255,45,20,.42))}50%{transform:translateY(-9px) rotate(1deg);filter:drop-shadow(0 18px 25px rgba(255,92,35,.68))}}@keyframes crateCelestialFloat{0%,100%{transform:translateY(0) scale(.98)}50%{transform:translateY(-10px) scale(1.03)}}
.crate-cinematic-shell{width:min(920px,100%)}.crate-cinematic-machine{width:min(260px,48vw);margin:0 auto -14px}.crate-cinematic-art{object-fit:contain;mix-blend-mode:normal}.crate-roulette{position:relative;display:none;width:100%;margin:20px auto 15px;padding:8px 0;overflow:hidden;border:1px solid rgba(124,244,255,.3);border-radius:18px;background:linear-gradient(180deg,#081126,#121c3c 48%,#071024);box-shadow:inset 0 0 35px rgba(0,0,0,.7),0 18px 35px rgba(0,0,0,.28)}.crate-cinematic.is-spinning .crate-roulette,.crate-cinematic.is-revealed .crate-roulette{display:block}.crate-roulette::before,.crate-roulette::after{content:'';position:absolute;z-index:4;top:0;bottom:0;width:17%;pointer-events:none}.crate-roulette::before{left:0;background:linear-gradient(90deg,#071024,transparent)}.crate-roulette::after{right:0;background:linear-gradient(-90deg,#071024,transparent)}.crate-roulette-marker{position:absolute;z-index:5;left:50%;top:0;bottom:0;width:3px;transform:translateX(-50%);background:#ffd64d;box-shadow:0 0 13px #ffd64d}.crate-roulette-marker::before{content:'';position:absolute;left:50%;top:-1px;transform:translateX(-50%);border:8px solid transparent;border-top-color:#ffd64d}.crate-roulette-track{display:flex;gap:12px;width:max-content;padding:8px 0;transform:translateX(0);will-change:transform}.crate-reel-item{width:132px;height:152px;flex:0 0 132px;display:grid;grid-template-rows:105px auto;place-items:center;padding:8px;border:2px solid rgba(150,179,222,.25);border-radius:14px;background:linear-gradient(145deg,rgba(32,49,91,.97),rgba(9,16,37,.98));box-shadow:inset 0 -18px 28px rgba(0,0,0,.22)}.crate-reel-item img{width:96px;height:96px;object-fit:contain;filter:drop-shadow(4px 7px 5px rgba(0,0,0,.5))}.crate-reel-item strong{max-width:116px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:.78rem}.crate-reel-item.rarity-rare{border-color:rgba(124,244,255,.55)}.crate-reel-item.rarity-super_rare{border-color:rgba(203,132,255,.68)}.crate-reel-item.rarity-legendary{border-color:rgba(255,214,77,.86);box-shadow:inset 0 0 24px rgba(255,214,77,.13),0 0 15px rgba(255,214,77,.12)}.crate-cinematic.is-spinning .crate-cinematic-machine{display:none}.crate-cinematic.is-revealed .crate-roulette{border-color:rgba(255,214,77,.72);box-shadow:inset 0 0 35px rgba(0,0,0,.7),0 0 30px rgba(255,214,77,.18)}.crate-cinematic.is-revealed .crate-cinematic-prizes{grid-template-columns:minmax(220px,340px);justify-content:center}.crate-cinematic-prize{min-height:160px}.crate-cinematic.is-revealed .crate-reel-item.is-winner{animation:crateWinnerPulse .8s ease-in-out infinite alternate}@keyframes crateWinnerPulse{to{box-shadow:inset 0 0 30px rgba(255,214,77,.2),0 0 24px rgba(255,214,77,.46);transform:scale(1.025)}}
@media(max-width:600px){.crate-reel-item{width:106px;flex-basis:106px;height:132px;grid-template-rows:86px auto}.crate-reel-item img{width:78px;height:78px}.crate-cinematic-machine{width:min(210px,55vw)}}

/* One-item signup gift and guided avatar equip flow */
.starter-item-guide{display:grid;grid-template-columns:92px minmax(0,1fr);gap:16px;align-items:center;margin:18px 0;padding:14px;border:1px solid rgba(255,214,77,.55);border-radius:18px;background:linear-gradient(135deg,rgba(255,214,77,.13),rgba(124,244,255,.08));box-shadow:0 14px 30px rgba(0,0,0,.2),0 0 24px rgba(255,214,77,.1)}
.starter-item-guide.hidden{display:none}.starter-item-guide h3,.starter-item-guide p{margin:4px 0}.starter-item-art{width:92px;height:92px;display:grid;place-items:center;border-radius:16px;background:radial-gradient(circle at 35% 24%,rgba(255,255,255,.24),transparent 30%),#111b39;border:1px solid rgba(124,244,255,.3)}.starter-item-art img{display:block;width:84px;height:84px;object-fit:contain;filter:drop-shadow(6px 9px 6px rgba(0,0,0,.45))}
.avatar-starter-guide{display:grid;grid-template-columns:1fr auto 1fr auto 1fr auto 1fr;gap:14px;align-items:center;margin-bottom:22px!important;padding:18px!important;border-color:rgba(255,214,77,.62)!important;background:linear-gradient(135deg,rgba(255,214,77,.14),rgba(17,29,65,.95))!important;box-shadow:0 0 30px rgba(255,214,77,.12)!important}.avatar-starter-guide.hidden{display:none}.guide-step{display:grid;grid-template-columns:34px 1fr;gap:10px;align-items:start}.guide-step>span{display:grid;place-items:center;width:34px;height:34px;border-radius:50%;background:#ffd64d;color:#11162d;font-weight:900}.guide-step strong{display:block;color:#fff}.guide-step p{margin:4px 0 0;color:#cbd8eb;line-height:1.35}.guide-arrow{color:#7cf4ff;font-size:1.6rem}.item-card.starter-item-focus{border-color:#ffd64d;box-shadow:0 0 0 3px rgba(255,214,77,.12),0 0 28px rgba(255,214,77,.24)}.item-card.starter-item-focus::before{content:'FREE STARTER ITEM';display:block;margin:-2px 0 7px;color:#ffd64d;font-size:.72rem;font-weight:900;letter-spacing:.08em}
@media(max-width:820px){.avatar-starter-guide{grid-template-columns:1fr}.guide-arrow{transform:rotate(90deg);justify-self:center}.starter-item-guide{grid-template-columns:72px minmax(0,1fr)}.starter-item-art{width:72px;height:72px}.starter-item-art img{width:66px;height:66px}}
@media (max-width:940px){.game-detail-hero{grid-template-columns:132px minmax(0,1fr)}.game-detail-icon-frame{width:132px;height:132px}.game-detail-stats{grid-column:1/-1;grid-template-columns:repeat(3,minmax(0,1fr))}.game-detail-stats>div{border-bottom:0;border-right:1px solid rgba(124,244,255,.13)}.game-detail-stats>div:last-child{border-right:0}}
@media (max-width:680px){.game-detail-app{gap:18px;padding-top:14px}.game-detail-hero{grid-template-columns:1fr;padding:18px;gap:16px}.game-detail-icon-frame{width:118px;height:118px}.game-detail-stats{grid-template-columns:1fr}.game-detail-stats>div{border-right:0;border-bottom:1px solid rgba(124,244,255,.13)}.game-detail-stats>div:last-child{border-bottom:0}.game-detail-gallery,.game-detail-info-grid,.game-related-grid{grid-template-columns:1fr}.game-detail-gallery figure,.game-detail-gallery img{min-height:150px}.detail-actions .pixel-btn{width:100%;text-align:center}.detail-actions .secondary-link{width:100%;text-align:center}.related-game-card{grid-template-columns:50px 1fr}}

/* Crate vault */
.crates-page-header{background:radial-gradient(circle at 50% 100%,rgba(177,76,255,.22),transparent 38%),linear-gradient(180deg,#15102f,#081127)}.crates-intro{display:grid;gap:20px}.crate-catalogue{display:grid;gap:16px}.crate-tier-card{position:relative;overflow:hidden;display:grid;grid-template-columns:182px minmax(0,1fr) 190px;gap:22px;align-items:center;padding:20px 22px;border:1px solid rgba(124,244,255,.23);border-radius:22px;background:linear-gradient(120deg,rgba(20,30,57,.98),rgba(10,16,37,.98));box-shadow:0 16px 36px rgba(0,0,0,.2)}.crate-tier-card:before{content:"";position:absolute;inset:0;opacity:.65;background:radial-gradient(circle at 9% 48%,var(--crate-glow),transparent 30%);pointer-events:none}.crate-tier-card>*{position:relative}.crate-tier-art{display:grid;place-items:center;min-height:136px}.crate-tier-art img{width:155px;max-height:155px;object-fit:contain;filter:drop-shadow(0 13px 16px var(--crate-shadow));animation:crateFloat 3.4s ease-in-out infinite}.crate-tier-copy h2{margin:3px 0 9px;font-size:1.36rem}.crate-tier-copy>p:not(.eyebrow){margin:0;color:#ced9ed;line-height:1.48}.crate-tier-buy{display:grid;gap:8px;justify-items:stretch;text-align:center;padding:15px;border-radius:16px;background:rgba(3,8,23,.38);border:1px solid rgba(255,255,255,.1)}.crate-tier-buy strong{color:#ffe27e;font-size:1.35rem}.crate-tier-buy span{color:#bdd0e9;font-size:.88rem}.crate-tier-buy .pixel-btn{margin-top:4px}.crate-odds{display:flex;flex-wrap:wrap;gap:6px;margin-top:13px}.crate-odds span{padding:5px 7px;border-radius:8px;background:rgba(255,255,255,.06);font-size:.76rem;color:#b9c8df}.crate-odds b{color:#fff;margin-left:3px}.crate-odds span:nth-child(2) b{color:#7cf4ff}.crate-odds span:nth-child(3) b{color:#d58cff}.crate-odds span:nth-child(4) b{color:#ffe27e}.crate-pass-chance{display:flex;align-items:baseline;flex-wrap:wrap;gap:5px;margin-top:12px;color:#ffdf75}.crate-pass-chance strong{font-size:1rem}.crate-pass-chance span{font-size:.85rem}.crate-pass-chance.quiet{color:#9eadc4}.crate-theme-pixel{--crate-glow:rgba(95,255,169,.34);--crate-shadow:rgba(45,207,145,.46)}.crate-theme-neon{--crate-glow:rgba(42,232,255,.36);--crate-shadow:rgba(44,207,255,.5)}.crate-theme-royal{--crate-glow:rgba(255,207,74,.4);--crate-shadow:rgba(255,191,47,.54)}.crate-theme-quantum{--crate-glow:rgba(220,94,255,.48);--crate-shadow:rgba(196,89,255,.66);border-color:rgba(255,213,92,.52)}.crate-theme-quantum .crate-tier-art img{animation-duration:2.15s}.crate-membership-prize{display:grid;gap:4px;margin:0 0 14px;padding:14px 16px;border-radius:15px;border:1px solid rgba(255,220,102,.68);background:linear-gradient(115deg,rgba(115,63,203,.78),rgba(255,191,66,.24));box-shadow:0 0 24px rgba(255,211,86,.18)}.crate-membership-prize span{color:#ffe888;text-transform:uppercase;font-size:.77rem;letter-spacing:.09em}.crate-membership-prize strong{font-size:1.12rem}.crate-membership-prize small{color:#ebefff}.crate-social-nudge{display:flex;justify-content:space-between;gap:18px;align-items:center;padding:21px;background:linear-gradient(115deg,rgba(9,37,66,.94),rgba(36,23,74,.94))}.crate-social-nudge h2{margin:4px 0 8px}.crate-social-nudge p:not(.eyebrow){margin:0;color:#cedaeb}.crate-cinematic-membership{border-color:rgba(255,221,106,.92)!important;background:linear-gradient(145deg,rgba(109,56,191,.87),rgba(251,193,58,.35))!important;box-shadow:0 0 32px rgba(255,218,87,.42)}.crate-cinematic-membership .crate-prize-art{display:grid;place-items:center;color:#ffe57d;font-size:54px;text-shadow:0 0 22px rgba(255,235,135,.8)}@keyframes crateFloat{0%,100%{transform:translateY(0) rotate(-2deg)}50%{transform:translateY(-8px) rotate(2deg)}}
@media (max-width:850px){.crate-tier-card{grid-template-columns:132px minmax(0,1fr)}.crate-tier-art img{width:122px}.crate-tier-buy{grid-column:1/-1;grid-template-columns:1fr 1fr auto;align-items:center}.crate-tier-buy .pixel-btn{margin-top:0}.crate-social-nudge{align-items:flex-start;flex-direction:column}}
@media (max-width:560px){.crate-tier-card{grid-template-columns:1fr;padding:17px;gap:13px}.crate-tier-art{min-height:96px}.crate-tier-art img{width:110px}.crate-tier-buy{grid-template-columns:1fr;text-align:left}.crate-tier-buy .pixel-btn{text-align:center}.crate-odds{display:grid;grid-template-columns:1fr 1fr}.crate-odds span{text-align:center}.crate-social-nudge .secondary-link{width:100%;text-align:center}}
body[data-page="sandbox"] #sandboxCanvas {
  background: #071225;
}

/* Simple premium Chrome Web Store experience */
body[data-page="games"] .sandbox-promo-feature,
body[data-page="games"] .library-help-grid,
body[data-page="games"] #sandboxIncomeNotice {
  display: none !important;
}

/* Keep the homepage focused on picking a game rather than a wall of dashboards. */
body[data-page="home"] #retentionHub,
body[data-page="home"] #dashboard {
  display: none;
}

body[data-page="games"] .site-header {
  padding-bottom: 34px;
}

body[data-page="games"] .hero-copy {
  max-width: 620px;
}

.games-store-heading {
  max-width: 760px;
  margin: 0 auto 22px;
  text-align: center;
}

.games-spotlight {
  max-width: 1080px;
  margin: 0 auto 22px;
  padding: 0 18px;
}

.games-spotlight-card {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr) auto;
  align-items: center;
  gap: 24px;
  padding: 24px;
  border: 1px solid rgba(124, 244, 255, .38);
  border-radius: 24px;
  background: linear-gradient(125deg, rgba(39, 67, 119, .92), rgba(16, 24, 50, .96));
  box-shadow: 0 18px 50px rgba(0, 0, 0, .26), inset 0 1px 0 rgba(255, 255, 255, .1);
}

.games-spotlight-card img {
  width: 112px;
  height: 112px;
  object-fit: contain;
  border-radius: 20px;
  background: rgba(4, 9, 24, .55);
  border: 1px solid rgba(255, 255, 255, .16);
}

.games-spotlight-card h3 {
  margin: 7px 0 8px;
  font-size: clamp(1.05rem, 2vw, 1.55rem);
}

.games-spotlight-card p {
  max-width: 660px;
  margin: 0 0 10px;
  color: #c7d8f2;
  font-size: 1.08rem;
  line-height: 1.45;
}

.games-spotlight-card strong {
  color: #bfffe2;
  font-size: .95rem;
}

.spotlight-label,
.store-source,
.store-users {
  font-family: 'Press Start 2P', cursive;
  letter-spacing: .02em;
  font-size: .6rem;
}

.spotlight-label,
.store-source { color: #8db8ff; }
.store-users { color: #bfffe2; }

body[data-page="games"] .games-toolbar {
  max-width: 1080px;
  margin: 0 auto 26px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 18px;
  box-shadow: none;
}

body[data-page="games"] .games-toolbar label {
  font-size: 1rem;
}

body[data-page="games"] .games-toolbar input,
body[data-page="games"] .games-toolbar select {
  border-radius: 10px;
  border-color: rgba(124, 244, 255, .25);
}

body[data-page="games"] .games-page-grid {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 18px;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 18px;
}

body[data-page="games"] .game-library-card {
  min-height: 0;
  padding: 20px;
  border: 1px solid rgba(124, 244, 255, .19);
  border-radius: 18px;
  background: linear-gradient(160deg, rgba(30, 43, 82, .95), rgba(13, 20, 43, .98));
  box-shadow: 0 12px 28px rgba(0, 0, 0, .2);
}

body[data-page="games"] .game-library-card:hover {
  transform: translateY(-3px);
  border-color: rgba(124, 244, 255, .65);
  box-shadow: 0 18px 35px rgba(0, 0, 0, .3);
}

.game-card-topline {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}

body[data-page="games"] .game-icon-frame {
  width: 94px;
  height: 94px;
  margin: 18px 0 12px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, .16);
  box-shadow: none;
}

body[data-page="games"] .game-store-icon { width: 82px; height: 82px; }
body[data-page="games"] .game-library-card h3 { min-height: 0; margin: 5px 0 10px; font-size: 1.05rem; }
body[data-page="games"] .game-library-card p { min-height: 88px; margin: 0; color: #c7d8f2; font-size: 1.08rem; line-height: 1.38; }
body[data-page="games"] .game-access-list { margin: 14px 0 16px; }
body[data-page="games"] .slot-actions.wrap-actions { padding: 0; background: none; border: 0; }
body[data-page="games"] .pixel-btn,
body[data-page="games"] .secondary-link { border-radius: 10px; }

.games-store-note {
  max-width: 850px;
  margin: 28px auto 0;
  padding: 0 18px;
  color: #8ea7c7;
  font-size: .92rem;
  text-align: center;
}

/* Collection-reward quest and Arcade Pass conversion page */
.game-connection-quest { padding-top: 6px; padding-bottom: 6px; }
.game-connection-quest-card { max-width: 1080px; margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(210px, .8fr) minmax(180px, .6fr); gap: 22px; align-items: center; border: 1px solid rgba(255, 214, 77, .4); border-radius: 22px; background: linear-gradient(125deg, rgba(47, 36, 77, .96), rgba(18, 30, 55, .96)); }
.game-connection-quest-card h2 { margin: 5px 0 8px; font-size: clamp(1.12rem, 2vw, 1.55rem); }
.game-connection-quest-card p { margin: 0; color: #d8dff2; line-height: 1.45; }
.connection-reward { display: grid; gap: 5px; padding: 16px; border-radius: 16px; background: rgba(8, 14, 30, .48); border: 1px solid rgba(255, 214, 77, .22); }
.connection-reward span, .connection-progress span { color: #aebddd; font-size: .87rem; }
.connection-reward strong { color: #ffe28a; font-size: 1.2rem; }
.connection-reward em { color: #bfffe2; font-style: normal; }
.connection-premium-tag { display: inline-flex; width: fit-content; margin-top: 4px; color: #ffd86e; font-size: .8rem; font-weight: 700; }
.connection-progress { display: grid; gap: 7px; }
.connection-progress strong { color: #f1f5ff; }
.connection-progress-track { height: 9px; overflow: hidden; border-radius: 999px; background: rgba(255,255,255,.12); }
.connection-progress-track i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #7cf4ff, #ffd64d); }

.premium-value-section { padding-bottom: 8px; }
.premium-value-card { max-width: 1050px; margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, .8fr); align-items: center; gap: 28px; border: 1px solid rgba(255,214,77,.42); border-radius: 24px; background: radial-gradient(circle at 82% 20%, rgba(255,214,77,.2), transparent 32%), linear-gradient(135deg, rgba(50,37,91,.96), rgba(16,25,51,.98)); }
.premium-value-card h2 { margin: 6px 0 9px; font-size: clamp(1.35rem, 3vw, 2.2rem); }
.premium-value-card p { margin: 0; color: #d7e0f5; line-height: 1.5; }
.premium-reward-compare { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.premium-reward-compare > div { display: grid; gap: 6px; padding: 16px; border: 1px solid rgba(255,255,255,.12); border-radius: 16px; background: rgba(7,13,28,.48); }
.premium-reward-compare span { color: #aebddd; font-size: .85rem; }
.premium-reward-compare strong { color: #ffffff; font-size: 1.15rem; }
.premium-reward-compare em { color: #bfffe2; font-style: normal; font-size: .9rem; }
.premium-reward-compare .premium-reward-winner { border-color: rgba(255,214,77,.56); box-shadow: 0 0 25px rgba(255,214,77,.12); }
.premium-reward-winner strong { color: #ffe28a; }
.premium-benefit-icon { display: inline-grid; place-items: center; min-width: 40px; height: 40px; margin-bottom: 12px; padding: 0 8px; border-radius: 12px; color: #10192f; font-weight: 900; background: linear-gradient(135deg, #ffe794, #ffd64d); }
.premium-comparison-card .secondary-link { margin-top: 14px; }
.premium-comparison-card .premium-price:not(.premium-price-clean) { display: none; }

@media (max-width: 780px) {
  .game-connection-quest-card, .premium-value-card { grid-template-columns: 1fr; gap: 18px; }
  .game-connection-quest { padding-left: 18px; padding-right: 18px; }
}

/* First-item Premium choice */
.starter-premium-dialog {
  width: min(900px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  overflow: auto;
  box-sizing: border-box;
  padding: clamp(22px, 4vw, 38px);
  border: 2px solid rgba(255, 218, 87, .92);
  border-radius: 24px;
  color: #f5f7ff;
  background: radial-gradient(circle at 88% 5%, rgba(134, 75, 238, .36), transparent 35%), linear-gradient(145deg, #172444, #0a1027 70%);
  box-shadow: 0 28px 90px rgba(0, 0, 0, .72), 0 0 40px rgba(255, 214, 77, .18);
}
.starter-premium-dialog::backdrop { background: rgba(2, 6, 19, .82); backdrop-filter: blur(7px); }
.starter-premium-celebration { float: right; display: grid; place-items: center; width: 52px; height: 52px; border-radius: 16px; color: #18203a; font-size: 1.7rem; background: linear-gradient(135deg, #fff0a6, #ffd64d); box-shadow: 0 0 26px rgba(255, 214, 77, .35); }
.starter-premium-dialog h2 { max-width: 720px; margin: 7px 0 10px; font-size: clamp(1.25rem, 3vw, 2rem); }
.starter-premium-intro { max-width: 760px; margin: 0 0 20px; color: #cfdaee; line-height: 1.55; }
.starter-premium-intro strong { color: #ffe587; white-space: nowrap; }
.starter-plan-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.starter-plan-card { padding: 18px; border: 1px solid rgba(124, 244, 255, .25); border-radius: 17px; background: rgba(8, 16, 39, .7); }
.starter-plan-card.is-premium { border-color: rgba(255, 214, 77, .62); background: linear-gradient(145deg, rgba(109, 63, 188, .38), rgba(29, 25, 54, .84)); box-shadow: inset 0 0 28px rgba(255, 214, 77, .06); }
.starter-plan-label { display: inline-block; margin-bottom: 8px; color: #7cf4ff; font-size: .75rem; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; }
.starter-plan-card.is-premium .starter-plan-label { color: #ffe587; }
.starter-plan-card h3 { margin: 0 0 10px; }
.starter-plan-card ul { display: grid; gap: 8px; margin: 0; padding-left: 20px; color: #d8e0f0; line-height: 1.35; }
.starter-plan-card li::marker { color: #7cf4ff; }
.starter-plan-card.is-premium li::marker { color: #ffd64d; }
.starter-premium-question { margin: 22px 0 10px; color: #fff; font-weight: 800; text-align: center; }
.starter-premium-actions { display: flex; justify-content: center; align-items: stretch; gap: 12px; flex-wrap: wrap; }
.starter-premium-actions .pixel-btn, .starter-premium-actions .secondary-link { display: inline-flex; justify-content: center; align-items: center; min-height: 48px; box-sizing: border-box; text-align: center; }
.starter-premium-reassurance { margin: 12px 0 0; color: #aebcd3; font-size: .88rem; text-align: center; }

@media (max-width: 680px) {
  .starter-premium-dialog { width: calc(100vw - 20px); max-height: calc(100vh - 20px); padding: 20px 16px; border-radius: 18px; }
  .starter-premium-celebration { width: 42px; height: 42px; }
  .starter-plan-grid { grid-template-columns: 1fr; }
  .starter-premium-actions { display: grid; }
}

/* Retro case-opening machine: long reel, CRT scanlines and a fixed prize marker. */
.crate-cinematic-shell {
  position: relative;
  overflow: hidden;
  border: 2px solid rgba(124, 244, 255, .36);
  border-radius: 24px;
  background: radial-gradient(circle at 50% 0, rgba(123, 71, 225, .22), transparent 36%), linear-gradient(180deg, #111a38, #070d20);
  box-shadow: inset 0 0 0 4px rgba(4, 9, 25, .7), inset 0 0 45px rgba(0, 0, 0, .56), 0 26px 80px rgba(0, 0, 0, .62);
}
.crate-cinematic-shell::before {
  content: '';
  position: absolute;
  z-index: 0;
  inset: 0;
  pointer-events: none;
  opacity: .16;
  background: repeating-linear-gradient(0deg, rgba(255,255,255,.16) 0, rgba(255,255,255,.16) 1px, transparent 1px, transparent 4px);
}
.crate-cinematic-shell > * { position: relative; z-index: 1; }
.crate-cinematic.is-charging .crate-cinematic-art { animation: retroCrateCharge .7s steps(4, end) infinite; }
.crate-cinematic.is-spinning .crate-cinematic-shell { border-color: rgba(255, 214, 77, .58); box-shadow: inset 0 0 0 4px rgba(4, 9, 25, .75), inset 0 0 48px rgba(0, 0, 0, .62), 0 0 42px rgba(124, 244, 255, .16), 0 26px 80px rgba(0, 0, 0, .62); }
.crate-roulette {
  border-width: 2px;
  border-color: rgba(124, 244, 255, .42);
  border-radius: 10px;
  background: repeating-linear-gradient(0deg, rgba(255,255,255,.025) 0, rgba(255,255,255,.025) 2px, transparent 2px, transparent 5px), linear-gradient(180deg, #050a18, #172448 50%, #050a18);
  box-shadow: inset 0 0 0 4px #050a18, inset 0 0 42px rgba(0,0,0,.86), 0 0 22px rgba(124,244,255,.12);
}
.crate-roulette-marker { width: 4px; background: #ffe15f; box-shadow: 0 0 6px #fff4ae, 0 0 20px #ffd64d; }
.crate-roulette-marker::before { top: 0; border-width: 11px; border-top-color: #ffe15f; }
.crate-roulette-marker::after { content: ''; position: absolute; left: 50%; bottom: 0; transform: translateX(-50%); border: 11px solid transparent; border-bottom-color: #ffe15f; }
.crate-roulette-track { gap: 10px; padding: 10px 0; }
.crate-reel-item {
  overflow: hidden;
  border-radius: 7px;
  background: linear-gradient(145deg, rgba(27,44,84,.98), rgba(7,13,31,.99));
  box-shadow: inset 0 -22px 28px rgba(0,0,0,.32), inset 0 0 0 2px rgba(255,255,255,.025);
}
.crate-reel-item::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 5px; background: #8193b6; }
.crate-reel-item { position: relative; }
.crate-reel-item.rarity-rare::after { background: #42dff5; box-shadow: 0 0 12px #42dff5; }
.crate-reel-item.rarity-super_rare::after { background: #bc68ff; box-shadow: 0 0 12px #bc68ff; }
.crate-reel-item.rarity-legendary::after { background: #ffd64d; box-shadow: 0 0 14px #ffd64d; }
.crate-cinematic.is-revealed .crate-roulette-marker { animation: retroMarkerLock .18s steps(2, end) 3; }
.crate-cinematic.is-revealed .crate-reel-item.is-winner { border-color: #ffe15f; animation: crateWinnerPulse .8s steps(4, end) infinite alternate; }
@keyframes retroCrateCharge { 0%,100% { transform: translateY(0) scale(1); filter: drop-shadow(0 10px 14px rgba(0,0,0,.5)); } 50% { transform: translateY(-5px) scale(1.025); filter: drop-shadow(0 0 18px rgba(124,244,255,.55)); } }
@keyframes retroMarkerLock { 50% { filter: brightness(1.8); transform: translateX(-50%) scaleX(1.8); } }

@media (prefers-reduced-motion: reduce) {
  .crate-cinematic.is-charging .crate-cinematic-art, .crate-cinematic.is-revealed .crate-roulette-marker { animation: none; }
}


/* Verified signup */

/* Hub redesign: fewer competing panels, clearer actions, and a calmer premium finish. */
body {
  min-height: 100vh;
  background-color: #080d1c;
  background-image:
    radial-gradient(circle at 15% -10%, rgba(92, 107, 255, .28), transparent 34%),
    radial-gradient(circle at 90% 8%, rgba(0, 229, 255, .12), transparent 26%),
    linear-gradient(180deg, #0c1327 0%, #080d1c 46%, #070b17 100%);
}

.site-header {
  position: relative;
  overflow: hidden;
  padding: 16px 20px 54px;
  border: 0;
  background: linear-gradient(140deg, rgba(18, 29, 61, .98), rgba(12, 18, 41, .96));
  box-shadow: inset 0 -1px 0 rgba(151, 183, 255, .13);
}

.site-header::after {
  content: '';
  position: absolute;
  width: 460px;
  height: 460px;
  right: -180px;
  bottom: -330px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(124, 244, 255, .18), transparent 67%);
  pointer-events: none;
}

.topbar {
  position: relative;
  z-index: 1;
  width: min(1120px, 100%);
  margin: 0 auto 42px;
  padding: 8px;
  justify-content: flex-start;
  gap: 4px;
  border: 1px solid rgba(177, 203, 255, .13);
  border-radius: 14px;
  background: rgba(6, 10, 25, .48);
  box-shadow: none;
}

.topbar a, .nav-btn {
  border: 1px solid transparent;
  border-radius: 9px;
  min-height: 40px;
  padding: 11px 13px;
  background: transparent;
  box-shadow: none;
  color: #cbd8f3;
  font-size: 11px;
  line-height: 1.25;
  transition: color .16s ease, background .16s ease, border-color .16s ease, transform .16s ease;
}

.topbar a:hover, .topbar a.active, .nav-btn:hover {
  border-color: rgba(124, 244, 255, .36);
  background: rgba(124, 244, 255, .1);
  color: #f4f9ff;
  transform: none;
}

.topbar .nav-btn.primary {
  margin-left: auto;
  border-color: rgba(255, 214, 77, .48);
  background: linear-gradient(135deg, #ffe28a, #ffd04e);
  color: #17131f;
}

.topbar .nav-btn.primary:hover { background: #fff0ab; color: #17131f; }
.topbar #logoutBtn { border-color: rgba(255,255,255,.17); }

.site-header .logo { position: relative; z-index: 1; max-width: 270px; filter: drop-shadow(0 12px 25px rgba(0, 0, 0, .28)); }
.site-header .eyebrow { position: relative; z-index: 1; margin: 18px auto 12px; color: #93b8ff; }
.site-header h1 { position: relative; z-index: 1; max-width: 930px; margin: 0 auto 16px; font-size: clamp(1.35rem, 3.2vw, 2.55rem); line-height: 1.38; letter-spacing: -.04em; }
.site-header .hero-copy { position: relative; z-index: 1; max-width: 670px; margin-bottom: 24px; color: #c5d3ef; font-size: clamp(1.25rem, 2.2vw, 1.55rem); line-height: 1.32; }

.hero-actions, .hero-proof { position: relative; z-index: 1; display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 10px; }
.hero-actions { margin-bottom: 22px; }
.hero-proof { gap: 8px; color: #aebddd; font-size: .95rem; }
.hero-proof span { padding: 7px 11px; border: 1px solid rgba(194, 213, 255, .16); border-radius: 999px; background: rgba(5, 10, 24, .28); }

.pixel-btn, .secondary-link {
  min-height: 42px;
  border-radius: 10px;
  box-shadow: none;
  transition: transform .16s ease, filter .16s ease, border-color .16s ease, background .16s ease;
}

.pixel-btn {
  border: 1px solid rgba(255, 244, 198, .65);
  background: linear-gradient(135deg, #ffe48d, #ffc94d);
  color: #17131f;
}

.pixel-btn:hover { background: linear-gradient(135deg, #fff0ad, #ffd564); transform: translateY(-2px); box-shadow: 0 10px 24px rgba(255, 201, 77, .17); }
.secondary-link { border-color: rgba(191, 215, 255, .22); background: rgba(13, 22, 47, .7); color: #e4edff; }
.secondary-link:hover { border-color: rgba(124, 244, 255, .55); background: rgba(33, 58, 99, .8); transform: translateY(-2px); }

.content-section { max-width: 1180px; padding: 48px 24px; }
.section-heading { max-width: 720px; margin: 0 auto 26px; text-align: center; }
.section-heading p:not(.eyebrow) { color: #aebddd; font-size: 1.25rem; line-height: 1.38; }
.section-heading h2 { font-size: clamp(1.2rem, 2.3vw, 1.75rem); }
.panel, .slot, .plan-strip div, .status-panel {
  border: 1px solid rgba(166, 191, 243, .16);
  border-radius: 18px;
  background: linear-gradient(145deg, rgba(25, 39, 78, .86), rgba(12, 20, 43, .94));
  box-shadow: 0 15px 38px rgba(0, 0, 0, .17), inset 0 1px 0 rgba(255, 255, 255, .045);
}

body[data-page="home"] .next-action-section { padding-top: 28px; }
body[data-page="home"] .next-action-card { max-width: 820px; margin: 0 auto; grid-template-columns: 1fr auto; align-items: center; gap: 18px; padding: 23px 25px; border-color: rgba(124, 244, 255, .3); background: linear-gradient(115deg, rgba(38, 55, 105, .94), rgba(16, 25, 51, .96)); }
body[data-page="home"] .next-action-card .pixel-btn { grid-row: 1 / span 3; grid-column: 2; }
body[data-page="home"] .next-action-card h2, body[data-page="home"] .next-action-card p { margin: 0; }
body[data-page="home"] .next-action-card p:not(.eyebrow) { color: #c1d0ef; font-size: 1.18rem; }

.home-flow-section { padding-top: 26px; }
.home-flow-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.home-flow-card { min-height: 230px; padding: 23px; }
.home-flow-card > span { display: inline-grid; place-items: center; width: 38px; height: 38px; margin-bottom: 16px; border-radius: 11px; background: rgba(124, 244, 255, .13); color: #a8f6ff; font-family: 'Press Start 2P', cursive; font-size: .65rem; }
.home-flow-card h3 { margin-bottom: 10px; }
.home-flow-card p { margin: 0 0 18px; color: #b5c5e4; font-size: 1.15rem; line-height: 1.35; }

body[data-page="home"] .premium-home-promo { padding-top: 12px; padding-bottom: 12px; }
body[data-page="home"] .premium-promo-panel { max-width: 930px; margin: 0 auto; padding: 28px; border-color: rgba(255, 214, 77, .36); background: radial-gradient(circle at 85% 14%, rgba(255, 214, 77, .16), transparent 28%), linear-gradient(120deg, rgba(51, 38, 90, .95), rgba(15, 23, 48, .96)); }
body[data-page="home"] .premium-promo-panel h2 { margin: 8px 0 10px; }
body[data-page="home"] .premium-promo-panel p:not(.eyebrow) { max-width: 670px; margin: 0; color: #d5def1; font-size: 1.23rem; line-height: 1.35; }
body[data-page="home"] .premium-promo-panel .slot-actions { margin-top: 20px; }

body[data-page="home"] .status-panel { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0; max-width: 940px; margin: 28px auto 0; padding: 0; overflow: hidden; }
body[data-page="home"] .status-panel div { padding: 15px 12px; border: 0; border-right: 1px solid rgba(166,191,243,.13); background: transparent; }
body[data-page="home"] .status-panel div:last-child { border-right: 0; }
body[data-page="home"] .status-panel strong { font-size: 1.35rem; }
body[data-page="home"] .status-panel .label { margin-bottom: 7px; font-size: .58rem; }

body[data-page="home"] .account-overview-section { padding-top: 28px; }
body[data-page="home"] .account-overview-card { max-width: 940px; margin: 0 auto; padding: 26px; border-radius: 22px; }
body[data-page="home"] #games { padding-top: 56px; }
body[data-page="home"] #games .section-heading { margin-bottom: 26px; }
body[data-page="home"] #retentionHub, body[data-page="home"] #dashboard { display: none !important; }

body[data-page="games"] .site-header, body[data-page="premium"] .site-header { padding-bottom: 40px; }
body[data-page="games"] .site-header h1, body[data-page="premium"] .site-header h1 { max-width: 760px; }

footer { margin-top: 42px; border: 0; background: #060a16; box-shadow: inset 0 1px 0 rgba(166,191,243,.12); }

@media (max-width: 780px) {
  .site-header { padding: 12px 14px 40px; }
  .topbar { justify-content: center; margin-bottom: 30px; }
  .topbar .nav-btn.primary { margin-left: 0; }
  .content-section { padding: 36px 18px; }
  body[data-page="home"] .next-action-card { grid-template-columns: 1fr; }
  body[data-page="home"] .next-action-card .pixel-btn { grid-row: auto; grid-column: auto; width: 100%; }
  .home-flow-grid { grid-template-columns: 1fr; }
  .home-flow-card { min-height: 0; }
  body[data-page="home"] .status-panel { grid-template-columns: repeat(2, 1fr); }
  body[data-page="home"] .status-panel div:nth-child(2n) { border-right: 0; }
  body[data-page="home"] .status-panel div:nth-child(n+3) { border-top: 1px solid rgba(166,191,243,.13); }
}

/* 3D avatar presentation and prize-crate cinematic */
.avatar-preview {
  isolation: isolate;
  perspective: 900px;
  transform-style: preserve-3d;
  overflow: hidden;
  border-radius: 24px;
  background: radial-gradient(circle at 30% 18%, rgba(188, 238, 255, .28), transparent 22%), radial-gradient(circle at 70% 82%, rgba(121, 73, 255, .22), transparent 40%), linear-gradient(145deg, #172d5a, #070c1e 70%);
  box-shadow: 0 22px 40px rgba(0,0,0,.35), inset 0 1px 0 rgba(255,255,255,.16), inset 0 -16px 22px rgba(0,0,0,.32);
}
.avatar-preview::before {
  display: block !important;
  content: '';
  position: absolute;
  z-index: 0;
  inset: 12%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(124,244,255,.28), rgba(124,244,255,0) 67%);
  filter: blur(5px);
}
.avatar-preview::after { display: block !important; content: ''; position: absolute; z-index: 0; left: 19%; right: 19%; bottom: 9%; height: 12%; border-radius: 50%; background: rgba(1,5,17,.55); filter: blur(6px); }
.avatar-base-img { z-index: 2; filter: drop-shadow(8px 12px 7px rgba(0,0,0,.46)) drop-shadow(-2px -2px 1px rgba(255,255,255,.16)); transform: translateZ(23px) rotateY(-7deg) rotateX(2deg); transition: transform .28s ease, filter .28s ease; }
.avatar-wearable-img { filter: drop-shadow(5px 8px 5px rgba(0,0,0,.42)) drop-shadow(-1px -1px 1px rgba(255,255,255,.13)); transform: translateZ(38px) !important; transition: transform .28s ease, filter .28s ease; }
.avatar-wearable-img.wear-hat { transform: translateY(-13%) scale(.96) translateZ(48px) !important; }
.avatar-preview.giant .avatar-wearable-img.wear-hat { transform: translateY(-15%) scale(.98) translateZ(58px) !important; }
.avatar-wearable-img.wear-face { transform: translateY(-3%) translateZ(54px) !important; }
.avatar-wearable-img.wear-accessory { transform: scale(1.02) translateZ(65px) !important; }
.avatar-preview:hover .avatar-base-img { transform: translateZ(35px) rotateY(6deg) rotateX(-2deg) scale(1.025); filter: drop-shadow(12px 16px 8px rgba(0,0,0,.5)) drop-shadow(-2px -2px 2px rgba(255,255,255,.2)); }
.avatar-preview:hover .avatar-wearable-img.wear-hat { transform: translateY(-13%) scale(.99) translateZ(62px) !important; }
.avatar-preview:hover .avatar-wearable-img.wear-face { transform: translateY(-3%) translateZ(66px) !important; }
.avatar-preview:hover .avatar-wearable-img.wear-accessory { transform: scale(1.04) translateZ(76px) !important; }
.avatar-preview.giant { border-width: 1px; box-shadow: 0 28px 62px rgba(0,0,0,.44), 0 0 0 5px rgba(124,244,255,.06), inset 0 1px 0 rgba(255,255,255,.2), inset 0 -20px 25px rgba(0,0,0,.38); }
.avatar-preview[data-premium="true"] { background: radial-gradient(circle at 30% 18%, rgba(255,244,184,.36), transparent 25%), radial-gradient(circle at 70% 82%, rgba(255,180,45,.2), transparent 42%), linear-gradient(145deg, #554016, #100c1f 72%); }
.item-preview { border-radius: 14px; perspective: 450px; background: radial-gradient(circle at 30% 20%, rgba(255,255,255,.16), transparent 30%), linear-gradient(145deg, #1d3568, #0a1025); box-shadow: inset 0 1px 0 rgba(255,255,255,.14), 0 8px 16px rgba(0,0,0,.18); }
.item-preview img { filter: drop-shadow(4px 6px 3px rgba(0,0,0,.42)); transform: translateZ(14px) rotateY(-8deg) rotateX(4deg) scale(.92); transition: transform .2s ease, filter .2s ease; }
.wearable-preview img { transform: translateZ(20px) rotateY(-8deg) rotateX(4deg) scale(1.12); }
.item-card:hover .item-preview img { transform: translateZ(28px) rotateY(7deg) rotateX(-3deg) scale(.98); filter: drop-shadow(7px 10px 4px rgba(0,0,0,.44)); }

.crate-panel { border: 1px solid rgba(255,214,77,.5); border-radius: 22px; background: radial-gradient(circle at 10% 10%, rgba(124,244,255,.12), transparent 30%), radial-gradient(circle at 86% 12%, rgba(255,214,77,.18), transparent 30%), linear-gradient(130deg, rgba(26,37,76,.98), rgba(10,15,34,.98)); box-shadow: 0 20px 44px rgba(0,0,0,.24), inset 0 1px 0 rgba(255,255,255,.1); }
.crate-showpiece { display: grid; grid-template-columns: minmax(150px, 215px) 1fr; align-items: center; gap: 22px; }
.crate-showpiece img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; mix-blend-mode: screen; filter: drop-shadow(0 16px 20px rgba(0,0,0,.4)); animation: crateIdleFloat 3.8s ease-in-out infinite; }
.crate-showpiece h3 { margin: 3px 0 10px; font-size: 1.12rem; color: #fff0ae; }
.crate-showpiece .muted-copy { margin: 0 0 16px; font-size: 1.12rem; line-height: 1.32; }

.crate-cinematic { position: fixed; inset: 0; z-index: 2000; display: grid; place-items: center; overflow: hidden; padding: 22px; background: radial-gradient(circle at center, rgba(42,38,94,.86), rgba(3,6,17,.97) 68%); backdrop-filter: blur(11px); }
.crate-cinematic.hidden { display: none; }
.crate-cinematic-stars { position: absolute; inset: 0; opacity: .7; background-image: radial-gradient(circle, rgba(255,255,255,.9) 0 1px, transparent 1.7px), radial-gradient(circle, rgba(124,244,255,.75) 0 1px, transparent 1.8px); background-size: 76px 76px, 123px 123px; background-position: 0 0, 31px 45px; animation: crateStarDrift 14s linear infinite; }
.crate-cinematic-shell { position: relative; z-index: 1; width: min(780px, 100%); text-align: center; }
.crate-cinematic-status { margin-bottom: 12px; color: #b7d7ff; }
.crate-cinematic-title { min-height: 2.7em; margin: 0; font-size: clamp(1.15rem, 3vw, 2rem); line-height: 1.42; text-shadow: 0 0 25px rgba(124,244,255,.35); }
.crate-cinematic-machine { position: relative; display: grid; place-items: center; width: min(470px, 76vw); aspect-ratio: 1; margin: 4px auto -20px; perspective: 900px; }
.crate-cinematic-art { position: relative; z-index: 2; width: 100%; aspect-ratio: 1; object-fit: cover; mix-blend-mode: screen; filter: drop-shadow(0 22px 28px rgba(0,0,0,.55)); transform: rotateX(5deg) rotateY(-8deg); animation: crateIdleFloat 3.8s ease-in-out infinite; }
.crate-energy-ring { position: absolute; z-index: 1; width: 62%; height: 62%; border: 2px solid rgba(124,244,255,.55); border-radius: 50%; box-shadow: 0 0 34px rgba(124,244,255,.3), inset 0 0 28px rgba(124,244,255,.12); animation: crateRingSpin 4s linear infinite; }
.crate-energy-ring.ring-two { width: 82%; height: 82%; border-color: rgba(255,214,77,.3); animation-direction: reverse; animation-duration: 6s; }
.crate-cinematic-copy { margin: 0; color: #d5e0f6; font-size: 1.25rem; }
.crate-cinematic-prizes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; max-width: 680px; margin: 22px auto 16px; opacity: 0; transform: translateY(24px) scale(.94); pointer-events: none; }
.crate-cinematic.is-revealed .crate-cinematic-prizes { animation: cratePrizeReveal .65s cubic-bezier(.15,.9,.2,1) forwards; pointer-events: auto; }
.crate-cinematic-prize { min-width: 0; padding: 12px; border: 1px solid rgba(191,215,255,.24); border-radius: 16px; background: linear-gradient(145deg, rgba(34,54,102,.94), rgba(11,17,39,.96)); box-shadow: 0 16px 30px rgba(0,0,0,.25); }
.crate-cinematic-prize:nth-child(2) { animation-delay: .12s; }
.crate-cinematic-prize:nth-child(3) { animation-delay: .24s; }
.crate-prize-art { display: grid; place-items: center; height: 105px; border-radius: 12px; background: radial-gradient(circle at 35% 22%, rgba(255,255,255,.18), transparent 35%), rgba(2,7,20,.48); }
.crate-prize-art img { width: 86px; height: 86px; object-fit: contain; filter: drop-shadow(5px 7px 4px rgba(0,0,0,.45)); }
.crate-cinematic-prize span { display: block; margin: 10px 0 6px; color: #afc4ef; font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; }
.crate-cinematic-prize strong { display: block; font-size: 1rem; line-height: 1.2; }
.crate-cinematic-prize.rarity-legendary { border-color: rgba(255,214,77,.8); box-shadow: 0 0 30px rgba(255,214,77,.25), 0 16px 30px rgba(0,0,0,.25); }
.crate-cinematic-prize.rarity-super_rare { border-color: rgba(198,140,255,.78); box-shadow: 0 0 25px rgba(198,140,255,.2), 0 16px 30px rgba(0,0,0,.25); }
.crate-cinematic .crate-cinematic-close { margin-top: 4px; }
.crate-cinematic.is-charging .crate-cinematic-art { animation: crateCharging .88s ease-in-out infinite alternate; }
.crate-cinematic.is-charging .crate-energy-ring { animation-duration: 1.1s; }
.crate-cinematic.is-opening .crate-cinematic-art { animation: crateBurst .9s cubic-bezier(.2,.8,.3,1) forwards; }
.crate-cinematic.is-opening .crate-energy-ring { animation: crateRingBurst .9s ease-out forwards; }

@keyframes crateIdleFloat { 0%,100% { transform: translateY(0) rotateX(5deg) rotateY(-8deg); } 50% { transform: translateY(-10px) rotateX(-2deg) rotateY(8deg) scale(1.025); } }
@keyframes crateStarDrift { to { background-position: 76px 150px, -92px 180px; } }
@keyframes crateRingSpin { to { transform: rotate(360deg) rotateX(55deg); } }
@keyframes crateCharging { from { transform: translateY(0) scale(1) rotateX(4deg) rotateY(-5deg); filter: brightness(1) saturate(1) drop-shadow(0 20px 24px rgba(0,0,0,.5)); } to { transform: translateY(-4px) scale(1.075) rotateX(-5deg) rotateY(6deg); filter: brightness(1.5) saturate(1.35) drop-shadow(0 0 34px rgba(124,244,255,.7)); } }
@keyframes crateBurst { 0% { transform: scale(1) rotateY(0); filter: brightness(1); } 44% { transform: scale(.91) rotateY(-14deg); filter: brightness(2.1) saturate(1.6); } 100% { transform: scale(1.08) rotateY(11deg); filter: brightness(1.28) saturate(1.25) drop-shadow(0 0 60px rgba(255,214,77,.7)); } }
@keyframes crateRingBurst { to { transform: scale(1.75) rotate(240deg); opacity: 0; border-width: 16px; } }
@keyframes cratePrizeReveal { to { opacity: 1; transform: translateY(0) scale(1); } }

@media (max-width: 620px) {
  .crate-showpiece { grid-template-columns: 1fr; text-align: center; }
  .crate-showpiece img { width: min(220px, 72vw); margin: -16px auto -22px; }
  .crate-cinematic-prizes { gap: 7px; }
  .crate-cinematic-prize { padding: 8px; border-radius: 11px; }
  .crate-prize-art { height: 72px; }
  .crate-prize-art img { width: 61px; height: 61px; }
  .crate-cinematic-prize strong { font-size: .84rem; }
}

@media (max-width: 560px) {
  .topbar { gap: 5px; padding: 6px; }
  .topbar a, .nav-btn { min-height: 38px; padding: 10px 11px; font-size: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  .crate-showpiece img, .crate-cinematic-stars, .crate-cinematic-art, .crate-energy-ring, .crate-cinematic.is-charging .crate-cinematic-art, .crate-cinematic.is-opening .crate-cinematic-art, .crate-cinematic.is-opening .crate-energy-ring { animation: none; }
  .crate-cinematic-prizes, .crate-cinematic.is-revealed .crate-cinematic-prizes { opacity: 1; transform: none; animation: none; }
}

@media (max-width: 700px) {
  .games-spotlight-card { grid-template-columns: 80px 1fr; gap: 16px; padding: 18px; }
  .games-spotlight-card img { width: 80px; height: 80px; border-radius: 15px; }
  .games-spotlight-card .pixel-btn { grid-column: 1 / -1; width: 100%; text-align: center; }
  body[data-page="games"] .games-page-grid { grid-template-columns: 1fr; }
  body[data-page="games"] .game-library-card p { min-height: 0; }
}

/* Keep the crate reveal usable at 100% browser zoom on short and mobile screens. */
.crate-cinematic {
  box-sizing: border-box;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.crate-cinematic-shell {
  box-sizing: border-box;
  max-height: calc(100dvh - 24px);
  overflow-x: hidden;
  overflow-y: auto;
  padding: clamp(14px, 2.5vh, 24px);
  scrollbar-width: thin;
  scrollbar-color: rgba(124,244,255,.55) rgba(4,9,25,.5);
}
.crate-cinematic.is-revealed {
  padding-bottom: calc(86px + env(safe-area-inset-bottom));
}
.crate-cinematic.is-revealed .crate-cinematic-machine {
  display: none;
}
.crate-cinematic.is-revealed .crate-cinematic-status {
  margin: 0 0 6px;
}
.crate-cinematic.is-revealed .crate-cinematic-title {
  min-height: 0;
}
.crate-cinematic.is-revealed .crate-roulette {
  margin-block: 12px 8px;
}
.crate-cinematic.is-revealed .crate-cinematic-prizes {
  margin-block: 10px 8px;
}
.crate-cinematic.is-revealed .crate-cinematic-close {
  position: fixed;
  z-index: 7;
  left: 50%;
  bottom: max(14px, env(safe-area-inset-bottom));
  width: min(360px, calc(100vw - 28px));
  margin: 0;
  transform: translateX(-50%);
  box-shadow: 0 12px 34px rgba(0,0,0,.72), 0 0 22px rgba(255,214,77,.22);
}
@media (max-height: 720px) {
  .crate-cinematic { padding: 10px 10px 82px; }
  .crate-cinematic-shell { max-height: calc(100dvh - 92px); padding: 12px; }
  .crate-cinematic-status { margin: 0 0 4px; }
  .crate-cinematic-title { min-height: 0; line-height: 1.2; }
  .crate-cinematic-copy { font-size: .95rem; }
  .crate-cinematic-machine { width: min(210px, 38vh); margin-block: -4px -12px; }
  .crate-roulette { margin-block: 10px 7px; }
  .crate-reel-item { height: 126px; grid-template-rows: 82px auto; }
  .crate-reel-item img { width: 74px; height: 74px; }
  .crate-cinematic-prize { min-height: 0; }
  .crate-prize-art { height: 70px; }
  .crate-prize-art img { width: 60px; height: 60px; }
}
.plot-template-grid { display:grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
.plot-theme-chip { display:inline-flex; padding:4px 8px; border-radius:999px; border:1px solid rgba(255,255,255,.14); color:#dbeafe; font-size:.75rem; }
@media (max-width: 760px) {
  body[data-page="sandbox"] .sandbox-shell { padding-left: 8px; padding-right: 8px; }
  body[data-page="sandbox"] .sandbox-layout { gap: 12px; }
  body[data-page="sandbox"] .sandbox-world-panel { order: 1; min-height: auto; }
  body[data-page="sandbox"] .sandbox-world-stage,
  body[data-page="sandbox"] #sandboxCanvas { height: 68vh !important; min-height: 68vh !important; }
  body[data-page="sandbox"] .sandbox-right-panel { order: 2; border-radius: 22px 22px 0 0; max-height: 58vh; overflow: auto; position: sticky; bottom: 0; z-index: 20; }
  body[data-page="sandbox"] .sandbox-left-panel { order: 3; max-height: 48vh; overflow: auto; }
  .item-preview-body { grid-template-columns: 1fr; }
  .item-preview-large { width: 100%; }
  .tile-stat-grid { grid-template-columns: 1fr 1fr; }
  .selected-tile-hero .plot-name-row { grid-template-columns: 1fr; }
}

/* Gameplay animation and website UX polish pass */
.global-player-bar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 10px 18px;
  border-bottom: 1px solid rgba(124,244,255,.16);
  background: linear-gradient(90deg, rgba(11,18,34,.96), rgba(18,30,56,.94));
  backdrop-filter: blur(14px);
  box-shadow: 0 14px 40px rgba(0,0,0,.22);
}
.global-player-left,.global-player-actions{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.global-avatar-dot{display:grid;place-items:center;width:34px;height:34px;border-radius:50%;background:linear-gradient(135deg,#7cf4ff,#ffd64d);color:#101625;font-weight:900;box-shadow:0 0 18px rgba(124,244,255,.22)}
.next-action-section{padding-top:18px;padding-bottom:0}.next-action-card{display:grid;gap:10px;background:linear-gradient(135deg,rgba(36,52,94,.95),rgba(15,24,45,.95));border-color:rgba(124,244,255,.22)}
.profile-showcase-panel .showcase-grid{display:flex;gap:10px;flex-wrap:wrap;margin-top:12px}
.game-library-card{position:relative;overflow:hidden}.game-library-card::after{content:"";position:absolute;inset:auto -20% -55% -20%;height:90px;background:radial-gradient(circle,rgba(124,244,255,.16),transparent 62%);pointer-events:none}

.sandbox-world-stage{position:relative}.sandbox-animation-layer{position:absolute;inset:0;overflow:hidden;pointer-events:none;z-index:5}.sandbox-coin-burst{position:absolute;font-size:1.35rem;filter:drop-shadow(0 4px 4px rgba(0,0,0,.28));animation:coinBurst 1s ease-out forwards;transform:translate(-50%,-50%)}
.sandbox-float-text{position:absolute;transform:translate(-50%,-50%);padding:8px 12px;border-radius:999px;font-weight:900;letter-spacing:.02em;white-space:nowrap;box-shadow:0 16px 28px rgba(0,0,0,.25);animation:floatReward 1.25s ease-out forwards;z-index:6}.coin-reward-pop{background:linear-gradient(135deg,#fff0a6,#ffd64d);color:#392508}.placement-pop{background:linear-gradient(135deg,#adffdc,#7cf4ff);color:#083431}.reaction-pop{background:linear-gradient(135deg,#f8e7ff,#c68cff);color:#32104c}.offer-stamp-pop{background:linear-gradient(135deg,#ffe1bd,#ff8b51);color:#4e2106;transform:translate(-50%,-50%) rotate(-5deg)}
.sandbox-dust-puff{position:absolute;width:14px;height:14px;border-radius:50%;background:rgba(231,205,159,.8);animation:dustPuff .85s ease-out forwards;transform:translate(-50%,-50%)}
@keyframes coinBurst{0%{opacity:0;transform:translate(-50%,-50%) scale(.4)}15%{opacity:1}100%{opacity:0;transform:translate(calc(-50% + var(--dx)),calc(-50% + var(--dy))) scale(1.2) rotate(420deg)}}
@keyframes floatReward{0%{opacity:0;transform:translate(-50%,0) scale(.85)}15%{opacity:1}80%{opacity:1}100%{opacity:0;transform:translate(-50%,-72px) scale(1.04)}}
@keyframes dustPuff{0%{opacity:.75;transform:translate(-50%,-50%) scale(.3)}100%{opacity:0;transform:translate(calc(-50% + var(--dx)),calc(-50% + var(--dy))) scale(2.2)}}
.tile-pulse-claim .sandbox-world-overlay::before,.tile-pulse-placement .sandbox-world-overlay::before,.tile-pulse-levelup .sandbox-world-overlay::before,.tile-pulse-social .sandbox-world-overlay::before,.tile-pulse-offer .sandbox-world-overlay::before{content:"";position:absolute;inset:18%;border-radius:26px;border:3px solid rgba(255,214,77,.7);box-shadow:0 0 45px rgba(255,214,77,.45);animation:stagePulse .85s ease-out forwards;pointer-events:none}.tile-pulse-placement .sandbox-world-overlay::before{border-color:rgba(124,244,255,.75);box-shadow:0 0 45px rgba(124,244,255,.38)}.tile-pulse-levelup .sandbox-world-overlay::before{border-color:rgba(189,120,255,.75);box-shadow:0 0 55px rgba(189,120,255,.44)}.tile-pulse-social .sandbox-world-overlay::before{border-color:rgba(255,145,224,.75);box-shadow:0 0 45px rgba(255,145,224,.35)}
@keyframes stagePulse{0%{opacity:0;transform:scale(.9)}20%{opacity:1}100%{opacity:0;transform:scale(1.08)}}
.sandbox-levelup-toast{position:fixed;left:50%;top:18%;z-index:90;transform:translateX(-50%);background:linear-gradient(135deg,#20133d,#6f44ff);color:#fff;border:1px solid rgba(255,255,255,.2);border-radius:18px;padding:16px 22px;box-shadow:0 24px 60px rgba(0,0,0,.35);display:grid;gap:6px;text-align:center}.sandbox-levelup-toast.hidden{display:none}.sandbox-levelup-toast strong{font-size:1.1rem}.sandbox-levelup-toast span{color:#d6dfff}.levelup-pop{animation:levelUpPop 1.65s ease-out forwards}@keyframes levelUpPop{0%{opacity:0;transform:translateX(-50%) scale(.75)}14%{opacity:1;transform:translateX(-50%) scale(1.08)}82%{opacity:1}100%{opacity:0;transform:translateX(-50%) translateY(-30px) scale(1)}}
.sandbox-mobile-action-bar{display:none;position:fixed;left:10px;right:10px;bottom:10px;z-index:60;gap:8px;padding:10px;border-radius:18px;border:1px solid rgba(124,244,255,.2);background:rgba(10,16,31,.92);backdrop-filter:blur(12px);box-shadow:0 -8px 34px rgba(0,0,0,.3)}
@media (max-width: 820px){.global-player-bar{position:sticky;padding:8px 10px;font-size:.88rem}.global-player-actions .secondary-link{padding:7px 9px}.sandbox-mobile-action-bar{display:grid;grid-template-columns:repeat(4,minmax(0,1fr))}.sandbox-layout{display:block}.sandbox-world-panel{margin-bottom:14px}.sandbox-right-panel{position:fixed;left:0;right:0;bottom:72px;max-height:54vh;overflow:auto;border-radius:22px 22px 0 0;z-index:45;box-shadow:0 -20px 50px rgba(0,0,0,.35)}body:not(.sandbox-has-selection) .sandbox-right-panel{position:static;max-height:none}.sandbox-left-panel{max-height:50vh;overflow:auto}.sandbox-catalogue{grid-template-columns:1fr 1fr}.catalogue-card{min-width:0;padding:10px}.catalogue-art{width:74px;height:74px}.catalogue-copy strong{font-size:.85rem}.sandbox-world-stage{min-height:58vh}.sandbox-toolbar{overflow:auto;white-space:nowrap;display:flex;flex-wrap:nowrap}.sandbox-toolbar .muted-copy{display:none}}


/* Emote system */
.sandbox-emote-panel,.inventory-emotes-panel{display:grid;gap:14px;margin-top:14px;}
.emote-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:12px;}
.emote-card{border:1px solid rgba(124,244,255,.18);background:rgba(10,16,32,.72);border-radius:16px;padding:12px;display:grid;gap:8px;box-shadow:0 10px 24px rgba(0,0,0,.18);}
.emote-card.owned{border-color:rgba(45,207,145,.36);}
.emote-card.active{box-shadow:0 0 0 2px rgba(255,214,77,.45),0 10px 24px rgba(0,0,0,.18);}
.emote-emoji{font-size:32px;line-height:1;}
.emote-card small{opacity:.8;}
.emote-row{display:flex;flex-wrap:wrap;gap:8px;align-items:center;}
.emote-pill{display:inline-flex;align-items:center;gap:6px;border-radius:999px;padding:6px 10px;background:rgba(255,255,255,.08);font-size:.9rem;}
.inventory-emotes-panel .emote-grid{grid-template-columns:repeat(auto-fit,minmax(150px,1fr));}
@media (max-width: 820px){.emote-grid{grid-template-columns:repeat(2,minmax(0,1fr));}}
@media (max-width: 520px){.emote-grid{grid-template-columns:1fr;}}


/* Account-level avatar emotes */
.avatar-preview{position:relative;overflow:visible;}
.avatar-emote-bubble{position:absolute;right:-8px;top:-8px;z-index:12;display:inline-grid;place-items:center;width:34px;height:34px;border-radius:999px;background:linear-gradient(180deg,rgba(255,255,255,.98),rgba(255,225,126,.94));border:2px solid rgba(255,214,77,.9);box-shadow:0 10px 22px rgba(0,0,0,.22),0 0 18px rgba(255,214,77,.28);font-size:19px;animation:avatarEmoteFloat 1.5s ease-in-out infinite;}
.avatar-preview.giant .avatar-emote-bubble{right:8px;top:4px;width:48px;height:48px;font-size:28px;}
.avatar-preview.large .avatar-emote-bubble{right:0;top:-4px;width:40px;height:40px;font-size:23px;}
.emote-dance .avatar-base-img,.emote-floss .avatar-base-img,.emote-silly_wiggle .avatar-base-img{animation:avatarDance 1s ease-in-out infinite;transform-origin:50% 90%;}
.emote-wave .avatar-base-img,.emote-high_five .avatar-base-img{animation:avatarWave 1.1s ease-in-out infinite;transform-origin:50% 90%;}
.emote-spin .avatar-base-img,.emote-breakdance .avatar-base-img{animation:avatarSpin 1.4s linear infinite;transform-origin:50% 50%;}
.emote-robot .avatar-base-img{animation:avatarRobot .8s steps(2,end) infinite;}
.emote-moonwalk .avatar-base-img{animation:avatarMoonwalk 1.5s ease-in-out infinite;}
.emote-cheer .avatar-base-img,.emote-victory_jump .avatar-base-img,.emote-star_jump .avatar-base-img{animation:avatarJump .9s ease-in-out infinite;}
.avatar-emote-shop{margin-top:16px;padding:16px;border-radius:18px;background:rgba(9,17,34,.55);border:1px solid rgba(124,244,255,.15);}
@keyframes avatarEmoteFloat{0%,100%{transform:translateY(0) scale(1)}50%{transform:translateY(-5px) scale(1.06)}}
@keyframes avatarDance{0%,100%{transform:translateX(0) rotate(0)}25%{transform:translateX(-4px) rotate(-4deg)}75%{transform:translateX(4px) rotate(4deg)}}
@keyframes avatarWave{0%,100%{transform:rotate(0)}50%{transform:rotate(5deg)}}
@keyframes avatarSpin{to{transform:rotate(360deg)}}
@keyframes avatarRobot{0%{transform:translateX(-3px)}100%{transform:translateX(3px)}}
@keyframes avatarMoonwalk{0%,100%{transform:translateX(0)}50%{transform:translateX(-8px)}}
@keyframes avatarJump{0%,100%{transform:translateY(0)}50%{transform:translateY(-8px)}}

/* Emote movement polish: avatars move, no floating emoji-only bubble */
.global-player-bar{display:none!important;}
.avatar-emote-bubble{display:none!important;}
.avatar-preview .avatar-base-img,.avatar-preview .avatar-wearable-img{transform-origin:50% 85%;will-change:transform;}
.emote-wave .avatar-base-img,.emote-wave .avatar-wearable-img,.emote-high_five .avatar-base-img,.emote-high_five .avatar-wearable-img{animation:emoteWaveBody 1.05s ease-in-out infinite;}
.emote-dance .avatar-base-img,.emote-dance .avatar-wearable-img,.emote-floss .avatar-base-img,.emote-floss .avatar-wearable-img,.emote-silly_wiggle .avatar-base-img,.emote-silly_wiggle .avatar-wearable-img{animation:emoteDanceBody .82s ease-in-out infinite;}
.emote-cheer .avatar-base-img,.emote-cheer .avatar-wearable-img,.emote-victory_jump .avatar-base-img,.emote-victory_jump .avatar-wearable-img,.emote-star_jump .avatar-base-img,.emote-star_jump .avatar-wearable-img{animation:emoteJumpBody .78s ease-in-out infinite;}
.emote-laugh .avatar-base-img,.emote-laugh .avatar-wearable-img{animation:emoteLaughBody .58s ease-in-out infinite;}
.emote-spin .avatar-base-img,.emote-spin .avatar-wearable-img{animation:emoteSpinBody 1.05s linear infinite;}
.emote-breakdance .avatar-base-img,.emote-breakdance .avatar-wearable-img,.emote-ninja .avatar-base-img,.emote-ninja .avatar-wearable-img{animation:emoteFlipBody 1.1s cubic-bezier(.4,0,.2,1) infinite;}
.emote-robot .avatar-base-img,.emote-robot .avatar-wearable-img{animation:emoteRobotBody .62s steps(2,end) infinite;}
.emote-moonwalk .avatar-base-img,.emote-moonwalk .avatar-wearable-img{animation:emoteMoonwalkBody 1.2s ease-in-out infinite;}
.emote-dab .avatar-base-img,.emote-dab .avatar-wearable-img{animation:emoteDabBody 1.25s ease-in-out infinite;}
.emote-air_guitar .avatar-base-img,.emote-air_guitar .avatar-wearable-img,.emote-drum_solo .avatar-base-img,.emote-drum_solo .avatar-wearable-img{animation:emoteMusicBody .55s ease-in-out infinite;}
.emote-magic_trick .avatar-base-img,.emote-magic_trick .avatar-wearable-img,.emote-sparkle_pose .avatar-base-img,.emote-sparkle_pose .avatar-wearable-img{animation:emoteSparkleBody 1.2s ease-in-out infinite;filter:drop-shadow(0 0 10px rgba(255,214,77,.32));}
.emote-facepalm .avatar-base-img,.emote-facepalm .avatar-wearable-img{animation:emoteFacepalmBody 1.4s ease-in-out infinite;}
.emote-shrug .avatar-base-img,.emote-shrug .avatar-wearable-img{animation:emoteShrugBody 1.1s ease-in-out infinite;}
.emote-heart_hands .avatar-base-img,.emote-heart_hands .avatar-wearable-img{animation:emoteHeartBody 1.05s ease-in-out infinite;filter:drop-shadow(0 0 8px rgba(255,110,190,.25));}
.emote-salute .avatar-base-img,.emote-salute .avatar-wearable-img,.emote-superhero .avatar-base-img,.emote-superhero .avatar-wearable-img{animation:emoteHeroBody 1.2s ease-in-out infinite;}
.emote-sleepy .avatar-base-img,.emote-sleepy .avatar-wearable-img{animation:emoteSleepyBody 1.8s ease-in-out infinite;}
.emote-panic .avatar-base-img,.emote-panic .avatar-wearable-img{animation:emotePanicBody .28s linear infinite;}
.emote-coin_toss .avatar-base-img,.emote-coin_toss .avatar-wearable-img{animation:emoteCoinBody 1s ease-in-out infinite;}
.emote-ghost_float .avatar-base-img,.emote-ghost_float .avatar-wearable-img{animation:emoteGhostBody 1.7s ease-in-out infinite;opacity:.92;filter:drop-shadow(0 0 10px rgba(124,244,255,.32));}
@keyframes emoteWaveBody{0%,100%{transform:rotate(-2deg) translateY(0)}45%{transform:rotate(8deg) translateY(-3px)}70%{transform:rotate(-6deg)}}
@keyframes emoteDanceBody{0%,100%{transform:translateX(0) translateY(0) rotate(0) scale(1)}25%{transform:translateX(-6px) translateY(-4px) rotate(-7deg) scale(1.03)}50%{transform:translateX(0) translateY(1px) rotate(0) scale(.98)}75%{transform:translateX(6px) translateY(-4px) rotate(7deg) scale(1.03)}}
@keyframes emoteJumpBody{0%,100%{transform:translateY(0) scale(1)}45%{transform:translateY(-12px) scale(1.05)}70%{transform:translateY(2px) scale(.97)}}
@keyframes emoteLaughBody{0%,100%{transform:translateX(0) rotate(0) scale(1)}25%{transform:translateX(-3px) rotate(-5deg) scale(1.04,.96)}75%{transform:translateX(3px) rotate(5deg) scale(1.04,.96)}}
@keyframes emoteSpinBody{to{transform:rotate(360deg)}}
@keyframes emoteFlipBody{0%{transform:rotate(0) translateY(0)}45%{transform:rotate(180deg) translateY(-10px)}100%{transform:rotate(360deg) translateY(0)}}
@keyframes emoteRobotBody{0%{transform:translateX(-5px) rotate(-6deg)}50%{transform:translateY(-4px) rotate(0)}100%{transform:translateX(5px) rotate(6deg)}}
@keyframes emoteMoonwalkBody{0%,100%{transform:translateX(6px) skewX(0deg)}50%{transform:translateX(-10px) skewX(-5deg)}}
@keyframes emoteDabBody{0%,100%{transform:rotate(-12deg) translateY(0)}50%{transform:rotate(-22deg) translateY(-4px) translateX(4px)}}
@keyframes emoteMusicBody{0%,100%{transform:rotate(-6deg) translateY(0)}50%{transform:rotate(7deg) translateY(-5px)}}
@keyframes emoteSparkleBody{0%,100%{transform:scale(1) rotate(0)}50%{transform:scale(1.08) rotate(4deg)}}
@keyframes emoteFacepalmBody{0%,100%{transform:rotate(0)}50%{transform:rotate(-14deg) translateY(4px)}}
@keyframes emoteShrugBody{0%,100%{transform:translateY(0) rotate(0)}50%{transform:translateY(-5px) rotate(3deg)}}
@keyframes emoteHeartBody{0%,100%{transform:scale(1)}50%{transform:scale(1.09) translateY(-4px)}}
@keyframes emoteHeroBody{0%,100%{transform:rotate(-3deg) translateY(0)}50%{transform:rotate(3deg) translateY(-5px) scale(1.04)}}
@keyframes emoteSleepyBody{0%,100%{transform:rotate(-7deg) translateY(0)}50%{transform:rotate(7deg) translateY(3px)}}
@keyframes emotePanicBody{0%{transform:translateX(-4px) rotate(-4deg)}50%{transform:translateX(4px) rotate(4deg)}100%{transform:translateX(-4px) rotate(-4deg)}}
@keyframes emoteCoinBody{0%,100%{transform:translateY(0) rotate(0)}50%{transform:translateY(-8px) rotate(7deg)}}
@keyframes emoteGhostBody{0%,100%{transform:translateY(0) rotate(-2deg)}50%{transform:translateY(-12px) rotate(2deg)}}

/* Sandbox simplified layout pass */
.sandbox-heading-compact { margin-bottom: 14px; }
.sandbox-heading-compact h2 { margin-bottom: 8px; }
.simplified-toolbar { display: grid; gap: 10px; }
.primary-toolbar-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.primary-toolbar-actions .pixel-btn,
.primary-toolbar-actions .secondary-link { min-height: 38px; }
.toolbar-more { border: 1px solid rgba(124,244,255,.16); border-radius: 14px; background: rgba(255,255,255,.025); padding: 8px 10px; }
.toolbar-more summary,
.sandbox-collapsible-panel summary,
.catalogue-advanced summary,
.sandbox-side-details summary { cursor: pointer; color: #f2fbff; font-weight: 700; list-style-position: inside; }
.toolbar-more .slot-actions { margin-top: 10px; }
.controls-copy { font-size: .92rem; }
.sandbox-collapsible-panel { padding: 0; overflow: hidden; }
.sandbox-collapsible-panel > summary { padding: 16px 18px; background: rgba(255,255,255,.035); border-bottom: 1px solid rgba(124,244,255,.12); }
.sandbox-collapsible-panel > section { margin: 0; padding: 16px 18px; border-top: 1px solid rgba(255,255,255,.06); }
.sandbox-collapsible-panel:not([open]) > summary { border-bottom: 0; }
.sandbox-panel-title-row { display:flex; justify-content:space-between; align-items:center; gap:10px; margin-bottom: 10px; }
.sandbox-panel-title-row h3 { margin: 0; }
.catalogue-advanced { border: 1px solid rgba(124,244,255,.14); border-radius: 14px; padding: 10px 12px; background: rgba(255,255,255,.025); margin: 10px 0 12px; }
.catalogue-advanced > label:first-of-type { margin-top: 10px; }
.sandbox-side-details { margin-top: 16px; border-top: 1px solid rgba(124,244,255,.14); padding-top: 12px; }
.sandbox-side-details > summary { margin-bottom: 12px; }
.sandbox-side-details h3 { margin-top: 14px; }
.sandbox-left-panel > .muted-copy:first-of-type { display:none; }
.sandbox-toolbar .sandbox-quality-control { margin-left: 0; }
.sandbox-quality-control { display:flex; gap:8px; align-items:center; }
.sandbox-quality-control select { min-height: 36px; }
@media (max-width: 980px) {
  .sandbox-layout { grid-template-columns: 1fr; }
  .sandbox-world-panel { order: 1; }
  .sandbox-right-panel { order: 2; }
  .sandbox-left-panel { order: 3; }
  .sandbox-left-panel { max-height: 58vh; overflow:auto; }
  .sandbox-collapsible-panel[open] { max-height: 50vh; overflow:auto; }
  .primary-toolbar-actions { display:grid; grid-template-columns: 1fr 1fr; }
  .primary-toolbar-actions .sandbox-quality-control { grid-column: 1 / -1; }
}
@media (max-width: 560px) {
  .primary-toolbar-actions { grid-template-columns: 1fr; }
  .toolbar-more .slot-actions { display:grid; grid-template-columns: 1fr 1fr; }
  .sandbox-status { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .sandbox-status > div:first-child { grid-column: 1 / -1; }
}

/* Next-level sandbox systems */
.empire-app{display:grid;gap:18px}.empire-stat-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(160px,1fr));gap:12px}.trade-history-hint{margin-top:12px;padding:12px;border:1px solid rgba(124,244,255,.16);border-radius:14px;background:rgba(255,255,255,.04);display:grid;gap:4px}.sandbox-emote-wheel{position:fixed;inset:0;z-index:1000;display:grid;place-items:center;background:rgba(2,6,16,.62);backdrop-filter:blur(5px)}.sandbox-emote-wheel.hidden{display:none}.emote-wheel-inner{position:relative;width:min(420px,92vw);height:min(420px,92vw);border-radius:999px;background:radial-gradient(circle at center,rgba(20,31,58,.96),rgba(7,12,25,.96));border:1px solid rgba(124,244,255,.28);box-shadow:0 28px 80px rgba(0,0,0,.45);display:grid;place-items:center}.emote-wheel-inner>strong{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);text-align:center;max-width:120px}.emote-wheel-close{position:absolute;right:18px;top:18px;border:0;border-radius:999px;width:34px;height:34px;background:rgba(255,255,255,.12);color:#fff;font-size:22px}.emote-wheel-item{position:absolute;left:50%;top:50%;width:92px;min-height:72px;margin:-36px 0 0 -46px;transform:rotate(calc(360deg / var(--n) * var(--i))) translate(150px) rotate(calc(-360deg / var(--n) * var(--i)));border-radius:18px;border:1px solid rgba(124,244,255,.25);background:rgba(18,29,52,.94);color:#fff;display:grid;place-items:center;padding:8px;cursor:pointer}.emote-wheel-item span{font-size:24px}.emote-wheel-item small{font-size:.75rem;line-height:1.1}.emote-wheel-item:hover{box-shadow:0 0 0 2px rgba(255,214,77,.35);transform:rotate(calc(360deg / var(--n) * var(--i))) translate(150px) rotate(calc(-360deg / var(--n) * var(--i))) scale(1.06)}.commercial-entry{border-left:3px solid rgba(255,214,77,.7)}.sandbox-build-mode .sandbox-left-panel{box-shadow:0 0 0 2px rgba(124,244,255,.24),0 24px 70px rgba(0,0,0,.32)}.sandbox-build-mode .sandbox-world-stage{box-shadow:0 0 0 2px rgba(45,207,145,.22),inset 0 0 0 1px rgba(255,255,255,.04)}.seasonal-event-badge{display:inline-flex;gap:6px;align-items:center;padding:6px 10px;border-radius:999px;background:rgba(255,214,77,.12);border:1px solid rgba(255,214,77,.24)}
@media (max-width: 820px){.emote-wheel-item{width:74px;min-height:60px;margin:-30px 0 0 -37px;transform:rotate(calc(360deg / var(--n) * var(--i))) translate(118px) rotate(calc(-360deg / var(--n) * var(--i)))}.emote-wheel-item:hover{transform:rotate(calc(360deg / var(--n) * var(--i))) translate(118px) rotate(calc(-360deg / var(--n) * var(--i))) scale(1.04)}}


/* Leaderboard period boards */
.leaderboard-period-panel {
  margin-top: 22px;
  display: grid;
  gap: 14px;
}
.leaderboard-scope-control{display:flex;align-items:end;justify-content:space-between;gap:18px;margin:0 0 16px;padding:18px 20px;background:linear-gradient(120deg,rgba(0,229,255,.1),rgba(12,19,43,.72) 42%,rgba(255,214,77,.06));border-color:rgba(0,229,255,.34);box-shadow:inset 0 1px 0 rgba(255,255,255,.12),0 15px 34px rgba(0,0,0,.18)}.leaderboard-scope-control label{display:grid;gap:8px;min-width:min(100%,380px)}.leaderboard-scope-control .eyebrow{margin:0;color:var(--neon-yellow)}.leaderboard-select-shell{position:relative;display:block}.leaderboard-select-shell::after{content:'⌄';position:absolute;right:14px;top:50%;z-index:1;color:var(--neon-yellow);font-family:'Press Start 2P',cursive;font-size:15px;line-height:1;transform:translateY(-57%);pointer-events:none;text-shadow:0 0 12px rgba(255,214,77,.7)}.leaderboard-scope-control select{width:100%;min-height:52px;appearance:none;-webkit-appearance:none;padding:0 48px 0 16px;border:2px solid rgba(0,229,255,.58);border-radius:12px;background:linear-gradient(145deg,rgba(22,48,85,.96),rgba(6,12,30,.98));box-shadow:inset 0 1px 0 rgba(255,255,255,.14),inset 0 -12px 20px rgba(0,0,0,.2),0 0 0 1px rgba(0,0,0,.32);color:#f5fbff;font-family:'VT323',monospace;font-size:1.35rem;letter-spacing:.02em;cursor:pointer;transition:border-color .18s ease,box-shadow .18s ease,transform .18s ease}.leaderboard-scope-control select:hover{border-color:var(--neon-yellow);box-shadow:inset 0 1px 0 rgba(255,255,255,.2),0 0 0 3px rgba(255,214,77,.12),0 10px 20px rgba(0,0,0,.2);transform:translateY(-1px)}.leaderboard-scope-control select:focus{outline:0;border-color:var(--neon-yellow);box-shadow:0 0 0 4px rgba(0,229,255,.2),0 0 22px rgba(0,229,255,.2),inset 0 1px 0 rgba(255,255,255,.2)}.leaderboard-scope-control select option{background:#111c39;color:#f5fbff}.leaderboard-scope-control .muted-copy{margin:0;max-width:420px;padding:10px 12px;border-left:3px solid rgba(255,214,77,.72);background:rgba(255,255,255,.035)}
.leaderboard-tabbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}
.leaderboard-tabbar button.active {
  box-shadow: 0 0 0 2px rgba(0,229,255,.25), 3px 3px 0 #000;
}
.leaderboard-period-title {
  display: inline-flex;
  width: fit-content;
  border: 2px solid rgba(0,229,255,.35);
  border-radius: 12px;
  padding: 10px 12px;
  background: rgba(0,229,255,.08);
  color: var(--neon-yellow);
  font-family: 'Press Start 2P', cursive;
  font-size: 10px;
}
.period-leaderboard-row {
  border-left: 4px solid var(--neon-yellow);
}
@media (max-width: 720px) {
  .leaderboard-scope-control{align-items:stretch;flex-direction:column}
  .leaderboard-tabbar {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .leaderboard-tabbar.metric-tabs {
    grid-template-columns: 1fr 1fr;
  }
  .leaderboard-tabbar button {
    width: 100%;
  }
}

/* Avatar visual rollback: keep the shared motion rig, but restore the original
   pixel-art scale and exact overlay geometry used by the working wearables. */
.avatar-depth-scene {
  perspective: none;
  transform-style: flat;
  transform: none !important;
  transition: none;
}
.avatar-depth-scene::before,
.avatar-preview::before,
.avatar-preview::after { display: none !important; }
.avatar-preview {
  perspective: none;
  transform-style: flat;
  image-rendering: pixelated;
}
.avatar-rig { transform-style: flat; }
.avatar-rig .avatar-base-img {
  transform: none !important;
  filter: none !important;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}
.avatar-rig .avatar-wearable-img {
  transform: none !important;
  filter: none !important;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}
.avatar-rig .avatar-wearable-img.wear-hat { transform: translateY(-13%) scale(.96) !important; }
.avatar-preview.giant .avatar-rig .avatar-wearable-img.wear-hat { transform: translateY(-15%) scale(.98) !important; }
.avatar-rig .avatar-wearable-img.wear-face { transform: translateY(-3%) !important; }
.avatar-rig .avatar-wearable-img.wear-accessory { transform: scale(1.02) !important; }
.avatar-preview:hover .avatar-depth-scene { transform: none !important; }
.avatar-preview:hover .avatar-base-img { transform: none !important; filter: none !important; }
.item-preview { perspective: none; border-radius: 0; }
.item-preview img,
.wearable-preview img,
.item-card:hover .item-preview img {
  transform: none !important;
  filter: none !important;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}
