@font-face {
  font-family: "BuilderSans";
  src: url("/player/engine/bf9367d2587/content/fonts/BuilderSans-Regular.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "BuilderSans";
  src: url("/player/engine/bf9367d2587/content/fonts/BuilderSans-Medium.otf") format("opentype");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "BuilderSans";
  src: url("/player/engine/bf9367d2587/content/fonts/BuilderSans-Bold.otf") format("opentype");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "BuilderSans";
  src: url("/player/engine/bf9367d2587/content/fonts/BuilderSans-Bold.otf") format("opentype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "BuilderSans";
  src: url("/player/engine/bf9367d2587/content/fonts/BuilderSans-ExtraBold.otf") format("opentype");
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

:root,
[data-theme="light"] {
  color-scheme: light;
  --bg: #ffffff;
  --topbar-bg: #ffffff;
  --side-bg: #ffffff;
  --surface: #f2f4f5;
  --surface-2: #e6e8ea;
  --surface-subtle: #f7f7f8;
  --placeholder: #ced2dc;
  --line: #dee1e3;
  --line-strong: #bdbebe;
  --fg: #111214;
  --fg-2: #393b3d;
  --muted: #606162;
  --brand: #335fff;
  --brand-hover: #244ee6;
  --brand-active: #1c42cc;
  --dark-cta: #111214;
  --dark-cta-fg: #ffffff;
  --outline-bg: #ffffff;
  --outline-border: #606162;
  --live: #02b757;
  --online: #00a2ff;
  --studio: #f68802;
  --verified: #0066ff;
  --danger: #d93829;
  --radius: 8px;
  --radius-sm: 6px;
  --radius-xs: 2px;
  --shadow: 0 4px 16px rgb(0 0 0 / .12);
  --shadow-sm: 0 1px 4px rgb(0 0 0 / .08);
  --scrim: rgb(0 0 0 / .45);
}

[data-theme="dark"] {
  color-scheme: dark;
  --bg: #121215;
  --topbar-bg: #191a1f;
  --side-bg: #191a1f;
  --surface: #202227;
  --surface-2: #2b2d33;
  --surface-subtle: #191a1f;
  --placeholder: #2b2d33;
  --line: #2f3138;
  --line-strong: #4e5159;
  --fg: #f7f7f8;
  --fg-2: #d8dadb;
  --muted: #bdbebe;
  --brand: #335fff;
  --brand-hover: #476fff;
  --brand-active: #244ee6;
  --dark-cta: #f7f7f8;
  --dark-cta-fg: #111214;
  --outline-bg: transparent;
  --outline-border: #bdbebe;
  --live: #02b757;
  --online: #00a2ff;
  --studio: #f68802;
  --verified: #0066ff;
  --danger: #f74b52;
  --radius: 8px;
  --radius-sm: 6px;
  --radius-xs: 2px;
  --shadow: 0 8px 24px rgb(0 0 0 / .45);
  --shadow-sm: 0 2px 8px rgb(0 0 0 / .35);
  --scrim: rgb(0 0 0 / .6);
}

* { box-sizing: border-box; }
html, body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--fg);
  font: 15px/1.4 "BuilderSans", "Helvetica Neue", Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
body.playing { overflow: hidden; }
[hidden] { display: none !important; }
a { color: inherit; }
button, select, input { font: inherit; color: inherit; }
img { display: block; }
.muted { color: var(--muted); }
.center { text-align: center; }
code {
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 1px 6px;
  border-radius: 3px;
  font-size: .88em;
}
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

/* ---- buttons (exact Roblox crisp radius & weights) ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background .12s, border-color .12s, opacity .12s;
  white-space: nowrap;
}
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.primary { background: var(--brand); color: #ffffff; }
.btn.primary:hover:not(:disabled) { background: var(--brand-hover); }
.btn.primary:active:not(:disabled) { background: var(--brand-active); }
.btn.dark { background: var(--dark-cta); color: var(--dark-cta-fg); }
.btn.dark:hover:not(:disabled) { opacity: .88; }
.btn.ghost,
.btn.outline {
  background: var(--outline-bg);
  border-color: var(--outline-border);
  color: var(--fg);
}
.btn.ghost:hover:not(:disabled),
.btn.outline:hover:not(:disabled) { background: var(--surface); }
.btn.subtle { background: var(--surface-2); color: var(--fg); }
.btn.subtle:hover:not(:disabled) { filter: brightness(.95); }
.btn.sm { padding: 6px 12px; font-size: 13px; border-radius: var(--radius-sm); }
.btn.lg { padding: 10px 20px; font-size: 15px; border-radius: var(--radius); }
.btn.xl { padding: 14px 24px; font-size: 18px; border-radius: var(--radius); }
.btn.topbar-btn { height: 30px; padding: 0 14px; font-size: 14px; border-radius: var(--radius-sm); }
.link-btn {
  background: none; border: 0; color: var(--muted); cursor: pointer;
  padding: 4px 6px; border-radius: 4px; font-size: 13px;
}
.link-btn:hover { color: var(--fg); background: var(--surface); }
.text-link-btn {
  background: none; border: 0; padding: 0; cursor: pointer;
  font-size: 14px; font-weight: 700; text-decoration: underline; color: var(--fg);
}
.nav-btn {
  width: 32px; height: 32px; border-radius: var(--radius-sm); border: 1px solid var(--line);
  background: var(--bg); color: var(--fg); cursor: pointer; font-size: 20px; line-height: 1;
  display: grid; place-items: center; padding: 0 0 2px; text-decoration: none;
}
.nav-btn:hover { background: var(--surface); }
.icon-square-btn {
  width: 36px; height: 36px; border-radius: var(--radius); border: 0;
  background: var(--surface-2); color: var(--fg); cursor: pointer;
  display: grid; place-items: center; flex: none;
}
.icon-square-btn:hover { filter: brightness(.94); }
.icon-square-btn svg { width: 18px; height: 18px; }
.more-bar {
  width: 100%; height: 36px; margin-top: 12px; border-radius: 4px; font-weight: 600;
}

/* ---- app shell: 40px Roblox top bar + 175px sidebar + content ---- */
.app {
  --top: 40px;
  --side: 175px;
  min-height: 100vh;
  background: var(--bg);
}

.icon-btn {
  width: 30px; height: 30px; border-radius: var(--radius-sm); border: 0;
  background: transparent; color: var(--fg); cursor: pointer;
  display: grid; place-items: center; flex: none;
}
.icon-btn:hover { background: var(--surface); }
.icon-btn svg {
  width: 19px; height: 19px; fill: none; stroke: currentColor;
  stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round;
}

.topbar {
  position: fixed;
  top: var(--ad-top-h, 0px);
  left: var(--ad-left-w, 0px);
  right: var(--ad-right-w, 0px);
  height: var(--top);
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 14px;
  background: var(--topbar-bg);
  border-bottom: 1px solid var(--line);
}
.menu-toggle { display: none; }
.brand {
  display: flex;
  align-items: center;
  gap: 7px;
  text-decoration: none;
  color: var(--fg);
  flex: none;
}
.brand:hover { opacity: .82; }
.brand-mark { width: 24px; height: 24px; display: block; }
.brand-word {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: .04em;
}

.topnav {
  display: flex;
  align-items: stretch;
  gap: 2px;
  height: 100%;
}
.topnav a {
  display: flex;
  align-items: center;
  padding: 0 12px;
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  color: var(--fg);
  border-bottom: 2px solid transparent;
  transition: border-color .1s;
}
.topnav a:hover { border-bottom-color: var(--fg); }
.topnav a.active { font-weight: 700; border-bottom-color: var(--fg); }

.search {
  flex: 1;
  max-width: 340px;
  height: 28px;
  display: flex;
  align-items: center;
  gap: 7px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 0 9px;
  transition: border-color .12s, background .12s;
}
.search:focus-within { border-color: var(--fg); background: var(--bg); }
.search svg {
  width: 15px; height: 15px; fill: none; stroke: var(--muted);
  stroke-width: 2; stroke-linecap: round; flex: none;
}
.search input {
  flex: 1; min-width: 0; background: none; border: 0; outline: none;
  color: var(--fg); font: inherit; font-size: 14px; padding: 0;
}
.search input::placeholder { color: var(--muted); }
.search kbd {
  font: 11px ui-monospace, monospace; color: var(--muted);
  border: 1px solid var(--line-strong); border-radius: 3px; padding: 0 4px; line-height: 1.45;
}
.search:focus-within kbd { display: none; }

.topbar-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  flex: none;
}

.robux-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 28px;
  padding: 0 8px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  font-size: 14px;
  font-weight: 700;
  color: var(--fg);
}
.robux-chip:hover { background: var(--surface); }
.robux-chip svg { width: 17px; height: 17px; flex: none; }

.theme-btn .ico-sun { display: none; }
[data-theme="dark"] .theme-btn .ico-moon { display: none; }
[data-theme="dark"] .theme-btn .ico-sun { display: block; }

.account {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  flex: none;
}
.account-btn {
  display: flex; align-items: center; gap: 7px; padding: 2px 9px 2px 2px;
  height: 30px; background: transparent; border: 0; border-radius: 999px;
  cursor: pointer; font-size: 14px; font-weight: 600; max-width: 185px;
}
.account-btn:hover { background: var(--surface); }
.account-btn span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.avatar {
  width: 26px; height: 26px; border-radius: 50%; background: var(--placeholder);
  flex: none; object-fit: cover;
}
.avatar.lg { width: 46px; height: 46px; }
.avatar.xl { width: 62px; height: 62px; }
.avatar:not([src]), .avatar[src=""] { visibility: visible; }

.menu {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  min-width: 210px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 5px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  z-index: 40;
}
.menu-head {
  display: flex; flex-direction: column; padding: 7px 10px 9px;
  border-bottom: 1px solid var(--line); margin-bottom: 4px;
}
.menu a, .menu button {
  text-align: left; background: none; border: 0; padding: 7px 10px;
  border-radius: 4px; cursor: pointer; text-decoration: none; font-size: 14px; font-weight: 500;
}
.menu a:hover, .menu button:hover { background: var(--surface); }

/* ---- left navigation rail ---- */
.sidebar {
  position: fixed;
  top: calc(var(--ad-top-h, 0px) + var(--top));
  bottom: var(--ad-bottom-h, 0px);
  left: var(--ad-left-w, 0px);
  width: var(--side);
  z-index: 20;
  overflow-y: auto;
  padding: 10px 8px;
  display: flex;
  flex-direction: column;
  gap: 1px;
  border-right: 1px solid var(--line);
  background: var(--side-bg);
}
.sidebar a {
  display: flex; align-items: center; gap: 10px; padding: 7px 9px;
  border-radius: var(--radius-sm); text-decoration: none; font-size: 14px;
  font-weight: 500; color: var(--fg);
}
.sidebar a:hover { background: var(--surface); }
.sidebar a.active { font-weight: 700; background: var(--surface); }
.sidebar svg {
  width: 19px; height: 19px; fill: none; stroke: currentColor;
  stroke-width: 1.8; stroke-linejoin: round; stroke-linecap: round; flex: none;
}
.side-me {
  font-weight: 600 !important;
  padding-bottom: 9px !important;
  margin-bottom: 5px;
  border-bottom: 1px solid var(--line);
  border-radius: 0 !important;
}
.side-me:hover { background: transparent !important; text-decoration: underline; }
.side-me span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-badge {
  margin-left: auto; font-style: normal; font-size: 11px; font-weight: 700;
  background: var(--brand); color: #fff; border-radius: 999px; padding: 1px 6px;
}
.side-sep { height: 1px; background: var(--line); margin: 6px 6px; }
.side-foot {
  margin-top: 6px; padding: 4px 8px 6px; font-size: 10.5px; color: var(--muted); line-height: 1.35;
}
.scrim {
  position: fixed;
  top: calc(var(--ad-top-h, 0px) + var(--top));
  right: var(--ad-right-w, 0px);
  bottom: var(--ad-bottom-h, 0px);
  left: var(--ad-left-w, 0px);
  z-index: 15;
  background: var(--scrim);
}

.content {
  margin-left: calc(var(--ad-left-w, 0px) + var(--side));
  margin-right: var(--ad-right-w, 0px);
  padding: calc(var(--ad-top-h, 0px) + var(--top) + 18px) clamp(20px, 2.5vw, 36px) calc(var(--ad-bottom-h, 0px) + 36px);
  max-width: none;
  outline: none;
  min-width: 0;
}
.centered-page {
  max-width: 970px;
  margin: 0 auto;
  min-width: 0;
}

/* ---- page pieces ---- */
.hero {
  display: flex; align-items: center; justify-content: space-between; gap: 18px;
  flex-wrap: wrap; border-radius: var(--radius); padding: 16px 20px;
  margin-bottom: 22px; border: 1px solid var(--line); background: var(--surface-subtle);
}
.hero-copy { min-width: 0; }
.hero h1 { margin: 0 0 3px; font-size: 21px; font-weight: 800; line-height: 1.2; letter-spacing: -.015em; }
.hero p { margin: 0; color: var(--muted); font-size: 14px; }
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; flex: none; }

.greeting { display: flex; align-items: center; gap: 14px; margin: 0 0 20px; }
.greeting h1 { margin: 0; font-size: 28px; font-weight: 800; letter-spacing: -.02em; }
.greeting p { margin: 2px 0 0; font-size: 14px; }

.page-head { display: flex; align-items: center; gap: 12px; margin: 0 0 16px; }
.page-head h1 { margin: 0; font-size: 30px; font-weight: 800; letter-spacing: -.02em; line-height: 1.15; }
.page-head p { margin: 3px 0 0; font-size: 14px; }
.page-head-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

.filter-pills, .pill-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.filter-pills { margin: -4px 0 18px; }
.filter-pill {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px;
  border-radius: 9999px; background: var(--dark-cta); color: var(--dark-cta-fg);
  font-size: 13px; font-weight: 600; border: 0; text-decoration: none;
}
.stat-pill {
  display: inline-flex; align-items: center; gap: 5px; padding: 5px 12px;
  border-radius: 9999px; background: var(--surface); color: var(--fg);
  font-size: 13px; font-weight: 500; border: 0; text-decoration: none;
}
.stat-pill.strong { font-weight: 700; }
.stat-pill.clickable { cursor: pointer; }
.stat-pill.clickable:hover { background: var(--surface-2); }
.stat-pill.clickable.active { background: var(--dark-cta); color: var(--dark-cta-fg); font-weight: 700; }

.empty {
  display: grid; place-items: center; gap: 12px; padding: 44px 16px; text-align: center;
  color: var(--muted); background: var(--surface-subtle); border: 1px solid var(--line);
  border-radius: var(--radius-xs);
}
.empty p { margin: 0; font-size: 15px; }
.pad { padding: 14px 4px; }

.inline-search { display: flex; gap: 8px; margin-bottom: 20px; max-width: 560px; }
.inline-search .filter { margin-bottom: 0; max-width: none; flex: 1; }

/* ---- carousels & rows ---- */
.row { margin-bottom: 26px; }
.row-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px;
}
.row-head h2 { margin: 0; font-size: 20px; font-weight: 700; letter-spacing: -.01em; line-height: 1.25; }
.row-title { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; }
.row-title:hover h2 { text-decoration: underline; }
.row-head .count, h2 .count { color: var(--muted); font-size: 14px; font-weight: 500; margin-left: 6px; }
.row-nav { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.see-all {
  display: inline-flex; align-items: center; gap: 4px; color: var(--fg);
  text-decoration: none; font-weight: 600; font-size: 14px; padding: 4px 2px;
}
.see-all:hover { text-decoration: underline; }
.see-all svg {
  width: 15px; height: 15px; fill: none; stroke: currentColor;
  stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}

.track-wrap {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr) 26px;
  align-items: start;
  margin: 0 -26px;
}
.track {
  display: grid; grid-auto-flow: column; grid-auto-columns: 152px; gap: 12px;
  overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: none; padding: 2px 0 4px; min-width: 0;
}
.track::-webkit-scrollbar { display: none; }
.track-arrow {
  height: 152px; width: 26px; margin-top: 2px; border: 0; background: transparent;
  color: var(--fg); cursor: pointer; display: grid; place-items: center;
  border-radius: 4px; transition: opacity .15s, background .15s;
}
.track-arrow:hover:not(:disabled) { background: var(--surface); }
.track-arrow:disabled { color: var(--line-strong); opacity: .45; cursor: default; }
.track-arrow svg {
  width: 18px; height: 18px; fill: none; stroke: currentColor;
  stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}
.friends-wrap .track-arrow { height: 84px; }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 18px 12px;
}

/* ---- game card (exact Roblox Charts tile) ---- */
.game-card {
  display: flex; flex-direction: column; gap: 6px; text-decoration: none;
  scroll-snap-align: start; min-width: 0;
}
.game-card .thumb {
  aspect-ratio: 1; border-radius: var(--radius); overflow: hidden; background: var(--placeholder);
}
.game-card .thumb img { width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .2s, filter .15s; }
.game-card .thumb img[src] { opacity: 1; }
.game-card:hover .thumb img { filter: brightness(.93); }
.game-card:focus-visible { outline: 2px solid var(--brand); border-radius: var(--radius); }
.game-name {
  font-weight: 700; font-size: 15px; line-height: 1.25; color: var(--fg);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.game-card:hover .game-name { text-decoration: underline; }
.game-meta {
  display: flex; align-items: center; gap: 10px; font-size: 12.5px; font-weight: 500; color: var(--muted);
}
.game-meta span { display: inline-flex; align-items: center; gap: 4px; }
.game-meta svg { width: 14px; height: 14px; fill: currentColor; flex: none; }

/* ---- Marketplace & Catalog borderless item cards (1:1 Roblox) ---- */
.marketplace-page { min-width: 0; }
.cat-header {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  flex-wrap: wrap; margin-bottom: 12px;
}
.cat-header h1 { margin: 0; font-size: 30px; font-weight: 800; letter-spacing: -.02em; }
.cat-header-controls { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.cat-search-box {
  display: flex; align-items: center; gap: 6px; height: 36px; padding: 0 10px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  min-width: 220px;
}
.cat-search-box:focus-within { border-color: var(--fg); background: var(--bg); }
.cat-search-ico { display: inline-flex; color: var(--muted); }
.cat-search-ico svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.cat-search-input { flex: 1; min-width: 0; border: 0; background: none; outline: none; font-size: 14px; }

.rbx-select {
  height: 36px; padding: 0 10px; border-radius: var(--radius);
  border: 1px solid var(--line-strong); background: var(--bg); color: var(--fg);
  font-size: 14px; font-weight: 500; cursor: pointer;
}
.cat-filters {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px;
}
.rbx-filter-select {
  background: transparent; border: 0; padding: 6px 4px; font-size: 14px;
  font-weight: 600; color: var(--fg); cursor: pointer;
}
.rbx-filter-input {
  height: 30px; padding: 0 10px; border-radius: var(--radius-sm);
  border: 1px solid var(--line); background: var(--surface); font-size: 13.5px; width: 170px;
}
.rbx-filter-input:focus { outline: none; border-color: var(--fg); background: var(--bg); }

.cat-tags {
  display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 0 24px 14px 0;
  -webkit-mask-image: linear-gradient(to right, #000 94%, transparent 100%);
  mask-image: linear-gradient(to right, #000 94%, transparent 100%);
}
.cat-tags::-webkit-scrollbar { display: none; }
.cat-tag-pill {
  flex: none; height: 32px; padding: 0 14px; border-radius: 9999px; border: 0;
  background: var(--surface-2); color: var(--fg); font-size: 13.5px; font-weight: 600;
  cursor: pointer; transition: background .12s;
}
.cat-tag-pill:hover { filter: brightness(.95); }
.cat-tag-pill.active { background: var(--dark-cta); color: var(--dark-cta-fg); }

.catalog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(154px, 1fr));
  gap: 18px 12px;
}
.item-card {
  display: flex; flex-direction: column; gap: 5px; text-decoration: none;
  background: none; border: 0; padding: 0; text-align: left; cursor: pointer;
  min-width: 0; scroll-snap-align: start;
}
.item-thumb {
  position: relative; aspect-ratio: 1; border-radius: var(--radius);
  overflow: hidden; background: var(--surface);
}
.item-thumb.circle { border-radius: 50%; }
.item-thumb img { width: 100%; height: 100%; object-fit: contain; transition: transform .15s; }
.item-card:hover .item-thumb img { transform: scale(1.03); }
.item-card.active .item-thumb { box-shadow: inset 0 0 0 2px var(--brand); }
.wearing-check {
  position: absolute; top: 6px; right: 6px; width: 22px; height: 22px;
  border-radius: 50%; background: var(--brand); color: #fff; display: grid; place-items: center;
}
.wearing-check svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.limited-ribbon {
  position: absolute; left: 6px; bottom: 6px; padding: 2px 6px; border-radius: 3px;
  font-size: 10px; font-weight: 800; letter-spacing: .03em; background: #02b757; color: #fff;
}
.limited-ribbon.unique { background: #e8b322; color: #111214; }
.item-name {
  font-size: 14px; font-weight: 600; line-height: 1.25; color: var(--fg);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  margin-top: 2px;
}
.item-card:hover .item-name { text-decoration: underline; }
.item-creator {
  display: flex; align-items: center; gap: 3px; font-size: 12px; color: var(--muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.item-creator .verified-badge svg { width: 13px; height: 13px; }
.item-price { font-size: 13px; font-weight: 700; color: var(--fg); }
.robux-amt { display: inline-flex; align-items: center; gap: 4px; font-weight: 700; }
.robux-amt svg { width: 15px; height: 15px; flex: none; }

/* Item Detail Page */
.item-detail-top {
  display: grid; grid-template-columns: minmax(260px, 400px) minmax(0, 1fr); gap: 28px;
}
.item-detail-preview {
  aspect-ratio: 1; background: var(--surface); border-radius: var(--radius);
  display: grid; place-items: center; overflow: hidden;
}
.item-detail-preview img { width: 100%; height: 100%; object-fit: contain; }
.item-detail-info { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.item-detail-info h1 { margin: 0; font-size: 28px; font-weight: 800; line-height: 1.15; }
.item-detail-price {
  display: flex; flex-direction: column; gap: 2px; padding: 12px 0;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.item-detail-price .robux-amt { font-size: 22px; }
.item-detail-price .robux-amt svg { width: 22px; height: 22px; }
.item-detail-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.item-detail-meta { display: flex; gap: 24px; font-size: 14px; }
.item-detail-meta > div { display: flex; flex-direction: column; gap: 2px; }
.item-detail-desc h3 { margin: 8px 0 4px; font-size: 16px; }

/* ---- Communities / Groups (1:1 Roblox Community Page) ---- */
.group-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 12px;
}
.group-card {
  display: flex; align-items: center; gap: 12px; padding: 10px;
  border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--bg);
  text-decoration: none; min-width: 0;
}
.group-card:hover { background: var(--surface-subtle); }
.group-card-icon {
  width: 64px; height: 64px; border-radius: var(--radius); overflow: hidden;
  background: var(--placeholder); flex: none;
}
.group-card-icon img { width: 100%; height: 100%; object-fit: cover; }
.group-card-body { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.group-card-name {
  display: flex; align-items: center; gap: 4px; font-size: 15px; font-weight: 700; min-width: 0;
}
.group-card-name > span:first-child {
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.group-card-meta { font-size: 12.5px; font-weight: 600; }
.group-card-desc {
  font-size: 12.5px; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden;
}

.community-header { display: flex; flex-direction: column; gap: 12px; margin-bottom: 18px; }
.community-top { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.community-icon {
  width: 124px; height: 124px; border-radius: var(--radius); overflow: hidden;
  background: var(--placeholder); flex: none;
}
.community-icon img { width: 100%; height: 100%; object-fit: cover; }
.community-title-col { flex: 1; min-width: 200px; }
.community-title-col h1 {
  margin: 0 0 4px; font-size: 28px; font-weight: 800; display: flex; align-items: center; gap: 6px;
}
.community-owner { display: flex; align-items: center; gap: 4px; font-size: 14px; }
.community-owner a { font-weight: 600; color: var(--fg); text-decoration: none; }
.community-owner a:hover { text-decoration: underline; }
.community-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.community-desc { margin: 0; font-size: 14.5px; color: var(--fg-2); white-space: pre-line; line-height: 1.5; }
.community-desc.clamped { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.shout-box {
  padding: 12px 14px; background: var(--surface-subtle); border: 1px solid var(--line);
  border-radius: var(--radius-xs);
}
.shout-head { display: flex; align-items: center; gap: 8px; font-size: 13px; margin-bottom: 4px; }
.shout-head a { text-decoration: none; }
.shout-head a:hover { text-decoration: underline; }
.shout-box p { margin: 0; font-size: 14px; color: var(--fg-2); }

.member-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(108px, 1fr)); gap: 10px;
}
.wall-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.wall-post {
  display: flex; gap: 12px; padding: 12px 14px; border: 1px solid var(--line);
  background: var(--bg); border-radius: var(--radius-xs);
}
.wall-body { flex: 1; min-width: 0; }
.wall-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13px; margin-bottom: 4px; }
.wall-author { font-weight: 700; text-decoration: none; display: inline-flex; align-items: center; gap: 3px; }
.wall-author:hover { text-decoration: underline; }
.wall-body p { margin: 0; font-size: 14px; color: var(--fg-2); overflow-wrap: anywhere; }
.empty-chat {
  display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 48px 16px; text-align: center;
}
.empty-chat-ico svg { width: 42px; height: 42px; fill: none; stroke: var(--muted); stroke-width: 1.6; }
.empty-chat p { margin: 0; font-size: 14px; }

/* ---- Public User Profile (1:1 Roblox Profile Page) ---- */
.profile-banner {
  position: relative; height: 270px; border-radius: var(--radius);
  background: var(--surface-subtle); display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.profile-full-avatar { height: 255px; width: auto; object-fit: contain; }
.profile-banner-btn { position: absolute; top: 12px; right: 12px; }
.profile-identity {
  display: flex; align-items: flex-end; gap: 16px; margin-top: -42px; padding: 0 4px 12px;
  flex-wrap: wrap;
}
.profile-headshot-wrap {
  position: relative; z-index: 2; width: 124px; height: 124px; border-radius: 50%;
  border: 4px solid var(--bg); background: var(--surface); overflow: hidden; flex: none;
}
.profile-headshot { width: 100%; height: 100%; object-fit: cover; }
.profile-name-col { flex: 1; min-width: 180px; padding-bottom: 6px; }
.profile-name-col h1 {
  margin: 0 0 2px; font-size: 26px; font-weight: 800; display: flex; align-items: center; gap: 6px;
}
.profile-actions { display: flex; align-items: center; gap: 8px; padding-bottom: 6px; }
.profile-cta { min-width: 200px; height: 38px; }
.profile-stats { margin-bottom: 20px; }
.wearing-track { grid-auto-columns: 146px; }
.badge-mini-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 12px;
}
.badge-mini {
  display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; font-size: 12.5px; font-weight: 600;
}
.badge-mini img { width: 88px; height: 88px; border-radius: 50%; background: var(--surface); object-fit: cover; }

/* ---- Avatar Editor (1:1 Roblox Avatar Editor) ---- */
.avatar-page { max-width: 1120px; margin: 0 auto; }
.avatar-layout {
  display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 24px; align-items: start;
}
.avatar-left { position: sticky; top: calc(var(--ad-top-h, 0px) + var(--top) + 18px); display: flex; flex-direction: column; gap: 10px; }
.avatar-stage {
  position: relative; aspect-ratio: 4 / 5; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius);
  display: grid; place-items: center; overflow: hidden;
}
.avatar-stage-img { width: 100%; height: 100%; object-fit: contain; }
.rig-toggle {
  position: absolute; top: 10px; right: 10px; display: flex;
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden;
}
.rig-btn {
  padding: 5px 10px; border: 0; background: transparent; cursor: pointer;
  font-size: 12.5px; font-weight: 700; color: var(--muted);
}
.rig-btn.active { background: var(--dark-cta); color: var(--dark-cta-fg); }
.avatar-stage-bar { display: flex; gap: 8px; }
.avatar-stage-bar .btn { flex: 1; }
.avatar-status { font-size: 13px; min-height: 18px; }
.avatar-right { min-width: 0; }
.avatar-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(126px, 1fr)); gap: 14px 10px;
}
.skin-palette {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(44px, 1fr)); gap: 10px; max-width: 480px;
}
.skin-swatch {
  aspect-ratio: 1; border-radius: 50%; border: 2px solid var(--line); cursor: pointer;
  transition: transform .1s, border-color .1s;
}
.skin-swatch:hover { transform: scale(1.08); border-color: var(--fg); }
.scale-list { display: flex; flex-direction: column; gap: 16px; max-width: 440px; }
.scale-row { display: flex; flex-direction: column; gap: 6px; }
.scale-head { display: flex; justify-content: space-between; font-size: 14px; }
.scale-row input[type="range"] { width: 100%; accent-color: var(--brand); }

/* ---- Inventory ---- */
.inventory-page { max-width: 1120px; margin: 0 auto; }
.inv-layout { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 20px; align-items: start; }
.inv-cats {
  display: flex; flex-direction: column; gap: 2px; border: 1px solid var(--line);
  background: var(--bg); padding: 6px; border-radius: var(--radius-xs);
}
.inv-cat-btn {
  text-align: left; background: none; border: 0; padding: 8px 10px;
  border-radius: 4px; cursor: pointer; font-size: 13.5px; font-weight: 500; color: var(--fg);
}
.inv-cat-btn:hover { background: var(--surface); }
.inv-cat-btn.active { background: var(--surface); font-weight: 700; }
.inv-body { min-width: 0; }

/* ---- Friends ---- */
.friends-track { grid-auto-columns: 98px; }
.friend {
  display: flex; flex-direction: column; align-items: center; gap: 5px;
  background: none; border: 0; padding: 6px 4px; border-radius: var(--radius-sm);
  cursor: pointer; text-align: center; min-width: 0; text-decoration: none; color: inherit;
}
.friend:hover { background: var(--surface); }
.friend-avatar { position: relative; width: 76px; height: 76px; }
.friend-avatar img { width: 100%; height: 100%; border-radius: 50%; background: var(--placeholder); object-fit: cover; }
.friend.offline .friend-avatar img { filter: grayscale(.35) opacity(.85); }
.friend .dot {
  position: absolute; right: 2px; bottom: 2px; width: 15px; height: 15px;
  border-radius: 50%; border: 3px solid var(--bg); background: var(--line-strong);
}
.friend.online .dot { background: var(--online); }
.friend.studio .dot { background: var(--studio); }
.friend.playing .dot { background: var(--live); }
.friend-name { font-size: 13px; font-weight: 600; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.friend.offline .friend-name { color: var(--muted); }
.friend-status { font-size: 11.5px; color: var(--muted); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.friend.playing .friend-status { color: var(--live); font-weight: 600; }
.add-circle {
  width: 100%; height: 100%; border-radius: 50%; display: grid; place-items: center;
  font-size: 30px; font-weight: 400; border: 1.5px solid var(--line-strong);
  background: var(--surface); color: var(--fg);
}
.add-friend:hover .add-circle { background: var(--surface-2); }
.badge, .tab-badge {
  position: absolute; top: -2px; right: -2px; font-style: normal; font-size: 11px; font-weight: 700;
  background: var(--brand); color: #fff; border-radius: 999px; padding: 1px 6px; border: 2px solid var(--bg);
}
.tab-badge { position: static; margin-left: 6px; border: 0; }
.friend-group { margin-bottom: 24px; }
.friend-group h2 { font-size: 17px; font-weight: 700; margin: 0 0 10px; }
.friend-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 10px; }

/* ---- sharp full-width Roblox tabs ---- */
.tabs {
  display: flex;
  background: var(--surface-subtle);
  border-bottom: 1px solid var(--line);
  margin-bottom: 20px;
}
.tab {
  position: relative;
  flex: 1;
  text-align: center;
  padding: 12px 14px;
  background: none;
  border: 0;
  border-radius: 0;
  cursor: pointer;
  font-size: 15px;
  font-weight: 600;
  color: var(--muted);
  text-decoration: none;
}
.tab:hover { color: var(--fg); }
.tab[aria-selected="true"] { color: var(--fg); background: var(--bg); }
.tab[aria-selected="true"]::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--fg);
}

.filter {
  width: 100%; max-width: 420px; padding: 8px 12px; margin-bottom: 16px;
  border-radius: var(--radius-sm); border: 1px solid var(--line-strong);
  background: var(--surface); color: var(--fg); font: inherit; font-size: 14px; outline: none;
}
.filter:focus { border-color: var(--fg); background: var(--bg); }
.people { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; max-width: 780px; }
.person {
  display: flex; align-items: center; gap: 14px; padding: 10px 14px;
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius-xs);
}
.person-link { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; text-decoration: none; }
.person-link:hover strong { text-decoration: underline; }
.person-info { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.person-info strong { display: inline-flex; align-items: center; gap: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.person-info span { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.person-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.pill-tag {
  font-size: 12.5px; font-weight: 600; color: var(--muted);
  padding: 3px 10px; border-radius: 999px; background: var(--surface);
}
.action-note { flex-basis: 100%; text-align: right; font-size: 12.5px; color: var(--muted); }
.action-note.error { color: var(--danger); }
.link-btn.inline { padding: 0; font-size: inherit; color: var(--brand); text-decoration: underline; }

/* ---- Experience Detail Page (1:1 Roblox sharp corners & Badges) ---- */
.game-page { max-width: 970px; margin: 0 auto; min-width: 0; }
.game-top {
  display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(240px, 1fr);
  gap: 24px; margin-bottom: 22px;
}
.media { min-width: 0; }
.media-main {
  aspect-ratio: 16 / 9;
  border-radius: 0; /* Exact sharp 0px corners matching roblox.com experience hero */
  overflow: hidden;
  background: var(--placeholder);
}
.media-main img { width: 100%; height: 100%; object-fit: cover; }
.media-main img:not([src]) { visibility: hidden; }
.media-thumbs {
  display: flex; gap: 6px; margin-top: 8px; max-width: 100%; overflow-x: auto; scrollbar-width: none;
}
.media-thumbs::-webkit-scrollbar { display: none; }
.media-thumbs button {
  flex: none; width: 92px; aspect-ratio: 16 / 9; padding: 0;
  border: 2px solid transparent; border-radius: 0; overflow: hidden;
  background: var(--placeholder); cursor: pointer; opacity: .65;
}
.media-thumbs button:hover { opacity: 1; }
.media-thumbs button.active { opacity: 1; border-color: var(--brand); }
.media-thumbs img { width: 100%; height: 100%; object-fit: cover; }

.game-side { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.game-side h1 {
  margin: 0; font-size: clamp(24px, 2.5vw, 31px); font-weight: 800; line-height: 1.15; letter-spacing: -.02em;
}
.creator { display: flex; align-items: center; gap: 4px; font-size: 14px; color: var(--muted); }
.creator a { text-decoration: none; }
.creator a:hover strong { text-decoration: underline; }
.creator strong { color: var(--fg); font-weight: 600; }
.verified-badge { display: inline-flex; align-items: center; margin-left: 2px; color: var(--verified); flex: none; }
.verified-badge svg { width: 16px; height: 16px; display: block; }

.play-wrap { margin-top: auto; padding-top: 16px; }
.play-btn { width: 100%; height: 60px; border-radius: var(--radius); }
.play-btn svg { width: 28px; height: 28px; fill: currentColor; }

.fav-vote-row {
  margin-top: 10px; display: flex; align-items: center; gap: 14px;
}
.fav-action {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  background: none; border: 0; padding: 4px 6px; cursor: pointer;
  color: var(--muted); font-size: 12px; font-weight: 600; border-radius: 4px;
}
.fav-action:hover { background: var(--surface); color: var(--fg); }
.fav-action.active { color: #f6b702; }
.fav-action svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; }

.votes { flex: 1; display: flex; align-items: center; gap: 8px; }
.vote-side {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  font-size: 12px; font-weight: 600; color: var(--muted); min-width: 38px;
}
.vote-btn { background: none; border: 0; padding: 4px; cursor: pointer; border-radius: 4px; }
.vote-btn:hover { background: var(--surface); color: var(--fg); }
.vote-side svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.vote-meter { flex: 1; display: flex; flex-direction: column; gap: 4px; }
.vote-bar { height: 4px; border-radius: 2px; background: var(--line-strong); overflow: hidden; }
.vote-bar i { display: block; height: 100%; background: var(--fg); }

.tab-pane h2 { font-size: 20px; font-weight: 700; margin: 0 0 10px; }
.desc {
  margin: 0 0 18px; color: var(--fg-2); white-space: pre-line;
  line-height: 1.55; font-size: 14.5px; max-width: 92ch; overflow-wrap: anywhere;
}
.maturity-box {
  display: inline-block; padding: 8px 14px; margin-bottom: 18px;
  background: var(--surface); border-radius: var(--radius); font-size: 13.5px; color: var(--fg-2);
}

.stats {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  gap: 10px; padding: 14px 0;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.stat { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 3px; padding: 4px; }
.stat span { font-size: 12px; font-weight: 500; color: var(--muted); }
.stat strong { font-size: 14.5px; font-weight: 700; color: var(--fg); }

/* Experience Badges (exact Roblox stacked sharp horizontal cards + circular icons) */
.badge-stack { display: flex; flex-direction: column; gap: 10px; }
.badge-card {
  display: flex; align-items: center; gap: 18px; padding: 14px 18px;
  background: var(--surface-subtle); border: 1px solid var(--line); border-radius: 0;
}
.badge-card-img {
  width: 100px; height: 100px; border-radius: 50%; background: var(--placeholder);
  object-fit: cover; flex: none;
}
.badge-card-body { flex: 1; min-width: 0; }
.badge-card-title { font-size: 16px; font-weight: 700; margin-bottom: 4px; }
.badge-card-desc { margin: 0 0 12px; font-size: 13.5px; line-height: 1.4; }
.badge-card-stats {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; text-align: center;
}
.badge-card-stats > div { display: flex; flex-direction: column; gap: 2px; font-size: 13px; }
.badge-card-stats strong { font-size: 14px; }

.servers-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.servers-head h2 { margin: 0; }
.servers {
  list-style: none; margin: 0 0 14px; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px;
}
.server {
  display: grid; grid-template-columns: 1fr auto; grid-template-rows: auto auto; gap: 6px 12px;
  align-items: center; background: var(--bg); border: 1px solid var(--line);
  border-radius: var(--radius-xs); padding: 12px 14px;
}
.server .btn { grid-row: 1 / 3; grid-column: 2; }
.server-count { font-size: 13.5px; color: var(--muted); }
.server-count strong { color: var(--fg); font-size: 15px; font-weight: 700; }
.fill-bar { height: 4px; border-radius: 2px; background: var(--surface-2); overflow: hidden; margin-top: 6px; }
.fill-bar i { display: block; height: 100%; background: var(--brand); }
.server-meta { font-size: 12px; }
.servers li.pad { grid-column: 1 / -1; }

/* ---- Messages & Robux ---- */
.msg-list, .tx-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.msg-row {
  border: 1px solid var(--line); background: var(--bg); border-radius: var(--radius-xs);
}
.msg-row.unread { border-left: 3px solid var(--brand); }
.msg-head { display: flex; align-items: center; gap: 12px; padding: 10px 14px; cursor: pointer; }
.msg-head:hover { background: var(--surface-subtle); }
.msg-main { flex: 1; min-width: 0; }
.msg-subj { font-weight: 700; font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.msg-body-full { padding: 0 14px 14px 52px; font-size: 14px; color: var(--fg-2); white-space: pre-line; }

.robux-hero {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  padding: 18px 20px; border: 1px solid var(--line); background: var(--surface-subtle);
  border-radius: var(--radius); margin-bottom: 24px;
}
.robux-balance-big { font-size: 30px; margin-top: 4px; }
.robux-balance-big svg { width: 26px; height: 26px; }
.robux-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(175px, 1fr)); gap: 12px; }
.robux-tier {
  display: flex; flex-direction: column; gap: 10px; padding: 18px 16px;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); text-align: center;
}
.robux-tier-amt { font-size: 22px; display: flex; justify-content: center; }
.robux-tier-amt svg { width: 20px; height: 20px; }
.tx-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 14px; border: 1px solid var(--line); border-radius: var(--radius-xs); background: var(--bg);
}

/* ---- Global Roblox-style Footer ---- */
.rbx-footer {
  margin-top: 48px; padding-top: 20px; border-top: 1px solid var(--line);
  display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center;
}
.footer-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 22px; }
.footer-links a { font-size: 13.5px; font-weight: 500; color: var(--muted); text-decoration: none; }
.footer-links a:hover { color: var(--fg); text-decoration: underline; }
.footer-copy { font-size: 11.5px; color: var(--muted); }

/* ---- skeletons ---- */
.skel {
  background: linear-gradient(90deg, var(--placeholder) 0%, var(--surface) 50%, var(--placeholder) 100%);
  background-size: 200% 100%; animation: shimmer 1.4s infinite linear; border-radius: var(--radius);
}
.skel-title { width: 170px; height: 22px; }
.skel-line { height: 14px; width: 82%; border-radius: 3px; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ---- dialogs ---- */
dialog {
  color: var(--fg); background: var(--bg); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 0; box-shadow: var(--shadow);
}
dialog::backdrop { background: rgb(0 0 0 / .55); }
dialog[open] { animation: pop .15s ease-out; }
@keyframes pop { from { opacity: 0; transform: translateY(6px) scale(.98); } }
.small-dialog { width: min(440px, calc(100vw - 32px)); }
.small-dialog form { padding: 22px; display: grid; gap: 12px; }
.small-dialog h2 { margin: 0; font-size: 20px; font-weight: 700; }
.small-dialog p { margin: 0; font-size: 14px; line-height: 1.45; }
.small-dialog input {
  padding: 10px 12px; border-radius: var(--radius-sm); border: 1px solid var(--line-strong);
  background: var(--surface); color: var(--fg); font: inherit; font-size: 14px;
}
.small-dialog input:focus { outline: none; border-color: var(--fg); background: var(--bg); }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 4px; }

/* ---- responsive ---- */
@media (max-width: 960px) {
  .brand-word { display: none; }
}
@media (max-width: 900px) {
  .menu-toggle { display: grid; }
  .sidebar { transform: translateX(-100%); visibility: hidden; pointer-events: none; transition: transform .18s ease, visibility .18s ease; box-shadow: var(--shadow); }
  .sidebar.open { transform: none; visibility: visible; pointer-events: auto; }
  .content { margin-left: var(--ad-left-w, 0px); margin-right: var(--ad-right-w, 0px); }
  .avatar-layout, .inv-layout, .item-detail-top { grid-template-columns: 1fr; }
  .avatar-left { position: static; max-width: 320px; }
}
@media (max-width: 820px) {
  .game-top { grid-template-columns: 1fr; }
  .play-wrap { margin-top: 8px; padding-top: 6px; }
  .topnav { display: none; }
}
@media (max-width: 640px) {
  .search kbd { display: none; }
  .topbar { gap: 8px; padding: 0 10px; }
  .account-btn span { display: none; }
  .account-btn { padding: 2px; }
  .btn.topbar-btn.outline { display: none; }
  .content { padding-left: 14px; padding-right: 14px; }
  .track-wrap { grid-template-columns: minmax(0, 1fr); margin: 0; }
  .track-arrow { display: none; }
  .badge-card { flex-direction: column; text-align: center; }
  .profile-cta { min-width: 140px; }
}

/* ---- player (dark experience framed by AdSense rails) ---- */
#player {
  position: fixed;
  top: var(--ad-top-h, 0px);
  right: var(--ad-right-w, 0px);
  bottom: var(--ad-bottom-h, 0px);
  left: var(--ad-left-w, 0px);
  width: calc(100vw - var(--ad-left-w, 0px) - var(--ad-right-w, 0px));
  height: calc(100vh - var(--ad-top-h, 0px) - var(--ad-bottom-h, 0px));
  overflow: hidden;
  background: #121215;
}
#canvas {
  position: absolute;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
  display: block;
  outline: none;
}
#input-container { position: fixed; left: -9999px; top: 0; }
#loading-overlay {
  position: absolute; inset: 0; background: #121215; color: #f7f7f8;
  display: flex; align-items: center; justify-content: center;
}
#loading-background-image {
  position: absolute; inset: -40px; width: calc(100% + 80px); height: calc(100% + 80px);
  object-fit: cover; opacity: .28; filter: blur(24px) saturate(1.1);
}
#loading-background-image:not([src]) { display: none; }
.loading-center, .loading-error-panel {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center;
}
#loading-icon-shell img { width: 132px; height: 132px; border-radius: 12px; box-shadow: 0 10px 28px rgb(0 0 0 / .5); }
#loading-icon-shell img:not([src]) { visibility: hidden; }
#loading-experience-title { font-size: 24px; font-weight: 800; letter-spacing: -.02em; max-width: 80vw; color: #fff; }
.creator-line { color: #bdbebe; font-size: 14px; }
#status { color: #bdbebe; min-height: 1.4em; max-width: 80vw; font-size: 14px; }
.spinner {
  width: 28px; height: 28px; margin-top: 8px; border-radius: 50%;
  border: 3px solid rgb(255 255 255 / .2); border-top-color: #fff; animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
#loading-overlay:has(.loading-error-panel:not([hidden])) .loading-center { display: none; }
#loading-overlay .btn.ghost { background: transparent; border-color: rgb(255 255 255 / .35); color: #fff; }
#loading-overlay .btn.ghost:hover { background: rgb(255 255 255 / .1); }
.loading-error-panel {
  background: #191a1f; color: #f7f7f8; border: 1px solid #2f3138;
  border-radius: var(--radius); padding: 26px; max-width: 420px; box-shadow: 0 12px 32px rgb(0 0 0 / .55);
}
.loading-error-panel h2 { margin: 0; font-weight: 700; }
.loading-error-panel p { margin: 0; color: #bdbebe; }
.loading-error-panel code { background: #202227; border-color: #2f3138; color: #f7f7f8; }
#debug-info { position: absolute; bottom: 4px; left: 6px; font-size: 11px; color: #bdbebe; }

/* ---- proxy status ---- */
.proxy-pill {
  margin: auto 4px 0; display: flex; align-items: center; gap: 7px; padding: 6px 8px;
  border-radius: var(--radius-sm); background: var(--surface); border: 1px solid var(--line);
  font-size: 11px; font-weight: 500; color: var(--muted);
}
.proxy-pill .dot { width: 7px; height: 7px; border-radius: 50%; flex: none; background: #f68802; }
.proxy-pill.ok .dot { background: var(--live); }
.proxy-pill.bad .dot { background: var(--danger); }
