:root {
  --bg: #1d150e;
  --panel: #2b2016;
  --panel-2: #3a2b1e;
  --line: #5e4730;
  --text: #f6ead0;
  --muted: #c4ad88;
  --pink: #c8463b;
  --teal: #3f9c94;
  --yellow: #e3b64c;
  --lime: #7fb35a;
  --orange: #d98a3d;
  --topbar-h: 60px;
}

* { box-sizing: border-box; margin: 0; }
html, body { height: 100%; }
body {
  display: flex;
  flex-direction: column;
  height: 100dvh;
  overflow: hidden;
  background: var(--bg);
  color: var(--text);
  font: 400 15px/1.45 Inter, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}
button { font: inherit; color: inherit; }
[hidden] { display: none !important; }
.ico {
  width: 20px; height: 20px; flex: none;
  fill: none; stroke: currentColor; stroke-width: 1.8;
  stroke-linecap: round; stroke-linejoin: round;
}

/* ---------- Top bar ---------- */
.topbar {
  height: var(--topbar-h);
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 0 20px;
  background: linear-gradient(#3a2b1e, #2b2016);
  border-bottom: 2px solid #8a6a3d;
  box-shadow: 0 2px 0 rgba(0, 0, 0, .25);
  z-index: 40;
}
.logo {
  display: flex; align-items: center; gap: 10px;
  color: var(--text); text-decoration: none;
  font-family: Cinzel, Georgia, serif; font-size: 19px; letter-spacing: .5px;
}
.logo b { color: var(--pink); font-weight: 400; }
.logo-mark {
  width: 34px; height: 34px; border-radius: 10px;
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--pink), var(--orange));
  color: #1d150e; font-size: 18px;
}
.topnav { justify-self: center; display: flex; gap: 2px; }
.topnav a {
  color: var(--muted); text-decoration: none;
  font-size: 14px; font-weight: 600;
  padding: 8px 12px; border-radius: 8px;
}
.topnav a:hover, .topnav a.active { color: var(--text); background: var(--panel-2); }
.top-actions { justify-self: end; display: flex; align-items: center; gap: 10px; }
.chip {
  display: flex; align-items: center; gap: 6px;
  height: 36px; padding: 0 12px;
  border: 1px solid var(--line); border-radius: 999px;
  background: var(--panel); color: var(--muted);
  font-size: 13px; font-weight: 600; cursor: pointer;
}
.chip .ico { width: 16px; height: 16px; color: var(--yellow); }
.chip:hover { color: var(--text); }
.btn-primary {
  height: 36px; padding: 0 16px;
  border: 0; border-radius: 10px;
  background: var(--pink); color: #1d150e;
  font-weight: 700; font-size: 14px; cursor: pointer;
}
.btn-primary:hover { filter: brightness(1.1); }
.btn-primary:disabled { opacity: .4; cursor: not-allowed; filter: none; }
.icon-btn {
  width: 36px; height: 36px;
  display: grid; place-items: center;
  border: 0; border-radius: 10px;
  background: transparent; color: var(--muted); cursor: pointer;
}
.icon-btn:hover { background: var(--panel-2); color: var(--text); }

/* ---------- Main / city ---------- */
main { position: relative; flex: 1; min-height: 0; }
.city, .room { position: absolute; inset: 0; }
.scene-wrap {
  position: absolute; inset: 0;
  overflow-x: auto; overflow-y: hidden;
  background: #110927;
}
.scene { display: block; width: 100%; height: 100%; }

.decor { pointer-events: none; }
.sign { font-family: Cinzel, Georgia, serif; text-anchor: middle; letter-spacing: 2px; }
.bld {
  cursor: pointer; outline: none;
  transform-box: fill-box; transform-origin: 50% 100%;
  transition: transform .25s ease, filter .25s ease;
}
.bld:hover, .bld:focus-visible {
  transform: translateY(-6px);
  filter: drop-shadow(0 0 16px var(--glow));
}
.enter-tag { opacity: 0; transition: opacity .2s; }
.bld:hover .enter-tag, .bld:focus-visible .enter-tag { opacity: 1; }
.enter-tag rect { fill: var(--glow); }
.enter-tag text {
  fill: #12061c; font: 700 13px Inter, sans-serif; letter-spacing: 2px;
  text-anchor: middle; dominant-baseline: central;
}
.beacon { animation: blink 1.6s steps(1) infinite; }
@keyframes blink { 50% { opacity: .15; } }

/* ---------- Room ---------- */
.room {
  --accent: var(--pink);
  overflow: clip; /* the wide floor must never become scrollable, even by scrollIntoView */
  background:
    radial-gradient(110% 70% at 50% 0%, color-mix(in srgb, var(--accent) 32%, #2a1e14) 0%, #2a1e14 58%, #1a120b 100%);
}
.room-floor {
  position: absolute; left: -50%; right: -50%; bottom: -8%; height: 55%;
  background-image:
    linear-gradient(color-mix(in srgb, var(--accent) 60%, transparent) 2px, transparent 2px),
    linear-gradient(90deg, color-mix(in srgb, var(--accent) 60%, transparent) 2px, transparent 2px);
  background-size: 80px 80px;
  transform: perspective(500px) rotateX(62deg);
  transform-origin: 50% 100%;
  opacity: .35;
  -webkit-mask-image: linear-gradient(to top, #000 30%, transparent);
          mask-image: linear-gradient(to top, #000 30%, transparent);
}
.back-btn {
  position: absolute; top: 18px; left: 20px; z-index: 2;
  display: flex; align-items: center; gap: 4px;
  height: 38px; padding: 0 14px 0 10px;
  border: 1px solid var(--line); border-radius: 10px;
  background: rgba(43, 31, 21, .8); color: var(--text);
  text-decoration: none; font-weight: 600; font-size: 14px;
}
.back-btn:hover { border-color: var(--accent); }
.room-inner {
  position: relative; height: 100%; overflow-y: auto;
  display: flex; flex-direction: column; align-items: center;
  gap: 6px; padding: 64px 20px 110px; text-align: center;
}
.room-title {
  font-family: Cinzel, Georgia, serif; font-weight: 400;
  font-size: clamp(38px, 7vw, 80px); line-height: 1.1; letter-spacing: 3px;
  color: #fff; outline: none;
  text-shadow: 0 3px 0 #1d150e, 0 0 22px color-mix(in srgb, var(--accent) 45%, transparent);
}
.room-sub { color: var(--muted); }
.room-empty {
  flex: 1; width: min(860px, 100%); max-height: 380px; min-height: 160px;
  margin-top: 24px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  border: 2px dashed color-mix(in srgb, var(--accent) 55%, transparent);
  border-radius: 20px;
  background: rgba(29, 21, 14, .55);
  backdrop-filter: blur(4px);
  color: var(--muted);
}
.room-empty .ico { width: 40px; height: 40px; color: var(--accent); margin-bottom: 4px; }
.room-empty strong { color: var(--text); font-size: 18px; }

/* Casino game tiles and embedded game */
.game-grid {
  width: min(860px, 100%); margin-top: 24px;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px;
}
.game-card {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 28px 20px 22px;
  border: 1px solid color-mix(in srgb, var(--game) 45%, var(--line)); border-radius: 20px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--game) 18%, rgba(29, 21, 14, .7)), rgba(29, 21, 14, .78));
  backdrop-filter: blur(4px);
  color: var(--text); text-decoration: none; outline: none;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.game-card:hover, .game-card:focus-visible {
  transform: translateY(-4px);
  border-color: var(--game);
  box-shadow: 0 0 0 1px var(--game), 0 18px 40px -12px var(--game);
}
.game-card img { width: 72px; height: 72px; object-fit: contain; margin-bottom: 6px; border-radius: 16px; }
.game-card strong { font-family: Cinzel, Georgia, serif; font-weight: 400; font-size: 26px; letter-spacing: 1px; }
.game-card span { color: var(--muted); font-size: 14px; }
.game-card em {
  margin-top: 12px; padding: 9px 28px; border-radius: 10px;
  background: var(--game); color: #fff;
  font-style: normal; font-weight: 700; font-size: 14px;
}
.game-view {
  position: absolute; inset: 0; z-index: 3;
  display: flex; flex-direction: column;
  padding-bottom: 88px; /* keep the game clear of the player dock */
  background: var(--bg);
}
.game-bar {
  display: flex; align-items: center; gap: 14px;
  height: 52px; padding: 0 16px; flex: none;
  background: var(--panel); border-bottom: 1px solid var(--line);
}
.game-bar .back-btn { position: static; height: 34px; }
.game-bar strong { font-family: Cinzel, Georgia, serif; font-weight: 400; font-size: 16px; letter-spacing: 1px; }
.game-view iframe { flex: 1; width: 100%; border: 0; background: #000; }

/* Marketplace */
.market { width: min(1100px, 100%); margin-top: 20px; text-align: left; }
.market h3 { font-size: 16px; font-weight: 700; margin: 0; }
.market-tabs {
  display: inline-flex; gap: 4px; padding: 4px; margin-bottom: 18px;
  border: 1px solid var(--line); border-radius: 12px; background: rgba(29, 21, 14, .7);
}
.market-tabs button {
  padding: 8px 20px; border: 0; border-radius: 9px;
  background: transparent; color: var(--muted); font-weight: 600; cursor: pointer;
}
.market-tabs button[aria-selected="true"] { background: var(--accent); color: #1d150e; }
.market-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip-btn {
  padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px;
  background: rgba(29, 21, 14, .6); color: var(--muted); font-size: 13px; font-weight: 600; cursor: pointer;
}
.chip-btn[aria-pressed="true"] { border-color: var(--accent); color: var(--text); background: color-mix(in srgb, var(--accent) 16%, transparent); }
.sort { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; }
.market select, .market input {
  height: 38px; padding: 0 10px;
  border: 1px solid var(--line); border-radius: 10px;
  background: var(--bg); color: var(--text); font: inherit; font-size: 14px;
}
.listing-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
.market-meta { color: var(--muted); font-size: 13px; margin: -6px 0 12px; }
.market-toolbar .chips + .chips { width: 100%; order: 2; }
.chip-btn.set[aria-pressed="true"] { border-color: var(--yellow); background: rgba(255, 210, 63, .14); }
.listing.from-player { border-color: rgba(34, 228, 217, .55); box-shadow: 0 0 0 1px rgba(34, 228, 217, .25); }
.seller small { color: var(--muted); }
.get-it { margin-top: 4px; font-size: 12px; font-weight: 600; color: var(--accent); text-decoration: none; }
.get-it:hover { text-decoration: underline; }
.collections { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.collection { padding: 16px; border: 1px solid var(--line); border-radius: 16px; background: rgba(36, 27, 18, .85); display: flex; flex-direction: column; gap: 8px; }
.collection.complete { border-color: var(--yellow); box-shadow: 0 0 22px -8px var(--yellow); }
.collection header { display: flex; justify-content: space-between; align-items: baseline; }
.collection header span { color: var(--yellow); font-weight: 700; }
.collection-items { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.col-item { --r: var(--muted); aspect-ratio: 1; display: grid; place-items: center; border-radius: 10px; background: #21180f; border: 1px solid var(--line); filter: grayscale(1) brightness(.45); }
.col-item.have { filter: none; border-color: var(--r); box-shadow: inset 0 0 12px -4px var(--r); }
.col-item svg { width: 80%; height: 80%; }
.listing {
  display: flex; flex-direction: column;
  border: 1px solid var(--line); border-radius: 16px; overflow: hidden;
  background: rgba(36, 27, 18, .85);
}
.item-art {
  --r: var(--muted);
  display: grid; place-items: center; aspect-ratio: 16 / 10;
  background: radial-gradient(circle at 50% 45%, color-mix(in srgb, var(--r) 35%, transparent), transparent 70%), #21180f;
  color: var(--r);
}
.item-art .ico { width: 44px; height: 44px; stroke-width: 1.4; filter: drop-shadow(0 0 10px var(--r)); }
.item-art > svg:not(.ico) { width: 64px; height: 64px; filter: drop-shadow(0 0 10px var(--r)); }
.my-row .item-art > svg:not(.ico) { width: 36px; height: 36px; }
.r-common { --r: #cfc6b2; } .r-rare { --r: #4fb3e6; } .r-epic { --r: #b07ae8; } .r-legendary { --r: #f2a33a; }
.listing-body { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px 0; flex: 1; }
.rarity { color: var(--r); font-size: 12px; font-weight: 700; }
.listing-body strong { font-size: 15px; }
.seller { color: var(--muted); font-size: 13px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.seller em, .via-badge {
  font-style: normal; font-size: 11px; font-weight: 600;
  padding: 2px 7px; border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent);
}
.listing-foot { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px 14px; }
.listing-foot b { font-size: 16px; }
.btn-buy {
  height: 32px; padding: 0 16px; border: 0; border-radius: 9px;
  background: var(--accent); color: #1d150e; font-weight: 700; cursor: pointer;
}
.btn-buy:disabled { opacity: .45; cursor: not-allowed; }
.tag-mine { font-size: 12px; font-weight: 700; color: var(--accent); }
.btn-ghost {
  display: inline-flex; align-items: center; gap: 6px; flex: none;
  height: 36px; padding: 0 14px;
  border: 1px solid var(--line); border-radius: 10px;
  background: rgba(58, 43, 30, .6); color: var(--text);
  font-size: 13px; font-weight: 600; text-decoration: none; cursor: pointer;
}
.btn-ghost:hover:not(:disabled) { border-color: var(--accent); }
.btn-ghost:disabled { color: var(--muted); cursor: not-allowed; }
.btn-ghost em {
  font-style: normal; font-size: 10px; font-weight: 700;
  padding: 2px 6px; border-radius: 999px; background: var(--bg); color: var(--muted);
}
.btn-link { margin-top: 18px; border: 0; background: none; color: var(--muted); font-size: 13px; text-decoration: underline; cursor: pointer; }
.shop-locked, .shop, .list-form {
  border: 1px solid var(--line); border-radius: 18px; background: rgba(36, 27, 18, .85); padding: 22px;
}
.shop-locked-head { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 18px; }
.shop-locked-head p { color: var(--muted); margin-top: 4px; }
.shop-lock {
  width: 46px; height: 46px; border-radius: 12px; flex: none;
  display: grid; place-items: center; background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--accent);
}
.unlocks { display: grid; gap: 10px; }
.unlock {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 14px;
  padding: 14px 16px; border: 1px solid var(--line); border-radius: 14px; background: rgba(29, 21, 14, .6);
}
.unlock strong { display: block; }
.unlock small { color: var(--muted); font-size: 13px; }
.unlock-n {
  width: 30px; height: 30px; border-radius: 50%;
  display: grid; place-items: center;
  border: 1px solid var(--accent); color: var(--accent); font-weight: 700; font-size: 14px;
}
.demo-row {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px;
  margin-top: 18px; padding-top: 16px; border-top: 1px dashed var(--line);
  color: var(--muted); font-size: 13px;
}
.shop { display: flex; flex-direction: column; gap: 16px; }
.shop-head { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px 18px; }
.shop-name { display: flex; flex-direction: column; gap: 6px; color: var(--muted); font-size: 12px; font-weight: 600; }
.shop-name input { width: 220px; font-weight: 700; }
.via-badge { align-self: center; }
.shop-stats { display: flex; gap: 16px; margin-left: auto; color: var(--muted); font-size: 13px; }
.shop-stats b { color: var(--text); font-size: 16px; }
.list-form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; padding: 18px; background: rgba(29, 21, 14, .6); }
.list-form h3 { width: 100%; }
.list-form label { display: flex; flex-direction: column; gap: 6px; color: var(--muted); font-size: 12px; font-weight: 600; }
.list-form label:first-of-type { flex: 1; min-width: 200px; }
.list-form input { width: 120px; }
.list-form .btn-primary { height: 38px; background: var(--accent); color: #1d150e; }
.my-list { display: grid; gap: 8px; }
.my-row {
  display: grid; grid-template-columns: 56px 1fr auto auto; align-items: center; gap: 14px;
  padding: 8px 12px 8px 8px; border: 1px solid var(--line); border-radius: 12px; background: rgba(29, 21, 14, .6);
}
.my-row .item-art { aspect-ratio: 1; border-radius: 9px; }
.my-row .item-art .ico { width: 26px; height: 26px; }
.my-row small { display: block; }

/* ---------- Dock ---------- */
.dock {
  position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%);
  display: flex; gap: 4px; padding: 6px;
  background: rgba(43, 31, 21, .9);
  backdrop-filter: blur(10px);
  border: 1px solid var(--line); border-radius: 16px;
  z-index: 20;
}
.dock button {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  min-width: 84px; padding: 8px 10px;
  border: 0; border-radius: 11px;
  background: transparent; color: var(--muted);
  font-size: 12px; font-weight: 600; cursor: pointer;
}
.dock button .ico { width: 22px; height: 22px; }
.dock button:hover { background: var(--panel-2); color: var(--text); }
.dock button[aria-pressed="true"] { background: var(--panel-2); color: var(--text); box-shadow: inset 0 0 0 1px var(--pink); }

/* ---------- Drawer ---------- */
.drawer {
  position: absolute; top: 0; right: 0; bottom: 0;
  width: min(400px, 100%);
  display: flex; flex-direction: column;
  background: var(--panel);
  border-left: 1px solid var(--line);
  box-shadow: -24px 0 48px rgba(0, 0, 0, .45);
  z-index: 30;
  animation: slide-in .22s ease;
}
@keyframes slide-in { from { transform: translateX(24px); opacity: 0; } }
.drawer-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 14px 14px 20px;
  border-bottom: 1px solid var(--line);
}
.drawer-head h2 { font-size: 17px; font-weight: 700; }
.drawer-body { flex: 1; min-height: 0; overflow-y: auto; padding: 20px; }
.panel h3 {
  margin: 22px 0 10px;
  font-size: 12px; font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase;
  color: var(--muted);
}
.panel-meta { color: var(--muted); font-size: 13px; margin-bottom: 12px; }
.empty-line {
  padding: 14px; border: 1px dashed var(--line); border-radius: 12px;
  color: var(--muted); font-size: 14px; text-align: center;
}

/* Character */
.who { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.who-avatar {
  width: 44px; height: 44px; border-radius: 12px;
  display: grid; place-items: center;
  background: var(--panel-2); color: var(--muted);
}
.who strong { display: block; }
.who small { color: var(--muted); font-size: 13px; }
.equip { display: grid; grid-template-columns: 76px 1fr 76px; gap: 10px; align-items: center; }
.equip-col { display: flex; flex-direction: column; gap: 10px; }
.slot {
  aspect-ratio: 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  border: 1px dashed #6e5538; border-radius: 12px;
  background: rgba(58, 43, 30, .6);
  color: #a88d66; font-size: 11px; font-weight: 600;
}
.slot .ico { width: 24px; height: 24px; }
.mannequin { width: 100%; max-height: 330px; fill: #4a3826; stroke: #7a5d3d; stroke-width: 1.5; }

/* Backpack */
.bag-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.bag-grid span {
  aspect-ratio: 1; border-radius: 10px;
  border: 1px dashed #5e4730; background: rgba(58, 43, 30, .5);
}

/* Chat */
.panel.chat { display: flex; flex-direction: column; height: 100%; }
.chat-log { flex: 1; min-height: 240px; display: flex; flex-direction: column; gap: 10px; overflow-y: auto; padding: 4px 2px 12px; }
.chat-log .empty-state { margin: auto; }
.chat-online { color: var(--lime); font-size: 12px; font-weight: 600; margin-bottom: 10px; }
.msg { max-width: 92%; padding: 8px 12px; border-radius: 12px 12px 12px 4px; background: var(--panel-2); }
.msg.mine { align-self: flex-end; border-radius: 12px 12px 4px 12px; background: rgba(255, 210, 63, .12); }
.msg b { font-size: 13px; }
.msg time { margin-left: 8px; color: var(--muted); font-size: 11px; }
.msg p { margin-top: 2px; font-size: 14px; overflow-wrap: anywhere; }
.dock button[data-badge] { position: relative; }
.dock button[data-badge]::after {
  content: attr(data-badge); position: absolute; top: 2px; right: 14px;
  min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
  background: var(--pink); color: #1d150e; font-size: 11px; font-weight: 800; line-height: 18px;
}
.who-name { display: flex; flex-direction: column; gap: 4px; flex: 1; min-width: 0; }
.who-name label { color: var(--muted); font-size: 12px; font-weight: 600; }
.who-name input {
  height: 38px; padding: 0 10px; border: 1px solid var(--line); border-radius: 10px;
  background: var(--bg); color: var(--text); font: 700 15px Inter, system-ui, sans-serif;
}
.who-name input:focus { outline: none; border-color: var(--yellow); }
.who-name small { color: var(--muted); font-size: 12px; }
.empty-state { display: flex; flex-direction: column; align-items: center; gap: 8px; color: var(--muted); }
.empty-state .ico { width: 34px; height: 34px; }
.chat-form { display: flex; gap: 8px; padding-top: 14px; border-top: 1px solid var(--line); }
.chat-form input {
  flex: 1; min-width: 0; height: 40px; padding: 0 12px;
  border: 1px solid var(--line); border-radius: 10px;
  background: var(--bg); color: var(--text); font: inherit;
}
.chat-form input:disabled { opacity: .6; }
.chat-form .btn-primary { height: 40px; }

/* Ranking: your rank card, three numbers, the next rank's rewards, then tabs (Top players · Ranks · Achievements). */
.rk { --rc: var(--yellow); }
.rk-hero {
  position: relative; display: flex; align-items: center; gap: 16px; padding: 18px 16px; border-radius: 18px; overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--rc) 55%, var(--line));
  background: radial-gradient(120% 140% at 0% 0%, color-mix(in srgb, var(--rc) 30%, transparent), transparent 60%), rgba(255, 255, 255, .04);
}
.rk-medal {
  position: relative; flex: none; width: 68px; height: 68px; border-radius: 50%; display: grid; place-items: center;
  background: radial-gradient(circle at 35% 30%, color-mix(in srgb, var(--rc) 45%, #fff), var(--rc) 55%, color-mix(in srgb, var(--rc) 60%, #000));
  box-shadow: 0 0 0 3px rgba(0, 0, 0, .25), 0 0 22px -2px var(--rc); color: rgba(20, 8, 31, .85);
}
.rk-medal .ico { width: 30px; height: 30px; }
.rk-medal b {
  position: absolute; right: -4px; bottom: -4px; min-width: 24px; height: 24px; padding: 0 6px; border-radius: 999px; display: grid; place-items: center;
  background: #14081f; color: var(--rc); border: 2px solid var(--rc); font-size: 12px; font-weight: 900;
}
.rk-me { flex: 1; min-width: 0; }
.rk-me small { display: block; color: var(--muted); font-size: 12px; }
.rk-me strong { display: block; font: 600 26px/1.1 var(--head, Inter), sans-serif; letter-spacing: 1px; text-transform: uppercase; color: #fff; }
.rk-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 10px; }
.rk-stats div { padding: 10px 6px; border-radius: 12px; border: 1px solid var(--line); background: rgba(255, 255, 255, .04); text-align: center; }
.rk-stats b { display: block; font-size: 18px; font-weight: 800; color: #fff; font-variant-numeric: tabular-nums; }
.rk-stats small { color: var(--muted); font-size: 10.5px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; }
.rk-next { margin-top: 10px; padding: 10px 12px; border-radius: 12px; border: 1px dashed color-mix(in srgb, var(--rc) 70%, transparent); background: color-mix(in srgb, var(--rc) 8%, transparent); }
.rk-next small { color: var(--muted); font-size: 12.5px; }
.rk-next b { color: var(--rc); }
.rk-next ul, .rk-step ul { list-style: none; padding: 0; margin: 6px 0 0; display: flex; flex-wrap: wrap; gap: 5px; }
.rk-next li, .rk-step li { font-size: 11.5px; padding: 3px 9px; border-radius: 999px; border: 1px solid var(--line); background: rgba(0, 0, 0, .18); }
.rk-tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; margin: 14px 0 12px; padding: 4px; border-radius: 12px; border: 1px solid var(--line); background: rgba(0, 0, 0, .2); }
.rk-tabs button { height: 34px; border: 0; border-radius: 9px; background: none; color: var(--muted); font-weight: 700; font-size: 12.5px; cursor: pointer; }
.rk-tabs button[aria-selected="true"] { background: var(--panel-2); color: #fff; box-shadow: inset 0 0 0 1px var(--yellow); }

/* Top players */
.rk-podium { display: grid; grid-template-columns: 1fr 1.12fr 1fr; align-items: end; gap: 6px; margin-bottom: 10px; }
.rk-place { display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 0; text-align: center; }
.rk-place b { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; color: #fff; }
.rk-place em { font-style: normal; font-size: 11.5px; font-weight: 700; color: var(--muted); }
.rk-crown { font-size: 22px; line-height: 1; }
.rk-block {
  width: 100%; margin-top: 6px; display: grid; place-items: center; border-radius: 10px 10px 4px 4px;
  font: 700 22px var(--head, Inter), sans-serif; color: rgba(255, 255, 255, .9);
  border: 1px solid color-mix(in srgb, var(--pc) 70%, var(--line)); background: linear-gradient(180deg, color-mix(in srgb, var(--pc) 45%, transparent), rgba(255, 255, 255, .03));
}
.rk-place.p1 { --pc: #f2c14e; } .rk-place.p2 { --pc: #c9d1dc; } .rk-place.p3 { --pc: #d08a4e; }
.rk-place.p1 .rk-block { height: 78px; } .rk-place.p2 .rk-block { height: 58px; } .rk-place.p3 .rk-block { height: 44px; }
.rk-place.p1 .rk-crown { font-size: 28px; }
.rk-place.me .rk-block { box-shadow: 0 0 0 2px var(--yellow); }
.rk-chip {
  display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 10.5px; font-weight: 800; letter-spacing: .5px; text-transform: uppercase;
  color: var(--rc); border: 1px solid color-mix(in srgb, var(--rc) 60%, transparent); background: color-mix(in srgb, var(--rc) 12%, transparent);
}
.ach-list, .leaderboard { list-style: none; padding: 0; display: grid; gap: 6px; }
.leaderboard li:not(.empty-line) {
  display: grid; grid-template-columns: 26px 1fr auto auto; gap: 0 10px; align-items: center;
  padding: 8px 12px; border-radius: 10px; border: 1px solid var(--line); background: rgba(255, 255, 255, .04);
}
.leaderboard .pos { color: var(--muted); font-weight: 800; text-align: center; }
.leaderboard b { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.leaderboard b small, .rk-place b small { color: var(--yellow); font-size: 10.5px; font-weight: 800; text-transform: uppercase; }
.leaderboard em { font-style: normal; font-weight: 700; font-size: 13px; font-variant-numeric: tabular-nums; }
.leaderboard li.me { border-color: var(--yellow); background: rgba(255, 179, 71, .08); }
.leaderboard li.out { margin-top: 6px; border-style: dashed; }

/* Ranks ladder */
.rk-ladder { position: relative; display: grid; gap: 10px; }
.rk-ladder::before { content: ''; position: absolute; left: 17px; top: 18px; bottom: 18px; width: 2px; background: var(--line); }
.rk-step { position: relative; display: grid; grid-template-columns: 36px 1fr; gap: 10px; align-items: start; }
.rk-node {
  position: relative; z-index: 1; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center;
  font-weight: 900; font-size: 14px; color: #14081f; background: var(--rc); border: 3px solid #14081f;
}
.rk-step-body { padding: 8px 12px; border-radius: 12px; border: 1px solid var(--line); background: rgba(255, 255, 255, .04); }
.rk-step-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.rk-step-head b { font-size: 15px; color: #fff; }
.rk-step-head small { color: var(--muted); font-size: 12px; white-space: nowrap; }
.rk-step.done li, .rk-step.now li { border-color: color-mix(in srgb, var(--rc) 60%, transparent); }
.rk-step.now .rk-step-body { border-color: var(--rc); box-shadow: 0 0 18px -6px var(--rc); }
.rk-step.now .rk-node { box-shadow: 0 0 0 3px var(--rc); }
.rk-step.next .rk-step-head small { color: var(--rc); font-weight: 700; }
.rk-step.locked .rk-node { background: rgba(255, 255, 255, .12); color: var(--muted); }
.rk-step.locked .rk-step-body { opacity: .6; }
.rk-step .xp-bar { margin: 6px 0 2px; }
.rk-step.next .xp-bar span { background: var(--rc); }

/* Achievements */
.badge-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px 8px; margin-bottom: 14px; }
.badge-grid .badge { display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 0; }
.badge-grid .badge i {
  width: 100%; max-width: 60px; aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center; font-style: normal;
  border: 1px dashed var(--line); background: rgba(255, 255, 255, .04); color: var(--muted);
}
.badge-grid .badge.on i { border: 2px solid var(--yellow); font-size: 24px; background: radial-gradient(circle, rgba(255, 179, 71, .3), rgba(255, 255, 255, .03)); box-shadow: 0 0 16px -4px var(--yellow); }
.badge-grid .badge small { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 10.5px; color: var(--muted); }
.badge-grid .badge.on small { color: #fff; }
.ach-list li:not(.empty-line) {
  display: grid; grid-template-columns: 30px 1fr auto; gap: 0 10px; align-items: center;
  padding: 8px 12px; border-radius: 10px; border: 1px solid var(--line); background: rgba(255, 255, 255, .04);
}
.ach-list li i { grid-row: 1 / span 2; font-style: normal; font-size: 20px; text-align: center; }
.ach-list li b { font-size: 14px; }
.ach-list li span { grid-column: 2; color: var(--muted); font-size: 12px; }
.ach-list li em { grid-row: 1 / span 2; grid-column: 3; font-style: normal; font-size: 12px; font-weight: 700; color: var(--muted); }
.ach-list li:not(.done):not(.empty-line) { opacity: .6; }
.ach-list li.done { border-color: color-mix(in srgb, var(--lime) 45%, transparent); }
.ach-list li.done em { color: var(--lime); }
.xp-bar { height: 8px; margin: 8px 0 6px; border-radius: 4px; background: rgba(255, 255, 255, .08); overflow: hidden; }
.xp-bar span { display: block; height: 100%; width: 0; border-radius: 4px; background: linear-gradient(90deg, var(--pink), var(--yellow)); transition: width .5s ease; }

/* Toasts (achievements) */
.toasts { position: fixed; top: 72px; left: 50%; transform: translateX(-50%); z-index: 60; display: grid; justify-items: center; gap: 10px; pointer-events: none; }
.toast {
  display: flex; align-items: center; gap: 12px; min-width: 240px; padding: 12px 16px;
  border-radius: 14px; border: 1px solid var(--yellow); background: rgba(43, 31, 21, .96); color: var(--text);
  box-shadow: 0 12px 30px -10px var(--yellow); animation: toast-in .35s cubic-bezier(.2, 1.4, .4, 1);
}
.toast.out { opacity: 0; transform: translateX(20px); transition: all .4s ease; }
.toast-icon { font-size: 30px; }
.toast small { display: block; color: var(--yellow); font-size: 11px; font-weight: 800; letter-spacing: 1px; text-transform: uppercase; }
.toast b { display: block; font-size: 16px; }
.toast em { font-style: normal; color: var(--lime); font-weight: 700; font-size: 13px; }
@keyframes toast-in { from { opacity: 0; transform: translateX(40px) scale(.9); } }

/* Tour */
.tour { position: fixed; inset: 0; z-index: 70; }
.tour-spot {
  position: fixed; border-radius: 14px; border: 2px solid var(--yellow);
  box-shadow: 0 0 0 9999px rgba(5, 2, 12, .72), 0 0 24px var(--yellow);
  transition: all .35s ease; pointer-events: none;
}
.tour.centered .tour-spot { border-color: transparent; box-shadow: 0 0 0 9999px rgba(5, 2, 12, .72); }
.tour-card {
  position: fixed; width: min(340px, calc(100% - 32px)); padding: 18px; border-radius: 16px;
  background: var(--panel); border: 1px solid var(--line); box-shadow: 0 20px 40px -10px #000; transition: top .35s ease, left .35s ease;
}
.tour.centered .tour-card { left: 50%; top: 50%; transform: translate(-50%, -50%); }
.tour-card small { color: var(--yellow); font-weight: 700; font-size: 12px; }
.tour-card h3 { margin: 4px 0 6px; font-family: Cinzel, Georgia, serif; font-weight: 400; font-size: 20px; }
.tour-card p { color: var(--muted); font-size: 14px; }
.tour-actions { display: flex; align-items: center; gap: 8px; margin-top: 14px; }
.tour-actions .btn-link { margin: 0 auto 0 0; }
.tour-btn { font-weight: 800; font-size: 16px; border: 1px solid var(--line); }

/* ---------- Sign-in modal ---------- */
.modal {
  width: min(400px, calc(100% - 32px));
  margin: auto; padding: 28px 24px 24px;
  border: 1px solid var(--line); border-radius: 18px;
  background: var(--panel); color: var(--text);
}
.modal::backdrop { background: rgba(5, 2, 12, .7); backdrop-filter: blur(3px); }
.modal-close-form { position: absolute; top: 10px; right: 10px; }
.modal h2 { font-size: 20px; margin-bottom: 6px; padding-right: 30px; }
.modal p { color: var(--muted); font-size: 14px; margin-bottom: 20px; }
.login-opt {
  width: 100%; height: 48px; margin-top: 10px; padding: 0 14px;
  display: flex; align-items: center; gap: 12px;
  border: 1px solid var(--line); border-radius: 12px;
  background: var(--panel-2); color: var(--text);
  font-weight: 600; text-align: left; cursor: pointer;
}
.login-opt:hover:not(:disabled) { border-color: var(--yellow); }
.login-opt:disabled { cursor: not-allowed; opacity: .75; }
.login-opt.slim { height: 42px; margin-top: 0; }
.login-google { margin-top: 10px; min-height: 44px; display: flex; justify-content: center; }
.login-google:empty { display: none; }
.login-msg { min-height: 18px; margin: 12px 0 0 !important; font-size: 13px !important; color: var(--muted); }
.login-msg.bad { color: #ef8a7c !important; }
.login-legal { margin: 10px 0 0 !important; font-size: 12px !important; color: var(--muted); }
.login-legal a { color: var(--yellow); }
.login-note { font-size: 12.5px !important; margin: 4px 0 14px !important; }
.account-list { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin: 14px 0 8px; font-size: 14px; }
.account-list dt { color: var(--muted); }
.account-list dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.account-list code { font-size: 12.5px; color: var(--yellow); }
.account-actions { display: grid; gap: 8px; margin-bottom: 16px; }
#signInBtn.signed { background: var(--panel-2); color: var(--text); border: 1px solid var(--yellow); max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.login-opt em {
  margin-left: auto; font-style: normal; font-size: 11px; font-weight: 700;
  padding: 3px 8px; border-radius: 999px; background: var(--bg); color: var(--muted);
}
.g-mark {
  width: 22px; height: 22px; border-radius: 50%;
  display: grid; place-items: center;
  background: #fff; color: #4285f4; font-weight: 800; font-size: 13px;
}
/* Wallet sign-in: the same pill as Google's button above it, with a Solana-coloured mark. */
.login-opt.login-wallet {
  width: min(340px, 100%); height: 44px; margin: 10px auto 0; padding: 0 18px 0 4px; gap: 10px;
  border-radius: 999px; border: 1px solid rgba(153, 69, 255, .55);
  background: linear-gradient(90deg, #1d1033, #2a1648);
  transition: border-color .15s, box-shadow .15s;
}
.login-opt.login-wallet:hover:not(:disabled) { border-color: #14f195; box-shadow: 0 0 14px rgba(153, 69, 255, .45); }
.w-mark {
  flex: none; width: 36px; height: 36px; border-radius: 50%;
  display: grid; place-items: center;
  background: linear-gradient(135deg, #9945ff, #14f195); color: #fff;
}
.w-mark .ico { width: 18px; height: 18px; }
.w-text { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; line-height: 1.2; }
.w-text b { font-size: 14px; font-weight: 600; white-space: nowrap; }
.w-text small { font-size: 11px; color: var(--muted); white-space: nowrap; }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .topnav { display: none; }
}
@media (max-width: 640px) {
  .topbar { padding: 0 16px; gap: 10px; }
  .logo { font-size: 16px; }
  .chip { padding: 0 10px; }
  .scene { min-width: 1000px; }
  .dock {
    left: 0; right: 0; bottom: 0; transform: none;
    border-radius: 0; border-width: 1px 0 0;
    padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
  }
  .dock button { flex: 1; min-width: 0; }
  .room-inner { padding: 72px 16px 96px; }
  .game-view { padding-bottom: calc(70px + env(safe-area-inset-bottom)); }
  .listing-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .unlock { grid-template-columns: auto 1fr; }
  .unlock .btn-ghost { grid-column: 2; justify-self: start; }
  .shop-stats { margin-left: 0; }
  .my-row { grid-template-columns: 48px 1fr auto; }
  .my-row .btn-ghost { grid-column: 2 / -1; justify-self: start; }
  .back-btn { left: 16px; }
}
@media (max-width: 380px) {
  .chip { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* City "Online now" list filled by social.js */
.iso-online li em { margin-left: auto; padding-left: 8px; font-style: normal; font-size: 11px; color: var(--muted); }
.iso-online li.more { color: var(--muted); font-size: 12px; }
.sound-btn { border: 1px solid var(--line); }
.modal-name { padding: 0 34px 16px 0; margin-bottom: 16px; border-bottom: 1px solid var(--line); }

/* ---------- MMO frames (top bar, buttons, action bar) ---------- */
.topbar {
  background:
    repeating-linear-gradient(90deg, rgba(0, 0, 0, .05) 0 2px, transparent 2px 9px),
    linear-gradient(#4d3725, #2e2116 70%, #261b12);
  border-bottom: 0;
  box-shadow: inset 0 -1px 0 #d9b25c, inset 0 -3px 0 #6b4a2a, inset 0 1px 0 rgba(255, 233, 180, .12), 0 4px 14px rgba(0, 0, 0, .45);
}
.logo { text-shadow: 0 2px 0 #1d150e; }
.logo-mark {
  border-radius: 50%; border: 2px solid #6b4a14;
  background: radial-gradient(circle at 35% 30%, #fff0a0, #e3b64c 48%, #a8742a);
  color: #5a3a10; font-family: Cinzel, Georgia, serif; font-weight: 900;
  box-shadow: inset 0 -2px 0 rgba(0, 0, 0, .25), 0 0 0 1px #d9b25c, 0 2px 6px rgba(0, 0, 0, .5);
}
.topnav a { font-family: Cinzel, Georgia, serif; font-weight: 700; letter-spacing: .4px; border-radius: 6px 6px 0 0; }
.topnav a:hover { color: #fff3d0; background: rgba(217, 178, 92, .1); }
.topnav a.active { color: #f3cf63; background: linear-gradient(rgba(217, 178, 92, .22), rgba(217, 178, 92, 0)); box-shadow: inset 0 -2px 0 #f3cf63; text-shadow: 0 0 10px rgba(243, 207, 99, .45); }
.chip { border-color: #8a6a3d; background: linear-gradient(#3a2b1e, #261b12); box-shadow: inset 0 1px 0 rgba(255, 233, 180, .12); }
.chip:hover { border-color: #d9b25c; }
.btn-primary {
  background: linear-gradient(#d8604a, #a83a28); color: #fff3e0;
  border: 1px solid #f3cf63; text-shadow: 0 1px 0 rgba(0, 0, 0, .4);
  box-shadow: inset 0 1px 0 rgba(255, 233, 180, .35), 0 0 0 1px #5a1f16, 0 3px 8px rgba(0, 0, 0, .4);
}
.dock {
  background: linear-gradient(rgba(58, 43, 30, .97), rgba(36, 26, 17, .97));
  border: 1px solid #d9b25c;
  box-shadow: 0 0 0 1px #3a2410, 0 0 0 3px #8a6a3d, inset 0 1px 0 rgba(255, 233, 180, .2), 0 12px 26px -10px rgba(0, 0, 0, .75);
}
.dock button {
  background: radial-gradient(circle at 50% 35%, #3f2f20, #221810);
  border: 1px solid #6b4a2a;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .5), inset 0 3px 8px rgba(0, 0, 0, .45);
  color: #d8c29a;
}
.dock button .ico { color: #e3b64c; filter: drop-shadow(0 1px 0 rgba(0, 0, 0, .6)); }
.dock button:hover { background: radial-gradient(circle at 50% 35%, #4d3a27, #2a1e14); border-color: #d9b25c; color: #fff3d0; }
.dock button:hover .ico { color: #f3cf63; filter: drop-shadow(0 0 6px rgba(243, 207, 99, .6)); }
.dock button[aria-pressed="true"] { background: radial-gradient(circle at 50% 35%, #5a4228, #2e2116); border-color: #f3cf63; color: #fff3d0; box-shadow: inset 0 0 0 1px rgba(243, 207, 99, .35), inset 0 0 14px rgba(243, 207, 99, .25); }
.logo span, .btn-primary, .chip, .topnav a { white-space: nowrap; }
.topnav a { font-size: 13px; padding: 8px 10px; }
@media (max-width: 1100px) { .topnav a { font-size: 12px; padding: 8px 7px; letter-spacing: 0; } }

/* ---------- Wallet (wallet.js): balance in the top bar, deposit / withdraw window ---------- */
.wallet-pill { color: var(--text); }
.wallet-pill b { font-variant-numeric: tabular-nums; }
.wallet-pill span { color: var(--muted); font-size: 11px; }
.wallet-modal { width: min(460px, calc(100% - 32px)); }
.wallet-balance { display: flex; align-items: baseline; gap: 8px; margin: 6px 0 4px; }
.wallet-balance b { font-family: Cinzel, Georgia, serif; font-size: 34px; color: var(--yellow); font-variant-numeric: tabular-nums; }
.wallet-balance span { color: var(--muted); font-weight: 700; }
.modal .wallet-note { font-size: 13px; margin: 6px 0 12px; }
.wallet-signin { margin-top: 8px; }
.wallet-tabs { display: flex; gap: 4px; margin: 14px 0 12px; padding: 4px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); }
.wallet-tabs button {
  flex: 1; height: 34px; border: 0; border-radius: 9px; background: none;
  color: var(--muted); font-weight: 700; font-size: 13px; cursor: pointer;
}
.wallet-tabs button[aria-selected="true"] { background: var(--panel-2); color: var(--text); box-shadow: inset 0 0 0 1px var(--yellow); }
.wallet-address { display: flex; align-items: center; gap: 8px; margin-top: 10px; padding: 10px 12px; border: 1px dashed var(--yellow); border-radius: 12px; background: var(--bg); }
.wallet-address code { flex: 1; min-width: 0; overflow-wrap: anywhere; font-size: 13px; color: var(--yellow); }
.wallet-form { display: grid; gap: 6px; margin-top: 14px; }
.wallet-form label { font-size: 12.5px; color: var(--muted); }
.wallet-form small { font-size: 12px; color: var(--muted); }
.wallet-form input {
  width: 100%; min-width: 0; height: 40px; padding: 0 12px;
  border: 1px solid var(--line); border-radius: 10px; background: var(--bg); color: var(--text); font: inherit; font-size: 14px;
}
.wallet-form input:focus { outline: none; border-color: var(--yellow); }
.wallet-form .btn-primary { margin-top: 6px; height: 42px; }
.wallet-row { display: flex; gap: 8px; }
.wallet-history { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; max-height: 300px; overflow-y: auto; }
.wallet-history li {
  display: grid; grid-template-columns: auto 1fr auto; grid-template-areas: "amt what link" "amt when link"; column-gap: 12px;
  align-items: center; padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel-2);
}
.wallet-history b { grid-area: amt; font-variant-numeric: tabular-nums; }
.wallet-history li.in b { color: var(--lime); }
.wallet-history span { grid-area: what; font-size: 13px; }
.wallet-history small { grid-area: when; font-size: 11.5px; color: var(--muted); }
.wallet-history a { grid-area: link; font-size: 12px; color: var(--yellow); }
@media (max-width: 640px) {
  .wallet-pill span { display: none; }
}
#walletState:empty { display: none; }
@media (max-width: 380px) {
  .wallet-pill { display: flex; }
}

/* ---------- Top bar in the GTA VI trailer mood: Vice City sunset, neon, palms ---------- */
.topbar {
  --sunset: linear-gradient(90deg, #ffb347, #ff6a5c 30%, #ff3ea5 55%, #b04dff 80%, #3ad7e6);
  position: relative; overflow: hidden; isolation: isolate;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 60'%3E%3Cg fill='%2309031a'%3E%3Cpath d='M58 60c1-14 3-27 9-38l2 1c-5 11-7 23-8 37z'/%3E%3Cpath d='M68 22c-8-6-19-6-27 1 9-2 18-1 27 1zM68 22c-3-9-12-15-23-14 9 3 16 8 23 14zM68 22c4-9 13-13 23-11-9 1-17 5-23 11zM68 22c9-4 20-2 27 5-9-3-18-4-27-5zM68 22c2 7 0 15-6 20 3-7 4-13 6-20z'/%3E%3Cpath d='M22 60c0-10 1-19 5-27l2 1c-3 8-4 17-4 26z'/%3E%3Cpath d='M28 33c-6-4-13-4-19 1 7-1 13-1 19-1zM28 33c-1-7-7-11-15-11 6 2 11 6 15 11zM28 33c3-6 9-9 16-7-6 1-11 3-16 7zM28 33c6-2 13 0 18 5-6-2-12-4-18-5z'/%3E%3C/g%3E%3C/svg%3E") left -10px bottom -4px / 150px 75px no-repeat,
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 60'%3E%3Cg fill='%2309031a' transform='translate(120 0) scale(-1 1)'%3E%3Cpath d='M58 60c1-14 3-27 9-38l2 1c-5 11-7 23-8 37z'/%3E%3Cpath d='M68 22c-8-6-19-6-27 1 9-2 18-1 27 1zM68 22c-3-9-12-15-23-14 9 3 16 8 23 14zM68 22c4-9 13-13 23-11-9 1-17 5-23 11zM68 22c9-4 20-2 27 5-9-3-18-4-27-5zM68 22c2 7 0 15-6 20 3-7 4-13 6-20z'/%3E%3C/g%3E%3C/svg%3E") right -20px bottom -4px / 150px 75px no-repeat,
    radial-gradient(160px 90px at 40px 110%, rgba(255, 150, 80, .75), rgba(255, 62, 165, .25) 55%, transparent 80%),
    radial-gradient(160px 90px at calc(100% - 40px) 110%, rgba(255, 120, 90, .7), rgba(176, 77, 255, .25) 55%, transparent 80%),
    radial-gradient(60% 140% at 50% 130%, rgba(255, 94, 120, .55), rgba(255, 62, 165, .18) 45%, transparent 70%),
    linear-gradient(90deg, #12061f, #24093a 30%, #3a0f45 50%, #24093a 70%, #12061f);
  box-shadow: 0 6px 22px rgba(10, 2, 24, .6);
}
/* Sunset stripe along the bottom edge, like the trailer's title cards. */
.topbar::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; z-index: -1;
  background: var(--sunset); box-shadow: 0 0 12px rgba(255, 62, 165, .7);
}
.topbar .logo { font-family: Oswald, Inter, sans-serif; font-weight: 700; font-size: 22px; letter-spacing: 1px; text-transform: uppercase; text-shadow: 0 2px 0 #12061f; }
.topbar .logo > span:last-child { transform: skewX(-8deg); color: #fff; }
.topbar .logo b {
  font-weight: 700; margin-left: 4px;
  background: var(--sunset); -webkit-background-clip: text; background-clip: text; color: transparent;
  text-shadow: none; filter: drop-shadow(0 0 8px rgba(255, 62, 165, .45));
}
.topbar .logo-mark {
  border-radius: 10px; border: 0; color: #fff; font-family: Oswald, Inter, sans-serif; font-weight: 700; font-size: 20px;
  background: linear-gradient(160deg, #ffb347, #ff3ea5 55%, #7b3cff);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .25), 0 0 14px rgba(255, 62, 165, .55);
  text-shadow: 0 1px 2px rgba(0, 0, 0, .35);
}
.topbar .topnav a {
  font-family: Oswald, Inter, sans-serif; font-weight: 500; font-size: 15px; letter-spacing: 1.6px; text-transform: uppercase;
  color: rgba(246, 230, 255, .72); border-radius: 0; padding: 8px 12px; position: relative;
}
.topbar .topnav a:hover { color: #fff; background: none; text-shadow: 0 0 10px rgba(255, 62, 165, .8); }
.topbar .topnav a.active { color: #fff; background: none; box-shadow: none; text-shadow: 0 0 12px rgba(255, 120, 90, .9); }
.topbar .topnav a.active::after {
  content: ''; position: absolute; left: 10px; right: 10px; bottom: 0; height: 2px; border-radius: 2px;
  background: var(--sunset); box-shadow: 0 0 8px rgba(255, 62, 165, .8);
}
.topbar .chip, .topbar .icon-btn {
  border: 1px solid rgba(255, 120, 200, .35); background: rgba(18, 6, 32, .6); color: #f3e6ff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08); backdrop-filter: blur(4px);
}
.topbar .chip { font-family: Oswald, Inter, sans-serif; font-weight: 500; font-size: 14px; letter-spacing: .6px; }
.topbar .chip .ico { color: #ffb347; }
.topbar .chip:hover, .topbar .icon-btn:hover { border-color: #ff3ea5; color: #fff; background: rgba(40, 10, 60, .75); box-shadow: 0 0 12px rgba(255, 62, 165, .45); }
.topbar .wallet-pill span { color: #ff9ad5; }
.topbar .btn-primary {
  border: 0; border-radius: 999px; padding: 0 20px; color: #fff;
  font-family: Oswald, Inter, sans-serif; font-weight: 600; font-size: 15px; letter-spacing: 1.2px; text-transform: uppercase;
  background: linear-gradient(90deg, #ff8a3d, #ff3ea5 55%, #9b4dff);
  text-shadow: 0 1px 2px rgba(0, 0, 0, .35); box-shadow: 0 0 0 1px rgba(255, 255, 255, .2), 0 0 16px rgba(255, 62, 165, .55);
}
.topbar .btn-primary:hover { filter: brightness(1.12) saturate(1.1); }
.topbar #signInBtn.signed { background: rgba(18, 6, 32, .6); border: 1px solid #ff3ea5; text-transform: none; letter-spacing: .4px; box-shadow: 0 0 10px rgba(255, 62, 165, .35); }
@media (max-width: 1100px) { .topbar .topnav a { font-size: 13px; letter-spacing: .8px; padding: 8px 8px; } }
@media (max-width: 640px) { .topbar .logo { font-size: 18px; } .topbar { background-size: 110px 55px, 110px 55px, auto, auto, auto, auto; } }
/* Phones: the D mark stands for the name so the balance and the account button keep their room. */
@media (max-width: 520px) { .topbar .logo > span:last-child { display: none; } .topbar .btn-primary { padding: 0 14px; font-size: 14px; } }
