/* Bricksly — modern theme (2026 refresh of the old 2013-style CSS).
   Same selectors/markup as before; the look is rebuilt: flat surfaces,
   rounded cards, system font stack, smooth hovers. LIGHT by default,
   dark via html[data-theme="dark"] (toggle in Settings). */

:root {
  --page-bg: #f2f4f7;
  --content-bg: #ffffff;
  --content-bg2: #f6f8fa;
  --border: #dfe3e9;
  --border-soft: #e8ebf0;
  --text: #20242b;
  --muted: #5f6774;
  --heading: #14181f;
  --link: #1a5fd0;
  --accent: #2563eb;
  --accent-hover: #1d4fc4;
  --input-bg: #ffffff;
  --input-border: #c9cfd8;
  --thumb-bg: #eef1f5;
  --table-head: #f2f4f7;
  --table-alt: #f7f9fb;
  --chip-bg: #eef1f5;
  --footer-text: #9aa1ab;
  --header-bg: #f6f8fc;            /* light mode: soft white bar, navy ink */
  --header-line: #37b559;          /* brick green under-line (both themes) */
  --header-link: #1b2b52;          /* the wordmark's navy */
  --header-ink: #16264d;
  --header-ink-soft: rgba(22, 38, 77, 0.66);
  --header-hover: rgba(27, 43, 82, 0.09);
  --shadow: 0 1px 2px rgba(16,24,40,0.06), 0 4px 12px rgba(16,24,40,0.06);
  --shadow-lift: 0 4px 10px rgba(16,24,40,0.10), 0 12px 28px rgba(16,24,40,0.10);
  --green: #2ea44f;
  --green-hover: #278f44;
  --red: #dc3f36;
  --red-hover: #c22f27;
  --ok: #1a8a3c;
  --err: #d92c22;
}
html[data-theme="dark"] {
  --page-bg: #0f1116;
  --content-bg: #171a21;
  --content-bg2: #1e222b;
  --border: #2a2f3a;
  --border-soft: #232833;
  --text: #e8eaed;
  --muted: #98a0ac;
  --heading: #f2f4f7;
  --link: #6ea8fe;
  --accent: #3b76f6;
  --accent-hover: #2f64d9;
  --input-bg: #1e222b;
  --input-border: #333947;
  --thumb-bg: #1e222b;
  --table-head: #1e222b;
  --table-alt: #1b1f27;
  --chip-bg: #242936;
  --footer-text: #6d7480;
  --header-bg: #3a4db1;            /* dark mode: indigo bar, white ink */
  --header-line: #37b559;
  --header-link: #ffffff;
  --header-ink: #ffffff;
  --header-ink-soft: rgba(255, 255, 255, 0.8);
  --header-hover: rgba(255, 255, 255, 0.14);
  --shadow: 0 1px 2px rgba(0,0,0,0.4), 0 4px 14px rgba(0,0,0,0.25);
  --shadow-lift: 0 4px 10px rgba(0,0,0,0.45), 0 10px 28px rgba(0,0,0,0.3);
  --green: #2ea44f;
  --green-hover: #278f44;
  --red: #dc3f36;
  --red-hover: #c22f27;
  --ok: #4fc26e;
  --err: #ff7a72;
}

* { box-sizing: content-box; }
html, body { height: 100%; }
body {
  margin: 0;
  padding: 0;
  background: var(--page-bg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
               "Helvetica Neue", Arial, sans-serif;
  font-size: 13px;
  line-height: 1.45;
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--link); text-decoration: none; transition: color 0.12s; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

/* ---------- Site header (fixed brand-blue bar, flat) ---------- */
.site-header {
  background: var(--header-bg);
  height: 52px;
  position: fixed;
  width: 100%;
  z-index: 10001;
  top: 0;
  border-bottom: 2px solid var(--header-line);
  box-shadow: 0 1px 8px rgba(0,0,0,0.25);
}
#navigation-container {
  text-align: left;
  position: relative;
  height: 52px;
  max-width: 1060px;
  margin: 0 auto;
  padding: 0 16px;
}
.btn-logo {
  display: inline-flex;
  align-items: center;
  float: left;
  height: 52px;
  margin-right: 18px;
  padding: 0 2px;
  font-size: 21px;      /* fallback if the wordmark image is missing */
  font-weight: 800;
  letter-spacing: 0.5px;
  color: var(--header-ink) !important;
  text-decoration: none !important;
}
.btn-logo img { height: 30px; display: block; }
#navigation-menu { display: inline-block; float: left; height: 52px; }
#navigation-menu ul { margin: 0; padding: 10px 0; }
#navigation-menu li {
  position: relative; /* anchors the injected .notif-badge (Moderate count) */
  float: left;
  list-style: none;
  margin: 0 2px;
  padding: 0;
  height: 32px;
  font-size: 13.5px;
  cursor: pointer;
  font-weight: 600;
  border-radius: 8px;
  transition: background 0.12s;
}
#navigation-menu li:hover { background: var(--header-hover); }
#navigation-menu li a {
  display: block;
  padding: 0 12px;
  line-height: 32px;
  color: var(--header-link);
  font-size: 13.5px;
  text-decoration: none;
}
#navigation-menu li:hover a { color: var(--header-ink); }
#header-login-container { float: right; height: 52px; line-height: 52px; }
#header-login-container a, #header-login-container span { color: var(--header-ink); font-size: 13px; }
#header-signup { font-weight: 700; color: var(--header-ink); }
#header-or { color: var(--header-ink-soft); margin: 0 5px; }
.header-divider {
  float: right;
  height: 22px;
  width: 0;
  margin: 15px 8px 0;
  border-left: 1px solid rgba(27, 43, 82, 0.25);
}
.authenticated-name {
  float: right;
  color: var(--header-ink);
  font-size: 12.5px;
  font-weight: 600;
  padding: 0 6px;
  line-height: 52px;
}
.header-link {
  float: right;
  padding: 0 10px;
  line-height: 52px;
  font-weight: 600;
  cursor: pointer;
  background: none;
  border: none;
  color: var(--header-ink-soft);
  font-size: 13px;
  font-family: inherit;
  height: 52px;
  border-radius: 8px;
  transition: background 0.12s, color 0.12s;
}
.header-link:hover { background: var(--header-hover); color: var(--header-ink); text-decoration: none; }
.header-icon {
  float: right;
  position: relative;
  display: block;
  padding: 19px 8px 0;
  height: 25px;
  cursor: pointer;
  border-radius: 8px;
}
.header-icon:hover { background: var(--header-hover); }
.header-icon svg { display: block; }
.header-currency {
  float: right;
  display: block;
  padding: 0 9px;
  height: 52px;
  line-height: 52px;
  color: var(--header-ink);
  font-size: 12px;
  font-weight: 700;
  text-decoration: none !important;
  border-radius: 8px;
  transition: background 0.12s;
}
.header-currency:hover { background: var(--header-hover); }
.header-currency svg { display: inline-block; vertical-align: -1px; margin-right: 4px; }
/* Verified check / admin hammer next to usernames */
.name-badge { display: inline-block; vertical-align: -3px; margin-left: 4px; line-height: 0; }
.name-badge svg { display: inline-block; }

/* Avatar page: equipped slots + wardrobe */
.WearSlots { display: flex; gap: 10px; flex-wrap: wrap; margin: 6px 0 14px; }
.WearSlot {
  position: relative;
  width: 64px;
  height: 64px;
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  background: var(--thumb-bg);
  text-align: center;
}
.WearSlot img { width: 100%; height: 100%; object-fit: contain; border-radius: 9px; }
.WearSlot.empty {
  border-style: dashed;
  color: var(--muted);
  font-size: 10px;
  line-height: 64px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}
.WearSlot .slot-x {
  position: absolute;
  top: -6px; right: -6px;
  width: 18px; height: 18px;
  line-height: 17px;
  border-radius: 50%;
  background: var(--red);
  color: #fff !important;
  font-size: 11px;
  font-weight: 700;
  text-align: center;
  text-decoration: none !important;
  box-shadow: 0 1px 3px rgba(0,0,0,0.35);
}
.WearSlot .slot-x:hover { background: var(--red-hover); }
.WardrobeCard { width: 96px; margin: 0; text-align: center; }
.WardrobeCard .ItemThumb { width: 88px; height: 88px; line-height: 88px; font-size: 34px; }
.WardrobeCard .GameName { display: block; font-size: 11.5px; font-weight: 600; margin: 5px 0 1px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.WardrobeCard .wear-action { font-size: 11px; font-weight: 600; }
.WardrobeCard .wear-action .worn-tag { color: var(--ok); }

.price-d { color: #3fc9d6; font-weight: 700; font-size: 12px; }
.price-s { color: #f5a623; font-weight: 700; font-size: 12px; }
.cur-icon { width: 15px; height: 15px; vertical-align: -3px; margin-right: 3px; }

/* Install-prompt modal (Play/Edit with no bricksly:// handler yet) */
.ModalOverlay {
  position: fixed;
  inset: 0;
  z-index: 20000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.55);
}
.ModalBox {
  width: 400px;
  max-width: calc(100vw - 40px);
  background: var(--content-bg);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow-lift);
  padding: 22px 24px;
}

/* Presence ("Playing X" / "Editing X" / "In Website" / "Offline") */
.presence { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; }
.presence-dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; flex: none; }
.presence.ingame { color: #2ecc71; }
.presence.ingame a { color: #2ecc71; text-decoration: underline; }
.presence.studio { color: #f5a623; }
.presence.website { color: var(--link); }
.presence.offline { color: var(--muted); }

/* Game page server list */
.ServerRow {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  background: var(--content-bg2);
  padding: 8px 12px;
  margin-bottom: 8px;
}
.ServerRow .server-label { font-weight: 600; font-size: 12.5px; white-space: nowrap; }
.ServerRow .server-heads { display: flex; flex-wrap: wrap; gap: 4px; }
.ServerRow .server-heads img {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--thumb-bg);
  border: 1px solid var(--border-soft);
}
.ServerRow .server-join { margin-left: auto; white-space: nowrap; }
.ServerRow .server-queue { color: var(--muted); font-size: 11.5px; white-space: nowrap; }

/* Per-row "3 dots" dropdown (Develop page's game actions). */
.DotMenuWrap { position: relative; display: inline-block; vertical-align: middle; }
.DotMenuBtn {
  display: inline-block;
  width: 26px; height: 26px;
  line-height: 24px;
  text-align: center;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--content-bg2);
  color: var(--muted);
  font-weight: 700;
  cursor: pointer;
  user-select: none;
}
.DotMenuBtn:hover { color: var(--text); border-color: var(--accent); }
.DotMenu {
  display: none;
  position: absolute;
  right: 0;
  top: calc(100% + 4px);
  min-width: 175px;
  background: var(--content-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: var(--shadow-lift);
  padding: 4px;
  z-index: 60;
}
.DotMenu.open { display: block; }
.DotMenu a {
  display: block;
  padding: 7px 10px;
  border-radius: 6px;
  font-size: 12.5px;
  color: var(--text);
  text-decoration: none;
  white-space: nowrap;
}
.DotMenu a:hover { background: var(--content-bg2); text-decoration: none; }
.DotMenu a.danger { color: var(--err); }
.DotMenu .sep { height: 1px; background: var(--border-soft); margin: 4px 6px; }
.header-currency .cur-icon { width: 16px; height: 16px; vertical-align: -3.5px; }
.notif-badge {
  position: absolute;
  top: -4px;
  right: -6px;
  background: #ef4444;
  color: #fff;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  line-height: 15px;
  padding: 0 4.5px;
  min-width: 6px;
  text-align: center;
  box-shadow: 0 1px 3px rgba(0,0,0,0.35);
}
#navigation-menu .notif-badge { top: -4px; right: -4px; }

/* Charcoal sub-nav of old → clean secondary nav bar under the header */
.SubNav {
  background: var(--content-bg);
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  height: 40px;
  line-height: 40px;
  padding: 0 8px;
  margin-bottom: 14px;
  box-shadow: var(--shadow);
}
.SubNav a {
  position: relative;
  display: inline-block;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  padding: 0 13px;
  height: 40px;
  text-decoration: none;
  transition: color 0.12s;
}
.SubNav a:hover { color: var(--text); text-decoration: none; }
.SubNav a.active { color: var(--accent); }
.SubNav a.active::after {
  content: "";
  position: absolute;
  left: 12px; right: 12px; bottom: 0;
  height: 3px;
  border-radius: 3px 3px 0 0;
  background: var(--accent);
}
.SubNav .notif-badge { top: 5px; right: -2px; }

/* ---------- Body ---------- */
#BodyWrapper {
  margin: 0 auto;
  max-width: 1060px;
  padding: 68px 16px 0; /* clear the fixed header */
}
#Body {
  min-height: 550px;
  padding: 0 0 30px;
  margin: 0 auto;
}

/* Front page top panel: login box left, hero right */
.TopPanel {
  display: flex;
  gap: 28px;
  align-items: stretch;
  background: var(--content-bg);
  border: 1px solid var(--border-soft);
  border-radius: 14px;
  box-shadow: var(--shadow);
  padding: 26px 28px;
  margin-bottom: 16px;
}
.FrontPageLoginBox { flex: 0 0 250px; padding-right: 26px; border-right: 1px solid var(--border-soft); }
.FrontPageHero { flex: 1; display: flex; flex-direction: column; justify-content: center; }
.FrontPageHero h2 {
  font-size: 38px;
  font-weight: 800;
  color: var(--heading);
  letter-spacing: -1px;
  line-height: 1.1;
  margin: 0 0 10px;
}
.FrontPageHero p { font-size: 15px; color: var(--muted); margin: 0 0 22px; max-width: 520px; }

/* Login form */
.DGB_Header {
  text-align: center;
  padding: 2px 0 10px;
  font-size: 17px;
  font-weight: 700;
  color: var(--heading);
}
.DGB_Label {
  color: var(--muted);
  text-align: left;
  font-size: 12px;
  font-weight: 600;
  padding: 2px 0 4px;
}
.DGB_TextBox {
  box-sizing: border-box;
  width: 100%;
  height: 34px;
  border: 1px solid var(--input-border);
  border-radius: 8px;
  padding: 0 10px;
  margin-bottom: 10px;
  font-family: inherit;
  font-size: 13px;
  background: var(--input-bg);
  color: var(--text);
  transition: border-color 0.12s, box-shadow 0.12s;
}
.DGB_TextBox:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent);
}
textarea, select.DGB_Select {
  box-sizing: border-box;
  background: var(--input-bg);
  color: var(--text);
  border: 1px solid var(--input-border);
  border-radius: 8px;
  font-family: inherit;
  padding: 6px 8px;
  transition: border-color 0.12s, box-shadow 0.12s;
}
textarea:focus, select.DGB_Select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent);
}

/* Primary button (the old silver Login tile → solid accent) */
.ControlLoginButton {
  padding: 0 16px;
  margin: 8px 0 0;
  background: var(--accent);
  display: inline-block;
  width: auto;
  white-space: nowrap;
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 600;
  color: #fff !important;
  height: 34px;
  line-height: 34px;
  border: none;
  border-radius: 8px;
  text-align: center;
  cursor: pointer;
  transition: background 0.12s, transform 0.08s;
}
.FrontPageLoginBox .ControlLoginButton {
  display: block;
  width: 100%;
  box-sizing: border-box;
  margin: 10px auto 0;
}
.ControlLoginButton:hover { background: var(--accent-hover); text-decoration: none; }
.ControlLoginButton:active { transform: translateY(1px); }

.separateSignUpFromLogin {
  border-top: 1px solid var(--border-soft);
  margin-top: 16px;
  padding-top: 14px;
  text-align: center;
}
.not-a-member { font-size: 12.5px; color: var(--muted); }

/* Green / red action buttons */
.GreenButton, .RedButton {
  display: inline-block;
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  color: #fff !important;
  height: 34px;
  line-height: 34px;
  padding: 0 16px;
  border-radius: 8px;
  border: none;
  transition: background 0.12s, transform 0.08s;
}
.GreenButton { background: var(--green); }
.GreenButton:hover { background: var(--green-hover); text-decoration: none; }
.RedButton { background: var(--red); }
.RedButton:hover { background: var(--red-hover); text-decoration: none; }
.GreenButton:active, .RedButton:active { transform: translateY(1px); }
.RedButton.big { height: 46px; line-height: 46px; font-size: 17px; font-weight: 700; padding: 0 26px; border-radius: 10px; }

/* ---------- Section card (old ShadowedStandardBox) ---------- */
.ShadowedStandardBox { position: relative; margin-bottom: 16px; }
.ShadowedStandardBox .Header {
  display: inline-block;
  height: auto;
  padding: 0 2px 8px;
  font-size: 19px;
  font-weight: 700;
  color: var(--heading);
  background: none;
  border-radius: 0;
  white-space: nowrap;
  letter-spacing: -0.2px;
}
.ShadowedStandardBox .Content {
  padding: 16px 18px;
  margin-bottom: 8px;
  border: 1px solid var(--border-soft);
  border-radius: 14px;
  background: var(--content-bg);
  box-shadow: var(--shadow);
}

/* Bordered box (used for forms) */
.BlueBox {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--content-bg2);
  padding: 14px;
}

/* Stats-style labels */
.PlaceStatLabel { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: 0.4px; }
.PlaceStatValue { margin: 0 0 8px; font-size: 13px; font-weight: 600; }

/* Character editor */
.parts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 26px; margin: 8px 0 12px; }
.part { display: flex; align-items: center; gap: 10px; padding: 2px 0; }
.part span { flex: 1; font-size: 12.5px; font-weight: 600; }
.avatar { flex: 0 0 180px; text-align: center; padding: 6px 10px 6px 0; }
.character-editor { display: flex; gap: 20px; }
.character-controls { flex: 1; min-width: 0; }

/* Site alert banners (admin banners keep their own bg color;
   text stays dark for readability on the light banner colors) */
.SystemAlert {
  background: #fff3bf;
  border: 1px solid rgba(0,0,0,0.15);
  border-radius: 10px;
  color: #111;
  font-size: 12.5px;
  font-weight: 500;
  text-align: center;
  padding: 8px 12px;
  margin: 0 0 12px;
}
.SystemAlert a { font-weight: 700; color: #0a54b0; }

select.DGB_Select {
  height: 32px;
  font-size: 13px;
  margin: 0 4px 10px 0;
}

.row { display: block; margin-top: 12px; }
.row .GreenButton, .row .RedButton, .row .ControlLoginButton { margin-right: 8px; display: inline-block; }
.row .ControlLoginButton { width: auto; padding: 0 16px; margin-left: 0; margin-right: 8px; }

.msg { font-size: 12.5px; margin-top: 10px; min-height: 16px; font-weight: 600; }
.msg.err { color: var(--err); }
.msg.ok { color: var(--ok); }
.muted { color: var(--muted); font-size: 11.5px; font-weight: normal; }

h1 { font-size: 26px; margin: 0 0 6px; font-weight: 800; letter-spacing: -0.5px; color: var(--heading); }

/* ---------- Games page ---------- */
.GamesSortTabs { border-bottom: 1px solid var(--border-soft); padding: 0 0 10px; margin-bottom: 16px; }
.GamesSortTabs a {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  margin-right: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  transition: color 0.12s, background 0.12s;
}
.GamesSortTabs a:hover { color: var(--text); background: var(--content-bg2); text-decoration: none; }
.GamesSortTabs a.active {
  color: #fff;
  background: var(--accent);
  text-decoration: none;
  cursor: default;
}
.GamesSortTabs input[type=text] {
  box-sizing: border-box;
  float: right;
  width: 200px;
  height: 32px;
  border: 1px solid var(--input-border);
  border-radius: 999px;
  padding: 0 14px;
  margin-top: -2px;
  font-family: inherit;
  font-size: 12.5px;
  background: var(--input-bg);
  color: var(--text);
  transition: border-color 0.12s, box-shadow 0.12s;
}
.GamesSortTabs input[type=text]:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent);
}
.GameGrid { display: flex; flex-wrap: wrap; gap: 18px 16px; }
.GameCard { width: 205px; margin: 0; }
.GameThumb {
  display: block;
  width: 205px;
  height: 115px;
  line-height: 115px;
  text-align: center;
  font-size: 46px;
  font-weight: 800;
  color: rgba(255,255,255,0.9);
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  text-decoration: none !important;
  overflow: hidden;
  transition: transform 0.14s, box-shadow 0.14s;
}
a.GameThumb:hover, .GameCard:hover .GameThumb {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lift);
}
.GameThumb.big { width: 420px; height: 230px; line-height: 230px; font-size: 92px; border-radius: 12px; }
.GameCard .GameName {
  display: block;
  font-size: 13.5px;
  font-weight: 600;
  margin: 7px 0 1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text);
}
.GameCard .GameByLine, .GameCard .GameVisits { font-size: 11.5px; color: var(--muted); }
.GameCard .GameByLine a { color: var(--link); }
.Pager { width: 100%; text-align: center; padding: 14px 0 4px; font-size: 12.5px; }
.Pager a, .Pager span { margin: 0 8px; font-weight: 600; }

/* Game detail page */
.PlaceHeader h1 { font-size: 30px; letter-spacing: -0.5px; margin: 0; color: var(--heading); }
.PlaceHeader .GameByLine { font-size: 12.5px; color: var(--muted); margin: 3px 0 12px; }
.PlaceColumns { display: flex; gap: 26px; padding: 5px 0; }
.PlaceLeft { flex: 0 0 440px; max-width: 440px; }
.PlaceRight { flex: 1; min-width: 0; }
.PlaceStats { border-top: 1px solid var(--border-soft); margin-top: 16px; padding-top: 12px; }
.PlaceStats .PlaceStatLabel { display: inline-block; width: 90px; }
.PlaceDescription {
  border-top: 1px solid var(--border-soft);
  margin-top: 16px;
  padding-top: 12px;
  font-size: 13px;
  white-space: pre-wrap;
  word-wrap: break-word;
}

/* ---------- People / profiles ---------- */
.PersonCard {
  width: 150px;
  margin: 0;
  text-align: center;
}
.PersonAvatar {
  display: block;
  width: 100px;
  height: 130px;
  margin: 0 auto 6px;
  padding: 5px 24px;
  background: var(--thumb-bg);
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  transition: transform 0.14s, box-shadow 0.14s;
}
.PersonCard:hover .PersonAvatar { transform: translateY(-2px); box-shadow: var(--shadow-lift); }
.PersonCard .PersonName {
  display: block;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.PersonCard .FriendAction { font-size: 11.5px; margin-top: 3px; }
.FriendAction a { font-weight: 600; }
.FriendAction .isFriend { color: var(--ok); font-weight: 600; }
.FriendAction .requested { color: var(--muted); }
.isFriend { color: var(--ok); }

.ProfileColumns { display: flex; gap: 26px; padding: 5px 0; }
.ProfileLeft { flex: 0 0 260px; text-align: center; }
.ProfileLeft .PersonAvatar { width: 180px; height: 240px; padding: 10px 30px; }
.ProfileRight { flex: 1; min-width: 0; }
.ProfileBlurb {
  font-size: 13px;
  white-space: pre-wrap;
  word-wrap: break-word;
  margin-bottom: 12px;
  min-height: 40px;
}
.SectionLabel {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--muted);
  border-bottom: 1px solid var(--border-soft);
  padding-bottom: 6px;
  margin: 18px 0 12px;
}

/* ---------- Catalog ---------- */
.ItemThumb {
  display: block;
  width: 140px;
  height: 140px;
  margin: 0 auto;
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  background: var(--thumb-bg);
  text-align: center;
  line-height: 140px;
  font-size: 56px;
  color: rgba(255,255,255,0.9);
  overflow: hidden;
  text-decoration: none !important;
  transition: transform 0.14s, box-shadow 0.14s;
}
.ItemCard:hover .ItemThumb, a.ItemThumb:hover { transform: translateY(-2px); box-shadow: var(--shadow-lift); }
.ItemThumb img { width: 100%; height: 100%; object-fit: contain; }
.ItemCard { width: 160px; margin: 0; text-align: center; }
.ItemCard .GameName { display: block; font-size: 12.5px; font-weight: 600; margin: 7px 0 1px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ItemCard .GameByLine { font-size: 11.5px; color: var(--muted); }
.ItemPrice { font-size: 11.5px; font-weight: 700; color: var(--ok); }
.ItemTypeChip {
  display: inline-block;
  background: var(--chip-bg);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 1px 8px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--muted);
}

/* ---------- Inbox ---------- */
.MessageList { width: 100%; border-collapse: collapse; font-size: 13px; }
.MessageList td {
  border-bottom: 1px solid var(--border-soft);
  padding: 9px 10px;
  vertical-align: top;
}
.MessageList tr.unread td { font-weight: 600; background: var(--table-alt); }
.MessageList tr:hover td { background: var(--content-bg2); cursor: pointer; }
.MessageView {
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  background: var(--content-bg2);
  padding: 14px;
  margin: 10px 0;
}
.MessageView .MessageBody { white-space: pre-wrap; word-wrap: break-word; margin-top: 8px; }

/* ---------- Badges ---------- */
.BadgeList { display: flex; flex-wrap: wrap; gap: 12px; }
.BadgeItem { width: 90px; margin: 0; text-align: center; }
.BadgeMedallion {
  display: inline-block;
  width: 52px;
  height: 52px;
  line-height: 52px;
  border-radius: 50%;
  color: #fff;
  font-size: 26px;
  text-align: center;
  border: 3px solid rgba(0,0,0,0.25);
  box-shadow: inset 0 8px 12px rgba(255,255,255,0.35), inset 0 -8px 12px rgba(0,0,0,0.25);
  text-shadow: 0 -1px 1px rgba(0,0,0,0.4);
}
.BadgeItem .BadgeName { font-size: 10.5px; font-weight: 600; margin-top: 4px; }

/* ---------- Admin panel ---------- */
.AdminTable { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.AdminTable th {
  text-align: left;
  background: var(--table-head);
  border-bottom: 1px solid var(--border);
  padding: 8px 10px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--muted);
}
.AdminTable td { border-bottom: 1px solid var(--border-soft); padding: 7px 10px; vertical-align: top; }
.AdminTable tr:nth-child(even) td { background: var(--table-alt); }
.AdminTable tr:hover td { background: var(--content-bg2); }
.AdminTable .actions a { margin-right: 8px; font-weight: 600; white-space: nowrap; }
.AdminTable .badge-chip, .badge-chip {
  display: inline-block;
  background: var(--chip-bg);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 1px 7px;
  margin: 1px 2px 1px 0;
  font-size: 10.5px;
  font-weight: 600;
}
.role-admin { color: var(--err); font-weight: 700; }

/* ---------- Footer ---------- */
#Footer {
  background: var(--page-bg);
  text-align: center;
  font-size: 13px;
  color: var(--footer-text);
  margin: 24px 0 0;
  width: 100%;
  padding: 1.5em 0;
  border-top: 1px solid var(--border-soft);
}
#Footer .FooterNav { max-width: 1060px; margin: 0 auto; padding-bottom: 4px; }
#Footer .FooterNav a { color: var(--muted); margin: 0 9px; font-size: 12px; font-weight: 500; }
#Footer .SEOGenreLinks { padding: 0.8em 0 1em; font-size: 11px; }
#Footer .SEOGenreLinks a { color: var(--footer-text); margin: 0 6px; }
#Footer .Legalese { color: var(--footer-text); font-size: 10.5px; margin: 0 auto 0.5em; max-width: 900px; }

/* ---------- Small screens ---------- */
@media (max-width: 760px) {
  .TopPanel { flex-direction: column; }
  .FrontPageLoginBox { flex: none; padding-right: 0; border-right: none;
    border-bottom: 1px solid var(--border-soft); padding-bottom: 18px; }
  .PlaceColumns, .ProfileColumns, .character-editor { flex-direction: column; }
  .PlaceLeft { flex: none; max-width: 100%; }
  .ProfileLeft { flex: none; }
  .GameThumb.big { width: 100%; }
  #navigation-menu li a { padding: 0 8px; }
}

/* ---- Mobile (additive — desktop rules above are untouched) ------------------ */
@media (max-width: 760px) {
  /* The fixed header must stay ONE row: floats wrap on narrow screens and
     the overflow paints over the SubNav below. Flex + horizontal scroll
     keeps every link reachable without ever growing past 52px. */
  #navigation-container {
    display: flex;
    align-items: center;
    padding: 0 8px;
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  #navigation-container::-webkit-scrollbar { display: none; }
  .btn-logo { float: none; flex: 0 0 auto; font-size: 16px; margin-right: 8px; }
  .btn-logo img { height: 24px; }
  #navigation-menu { float: none; flex: 0 0 auto; }
  #navigation-menu ul { display: flex; padding: 10px 0; }
  #navigation-menu li { float: none; flex: 0 0 auto; }
  #navigation-menu li a { padding: 0 8px; font-size: 13px; }
  #header-login-container {
    float: none;
    flex: 0 0 auto;
    margin-left: auto;
    padding-left: 10px;
    font-size: 12px;
  }
  .header-divider { float: none; flex: 0 0 auto; margin: 0 6px; }
  .authenticated-name { float: none; flex: 0 0 auto; }
  #logoutBtn { float: none; flex: 0 0 auto; }

  /* The account SubNav (second bar) scrolls sideways instead of wrapping. */
  .SubNav {
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .SubNav::-webkit-scrollbar { display: none; }

  #BodyWrapper { padding: 62px 8px 0; }
  .TopPanel, .PlaceColumns { flex-direction: column; }
  .PlaceLeft { flex: none; max-width: 100%; }
  .GameGrid { gap: 12px 10px; }
  .Content { overflow-x: auto; }
  .Content form input[type="text"], .Content form input[type="file"],
  .Content form select { max-width: 100%; box-sizing: border-box; }
  .AdminTable { font-size: 11.5px; }
}

/* ---------- modal dialogs (moderation UI) ---------- */
.modal-scrim {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(8, 10, 14, 0.62);
  display: flex; align-items: center; justify-content: center;
  animation: modal-fade .12s ease-out;
}
@keyframes modal-fade { from { opacity: 0; } to { opacity: 1; } }
.modal-box {
  background: var(--content-bg); color: var(--text);
  border: 1px solid var(--border); border-radius: 8px;
  box-shadow: var(--shadow-lift);
  width: min(420px, calc(100vw - 32px));
  padding: 18px 20px;
  animation: modal-pop .14s ease-out;
}
@keyframes modal-pop { from { transform: scale(.96); opacity: .4; } to { transform: none; opacity: 1; } }
.modal-title {
  font-size: 15px; font-weight: bold; color: var(--heading);
  margin-bottom: 12px;
}
.modal-row { margin: 10px 0; }
.modal-row label {
  display: block; font-size: 11px; font-weight: bold;
  color: var(--muted); text-transform: uppercase; margin-bottom: 4px;
}
.modal-row textarea {
  width: 100%; box-sizing: border-box; resize: vertical;
  background: var(--input-bg); color: var(--text);
  border: 1px solid var(--input-border); border-radius: 4px;
  font: 12px Arial; padding: 6px;
}
.modal-actions {
  display: flex; justify-content: flex-end; gap: 8px; margin-top: 14px;
}
.modal-btn {
  border: 1px solid var(--border); border-radius: 4px;
  background: var(--content-bg2); color: var(--text);
  font: bold 12px Arial; padding: 7px 16px; cursor: pointer;
}
.modal-btn:hover { border-color: var(--muted); }
.modal-btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.modal-btn.primary:hover { background: var(--accent-hover); }
.modal-btn.primary.danger { background: var(--red); border-color: var(--red); }
.modal-btn.primary.danger:hover { background: var(--red-hover); }
.modal-btn:disabled { opacity: .55; cursor: default; }

/* ---------- admin panel: user cards ---------- */
.UserRows { border-top: 1px solid var(--border-soft); }
.UserRow {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 6px; border-bottom: 1px solid var(--border-soft);
  min-width: 0;
}
.UserRow:hover { background: var(--content-bg2); }
.UserRow .headshot {
  width: 42px; height: 42px; flex: 0 0 42px;
  border-radius: 6px; background: var(--thumb-bg);
  border: 1px solid var(--border-soft); overflow: hidden;
}
.UserRow .headshot img { width: 100%; height: 100%; object-fit: contain; }
.UserRow .who { flex: 1 1 auto; min-width: 0; text-align: left; }
.UserRow .who .toprow {
  display: flex; align-items: center; gap: 6px; min-width: 0;
}
.UserRow .who .toprow a {
  font-weight: bold; font-size: 13px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.UserRow .who .sub {
  font-size: 11px; color: var(--muted);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.UserRow .rowactions { flex: 0 0 auto; display: flex; gap: 6px; }
.chip {
  display: inline-block; font-size: 10px; font-weight: bold;
  padding: 1px 7px; border-radius: 9px; vertical-align: 1px;
  background: var(--chip-bg); color: var(--muted); white-space: nowrap;
}
.chip.admin { background: #7c2d2d; color: #ffd9d6; }
.chip.mod { background: #7c5b1e; color: #ffedc4; }
.chip.banned { background: var(--red); color: #fff; }
.chip.ipban { background: #5b21b6; color: #e9dcff; }
.chip.unverified { background: transparent; border: 1px dashed var(--muted); }
.mini-btn {
  border: 1px solid var(--border); border-radius: 4px;
  background: var(--content-bg2); color: var(--text);
  font: bold 11px Arial; padding: 4px 9px; cursor: pointer; white-space: nowrap;
}
.mini-btn:hover { border-color: var(--muted); }
.mini-btn.danger { color: var(--err); }
.UserDetail {
  text-align: left; font-size: 12px;
  background: var(--content-bg2);
  border-bottom: 1px solid var(--border-soft);
  padding: 10px 12px 12px 62px;
}
.UserDetail .detline { margin: 3px 0; color: var(--muted); }
.UserDetail .detline b { color: var(--text); }
.UserDetail .actions a { margin-right: 12px; font-weight: bold; }
.HistList { margin-top: 8px; font-size: 11px; }
.HistList div { padding: 2px 0; border-top: 1px dotted var(--border-soft); }

/* Staff shield icon, right side of the blue header. */
.header-modtool {
  float: right; position: relative;
  color: var(--header-link); padding: 0 10px;
  line-height: 40px; display: inline-flex; align-items: center; height: 40px;
}
.header-modtool:hover { color: var(--header-ink); }
.header-modtool .notif-badge { position: absolute; top: 4px; right: 0; }

/* Admin panel tab strip (Users | Moderation Queue). */
.AdminTabs {
  display: flex; gap: 4px; margin-bottom: 12px;
  border-bottom: 2px solid var(--border);
}
.AdminTab {
  padding: 7px 16px; font: bold 12px Arial;
  color: var(--muted); text-decoration: none;
  border: 1px solid transparent; border-bottom: none;
  border-radius: 5px 5px 0 0; margin-bottom: -2px;
}
.AdminTab:hover { color: var(--text); text-decoration: none; }
.AdminTab.active {
  color: var(--heading); background: var(--content-bg);
  border-color: var(--border); border-bottom: 2px solid var(--content-bg);
}

/* Abuse reports: the flag link pages hang on profiles/games/items, and the
   moderator queue rows on /reports. */
.report-link {
  font: bold 11px Arial; color: var(--muted); text-decoration: none;
}
.report-link:hover { color: #e2231a; text-decoration: underline; }
.ReportRow {
  border: 1px solid var(--border); border-left: 4px solid #e2231a;
  border-radius: 4px; padding: 8px 10px; margin-bottom: 8px;
}
.ReportHead { font-size: 13px; margin-bottom: 2px; }
.ReportReason { font-weight: bold; color: var(--heading); }
.ReportDetails {
  font-size: 12px; margin: 6px 0; white-space: pre-wrap; word-break: break-word;
}
.ReportRow .actions { margin-top: 6px; font-size: 12px; }

/* ---------- Teams (shared ownership of games, items and assets) ---------- */

.TeamGrid { display: flex; flex-wrap: wrap; gap: 14px; margin: 8px 0; }
.TeamCard { width: 150px; text-align: center; }
.TeamLogo {
  display: flex; align-items: center; justify-content: center;
  width: 110px; height: 110px; margin: 0 auto 6px;
  border: 1px solid var(--border); border-radius: 6px; overflow: hidden;
  color: #fff; font: bold 40px Arial; text-decoration: none;
}
.TeamLogo.big { width: 150px; height: 150px; font-size: 56px; flex: 0 0 auto; }
.TeamName {
  display: block; font: bold 13px Arial; color: var(--link);
  text-decoration: none; overflow: hidden; text-overflow: ellipsis;
  white-space: nowrap;
}
.TeamName:hover { text-decoration: underline; }
.TeamMeta { font-size: 11px; color: var(--muted); margin-top: 2px; }

.TeamRoleChip {
  display: inline-block; margin-left: 6px; padding: 1px 7px;
  background: var(--content-bg2); border: 1px solid var(--border);
  border-radius: 9px; font: bold 11px Arial; color: var(--heading);
}

.TeamHeader { display: flex; gap: 16px; align-items: flex-start; }
.TeamHeaderInfo { flex: 1; min-width: 0; }
.TeamHeaderInfo h2 { margin: 0 0 2px; font-size: 20px; color: var(--heading); }
.TeamDesc { margin-top: 8px; font-size: 13px; white-space: pre-wrap; word-break: break-word; }
.TeamAnnouncement {
  margin-top: 12px; padding: 8px 10px; border: 1px solid var(--border);
  border-left: 4px solid #f5a623; border-radius: 4px;
  background: var(--content-bg2); font-size: 13px;
}
.TeamAnnouncement > div { margin-top: 3px; white-space: pre-wrap; word-break: break-word; }
.TeamAnnouncement .muted { font-size: 11px; }

.MemberList { margin: 8px 0; }
.MemberRow {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 7px 4px; border-bottom: 1px solid var(--border);
}
.MemberWho { display: flex; align-items: center; gap: 4px; font-size: 13px; }
.MemberTools { display: flex; align-items: center; gap: 6px; }

/* A rank is a dropdown: collapsed it's one line, opened it shows its name
   field and permission checkboxes. Ten ranks x nine permissions is otherwise a
   wall of boxes. */
.RoleBox {
  border: 1px solid var(--border); border-radius: 4px;
  padding: 8px 10px; margin-bottom: 8px; background: var(--content-bg2);
}
.RoleHead {
  font-size: 13px; cursor: pointer; list-style: none; user-select: none;
}
.RoleHead::-webkit-details-marker { display: none; }
.RoleHead::before { content: 'B8 '; color: var(--muted); }
.RoleBox[open] > .RoleHead { margin-bottom: 8px; }
.RoleBox[open] > .RoleHead::before { content: 'BE '; }

/* Per-member rank picker: checkboxes in a little pop-down (a member can hold
   several ranks at once). */
.RankDrop { position: relative; }
.RankDrop > summary {
  cursor: pointer; list-style: none; font: bold 11px Arial;
  color: var(--heading); padding: 2px 8px; border: 1px solid var(--border);
  border-radius: 3px; background: var(--content-bg2);
}
.RankDrop > summary::-webkit-details-marker { display: none; }
.RankDrop > summary::after { content: ' BE'; color: var(--muted); }
.RankDropPanel {
  position: absolute; right: 0; z-index: 20; min-width: 170px;
  display: flex; flex-direction: column; gap: 3px;
  padding: 8px; border: 1px solid var(--border); border-radius: 4px;
  background: var(--content-bg); box-shadow: 0 3px 10px rgba(0, 0, 0, .35);
}
.RankDropPanel label { font-size: 12px; white-space: nowrap; }
.RankDropPanel button { margin-top: 4px; }
.PermGrid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 3px 10px; margin: 6px 0;
}
.PermGrid label { font-size: 12px; color: var(--text); cursor: help; }
.PermGrid input[disabled] + * { color: var(--muted); }

.TeamFunds { font-size: 18px; display: flex; gap: 14px; align-items: center; }

/* =========================================================================
   Creator surfaces — the Develop page and the asset uploader.
   Self-contained (border-box everywhere, since the global rule is
   content-box) and theme-driven; nothing here restyles other pages.
   ========================================================================= */
.Dev, .Dev * { box-sizing: border-box; }

/* Entrance: cards rise in, staggered by --i (set inline per card). */
@keyframes dev-rise {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: none; }
}
.dev-rise {
  opacity: 0;
  animation: dev-rise 0.42s cubic-bezier(0.22, 0.85, 0.3, 1) forwards;
  animation-delay: calc(var(--i, 0) * 45ms);
}
@media (prefers-reduced-motion: reduce) {
  .dev-rise { animation: none; opacity: 1; }
  .DevCard:hover, .DevTile:hover, .DevAssetCard:hover { transform: none !important; }
}

/* ---------- Hero ---------- */
.DevHero {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border-soft);
  border-radius: 16px;
  background:
    radial-gradient(120% 140% at 100% 0%,
      color-mix(in srgb, var(--accent) 26%, transparent) 0%, transparent 58%),
    radial-gradient(90% 120% at 0% 100%,
      color-mix(in srgb, var(--header-line) 20%, transparent) 0%, transparent 55%),
    var(--content-bg);
  box-shadow: var(--shadow);
  padding: 22px 24px;
  margin-bottom: 16px;
}
.DevHero h1 { font-size: 28px; margin: 0 0 4px; }
.DevHero .sub { color: var(--muted); font-size: 13px; max-width: 560px; margin: 0; }
.DevHero .hero-top { display: flex; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.DevHero .hero-top .grow { flex: 1 1 320px; min-width: 0; }

/* Stat tiles */
.DevStats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 10px;
  margin-top: 18px;
}
.DevStat {
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  background: color-mix(in srgb, var(--content-bg2) 70%, transparent);
  backdrop-filter: blur(2px);
  padding: 10px 12px;
}
.DevStat .n {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--heading);
  line-height: 1.2;
}
.DevStat .k {
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--muted);
}
.DevStat .n .live-dot {
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #2ecc71;
  margin-right: 6px;
  vertical-align: 2px;
  animation: dev-pulse 1.8s ease-in-out infinite;
}
@keyframes dev-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(46, 204, 113, 0.5); }
  50%      { box-shadow: 0 0 0 5px rgba(46, 204, 113, 0); }
}

/* ---------- Tabs ---------- */
.DevTabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--border-soft);
  margin-bottom: 16px;
}
.DevTab {
  position: relative;
  padding: 9px 15px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--muted);
  background: none;
  border: none;
  border-radius: 8px 8px 0 0;
  cursor: pointer;
  font-family: inherit;
  transition: color 0.12s, background 0.12s;
}
.DevTab:hover { color: var(--text); background: var(--content-bg2); }
.DevTab.active { color: var(--accent); }
.DevTab.active::after {
  content: "";
  position: absolute;
  left: 10px; right: 10px; bottom: -1px;
  height: 2.5px;
  border-radius: 3px 3px 0 0;
  background: var(--accent);
  animation: dev-underline 0.22s ease-out;
}
@keyframes dev-underline { from { transform: scaleX(0.3); opacity: 0; } to { transform: none; opacity: 1; } }
.DevTab .count {
  display: inline-block;
  margin-left: 6px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--chip-bg);
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 700;
  line-height: 16px;
}
.DevTab.active .count { background: color-mix(in srgb, var(--accent) 18%, transparent); color: var(--accent); }
.DevPanel { display: none; }
.DevPanel.active { display: block; animation: dev-rise 0.3s ease-out; }

/* ---------- Quick actions (upload shortcuts) ---------- */
.DevTiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
}
.DevTile {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 13px;
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  background: var(--content-bg);
  box-shadow: var(--shadow);
  color: var(--text);
  text-decoration: none !important;
  transition: transform 0.14s, box-shadow 0.14s, border-color 0.14s;
}
.DevTile:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lift);
  border-color: color-mix(in srgb, var(--accent) 45%, var(--border));
}
.DevTile .ico {
  flex: 0 0 34px;
  width: 34px; height: 34px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  font-size: 17px;
}
.DevTile .t { font-size: 13px; font-weight: 600; line-height: 1.25; }
.DevTile .d { font-size: 11px; color: var(--muted); }

/* ---------- Game cards ---------- */
.DevGrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 16px;
}
.DevCard {
  position: relative;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border-soft);
  border-radius: 14px;
  background: var(--content-bg);
  box-shadow: var(--shadow);
  overflow: visible;
  transition: transform 0.16s, box-shadow 0.16s, border-color 0.16s;
}
.DevCard:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lift);
  border-color: color-mix(in srgb, var(--accent) 35%, var(--border));
}
.DevCard .shot {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  border-radius: 13px 13px 0 0;
  overflow: hidden;
  background: var(--thumb-bg);
  text-decoration: none !important;
}
.DevCard .shot img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s cubic-bezier(0.22, 0.85, 0.3, 1);
}
.DevCard:hover .shot img { transform: scale(1.045); }
.DevCard .shot .letter {
  width: 100%; height: 100%;
  display: grid;
  place-items: center;
  font-size: 46px;
  font-weight: 800;
  color: rgba(255,255,255,0.92);
}
.DevCard .shot .shade {
  position: absolute;
  inset: auto 0 0 0;
  height: 52%;
  background: linear-gradient(to top, rgba(0,0,0,0.55), transparent);
  opacity: 0;
  transition: opacity 0.16s;
}
.DevCard:hover .shot .shade { opacity: 1; }
.DevCard .body { padding: 11px 13px 13px; display: flex; flex-direction: column; gap: 8px; }
.DevCard .title-row { display: flex; align-items: flex-start; gap: 6px; }
.DevCard .title {
  flex: 1;
  min-width: 0;
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.DevCard .title:hover { color: var(--link); text-decoration: none; }
.DevCard .meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  font-size: 11.5px;
  color: var(--muted);
}
.DevCard .meta b { color: var(--text); font-weight: 700; }
.DevCard .acts { display: flex; align-items: center; gap: 6px; margin-top: 2px; }
.DevCard .acts .grow { flex: 1; }

/* Status / moderation pills */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 9px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  white-space: nowrap;
  line-height: 17px;
}
.pill::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: currentColor;
  flex: none;
}
.pill.live      { color: var(--ok);    background: color-mix(in srgb, var(--ok) 13%, transparent);
                  border-color: color-mix(in srgb, var(--ok) 32%, transparent); }
.pill.pending   { color: #b7791f;      background: rgba(245, 166, 35, 0.14); border-color: rgba(245, 166, 35, 0.4); }
.pill.declined  { color: var(--err);   background: color-mix(in srgb, var(--err) 13%, transparent);
                  border-color: color-mix(in srgb, var(--err) 32%, transparent); }
.pill.draft     { color: var(--muted); background: var(--chip-bg); border-color: var(--border); }
.pill.plain     { color: var(--muted); background: var(--chip-bg); border-color: var(--border); }
.pill.plain::before, .pill.floating.draft::before { display: none; }
html[data-theme="dark"] .pill.pending { color: #f0b429; }
.pill.pending::before { animation: dev-blink 1.6s ease-in-out infinite; }
@keyframes dev-blink { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }
.pill.floating {
  position: absolute;
  top: 9px; left: 9px;
  z-index: 2;
  backdrop-filter: blur(6px);
  box-shadow: 0 1px 4px rgba(0,0,0,0.25);
}
.pill.floating.live     { background: rgba(26, 138, 60, 0.85);  color: #fff; border-color: transparent; }
.pill.floating.draft    { background: rgba(0, 0, 0, 0.6);       color: #fff; border-color: transparent; }
.pill.floating.pending  { background: rgba(181, 121, 31, 0.88); color: #fff; border-color: transparent; }
.pill.floating.declined { background: rgba(217, 44, 34, 0.88);  color: #fff; border-color: transparent; }

/* Playing-now badge over a thumbnail */
.DevCard .playing {
  position: absolute;
  top: 9px; right: 9px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(6px);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
}
.DevCard .playing .live-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #2ecc71;
  animation: dev-pulse 1.8s ease-in-out infinite;
}

/* Small buttons used on the creator cards */
.btn-sm {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  height: 30px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--content-bg2);
  color: var(--text) !important;
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none !important;
  transition: background 0.12s, border-color 0.12s, transform 0.08s, box-shadow 0.12s;
}
.btn-sm:hover { border-color: var(--muted); text-decoration: none; }
.btn-sm:active { transform: translateY(1px); }
.btn-sm.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff !important;
  box-shadow: 0 1px 3px color-mix(in srgb, var(--accent) 40%, transparent);
}
.btn-sm.primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn-sm.danger { color: var(--err) !important; }
.btn-sm.danger:hover { border-color: var(--err); background: color-mix(in srgb, var(--err) 10%, transparent); }
.btn-sm:disabled { opacity: 0.55; cursor: default; }

/* ---------- Item + asset cards ---------- */
.DevAssetGrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 14px;
}
.DevAssetCard {
  position: relative;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  background: var(--content-bg);
  box-shadow: var(--shadow);
  transition: transform 0.16s, box-shadow 0.16s, border-color 0.16s;
}
.DevAssetCard:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lift);
  border-color: color-mix(in srgb, var(--accent) 35%, var(--border));
}
.DevAssetCard .shot {
  position: relative;
  display: block;
  aspect-ratio: 1 / 1;
  border-radius: 11px 11px 0 0;
  overflow: hidden;
  background:
    repeating-conic-gradient(var(--thumb-bg) 0% 25%, var(--content-bg2) 0% 50%) 50% / 18px 18px;
  text-decoration: none !important;
}
.DevAssetCard .shot img {
  width: 100%; height: 100%;
  object-fit: contain;
  display: block;
  transition: transform 0.35s cubic-bezier(0.22, 0.85, 0.3, 1);
}
.DevAssetCard:hover .shot img { transform: scale(1.06); }
.DevAssetCard .shot .glyph {
  width: 100%; height: 100%;
  display: grid;
  place-items: center;
  font-size: 40px;
  color: var(--muted);
}
.DevAssetCard .body { padding: 9px 11px 11px; display: flex; flex-direction: column; gap: 5px; }
.DevAssetCard .title {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
a.title:hover { color: var(--link); }
.DevAssetCard .sub { font-size: 11px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.DevAssetCard .foot { display: flex; align-items: center; gap: 6px; margin-top: 3px; }
.DevAssetCard .foot .grow { flex: 1; }
.DevAssetCard audio { width: 100%; height: 32px; }

/* Copyable id chip ("id:42") */
.IdChip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 1px 7px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--chip-bg);
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 10.5px;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.12s, border-color 0.12s;
}
.IdChip:hover { color: var(--text); border-color: var(--accent); }
.IdChip.copied { color: var(--ok); border-color: var(--ok); }

/* ---------- Uploader ---------- */
.DevForm { display: grid; gap: 14px; max-width: 560px; }
.DevForm.wide { max-width: 100%; }
.DevField { display: grid; gap: 5px; }
.DevField > label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--muted);
}
.DevField .hint { font-size: 11px; color: var(--muted); font-weight: 400; text-transform: none; letter-spacing: 0; }
.DevInput {
  width: 100%;
  height: 36px;
  padding: 0 11px;
  border: 1px solid var(--input-border);
  border-radius: 9px;
  background: var(--input-bg);
  color: var(--text);
  font-family: inherit;
  font-size: 13px;
  transition: border-color 0.12s, box-shadow 0.12s;
}
textarea.DevInput { height: auto; padding: 9px 11px; resize: vertical; line-height: 1.5; }
select.DevInput { cursor: pointer; }
.DevInput:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 20%, transparent);
}
.DevRow { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; }
.DevRow > .DevField { flex: 1 1 160px; }

/* Drag-and-drop file well */
.Dropzone {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 92px;
  padding: 12px 14px;
  border: 1.5px dashed var(--input-border);
  border-radius: 12px;
  background: var(--content-bg2);
  cursor: pointer;
  transition: border-color 0.14s, background 0.14s, transform 0.1s;
}
.Dropzone:hover { border-color: var(--accent); }
.Dropzone.drag {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 10%, var(--content-bg2));
  transform: scale(1.005);
}
.Dropzone.filled { border-style: solid; border-color: color-mix(in srgb, var(--ok) 45%, var(--border)); }
.Dropzone input[type=file] { display: none; }
.Dropzone .prev {
  flex: 0 0 68px;
  width: 68px; height: 68px;
  border-radius: 10px;
  background:
    repeating-conic-gradient(var(--thumb-bg) 0% 25%, var(--content-bg) 0% 50%) 50% / 14px 14px;
  border: 1px solid var(--border-soft);
  display: grid;
  place-items: center;
  overflow: hidden;
  font-size: 26px;
  color: var(--muted);
}
.Dropzone .prev img { width: 100%; height: 100%; object-fit: contain; }
.Dropzone .txt { min-width: 0; }
.Dropzone .txt .l1 { font-size: 13px; font-weight: 600; color: var(--text); word-break: break-all; }
.Dropzone .txt .l2 { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.Dropzone .txt .l1 em { color: var(--accent); font-style: normal; font-weight: 700; }

/* Segmented control (uploader: image vs sound) */
.Seg {
  display: inline-flex;
  padding: 3px;
  gap: 3px;
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  background: var(--content-bg2);
  margin-bottom: 14px;
}
.Seg button {
  border: none;
  background: none;
  color: var(--muted);
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 7px;
  cursor: pointer;
  transition: background 0.14s, color 0.14s;
}
.Seg button:hover { color: var(--text); }
.Seg button.active {
  background: var(--content-bg);
  color: var(--text);
  box-shadow: var(--shadow);
}

/* Filter chips (asset kinds) */
.Chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.Chips button {
  border: 1px solid var(--border);
  background: var(--content-bg);
  color: var(--muted);
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 999px;
  cursor: pointer;
  transition: color 0.12s, background 0.12s, border-color 0.12s;
}
.Chips button:hover { color: var(--text); border-color: var(--muted); }
.Chips button.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

/* Empty state */
.DevEmpty {
  grid-column: 1 / -1;
  border: 1.5px dashed var(--border);
  border-radius: 14px;
  background: var(--content-bg2);
  padding: 34px 20px;
  text-align: center;
}
.DevEmpty .big { font-size: 30px; margin-bottom: 6px; }
.DevEmpty .t { font-size: 14px; font-weight: 700; color: var(--heading); margin-bottom: 3px; }
.DevEmpty .d { font-size: 12.5px; color: var(--muted); margin: 0 auto 12px; max-width: 380px; }

/* Skeletons while loading */
.Skel {
  border-radius: 12px;
  background: linear-gradient(100deg,
    var(--content-bg2) 30%,
    color-mix(in srgb, var(--border-soft) 70%, var(--content-bg2)) 50%,
    var(--content-bg2) 70%);
  background-size: 300% 100%;
  animation: dev-shimmer 1.25s ease-in-out infinite;
}
@keyframes dev-shimmer { from { background-position: 180% 0; } to { background-position: -80% 0; } }
.Skel.card { height: 214px; }
.Skel.tile { height: 176px; }

/* Toast (upload confirmations, copies) */
.DevToast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 10050;
  display: flex;
  align-items: center;
  gap: 9px;
  max-width: 340px;
  padding: 11px 14px;
  border: 1px solid var(--border);
  border-left: 3px solid var(--ok);
  border-radius: 10px;
  background: var(--content-bg);
  box-shadow: var(--shadow-lift);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text);
  animation: dev-toast-in 0.26s cubic-bezier(0.22, 0.85, 0.3, 1);
}
.DevToast.err { border-left-color: var(--err); }
.DevToast.leaving { animation: dev-toast-out 0.22s ease-in forwards; }
@keyframes dev-toast-in  { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes dev-toast-out { to { opacity: 0; transform: translateY(8px); } }

@media (max-width: 760px) {
  .DevHero { padding: 18px 16px; }
  .DevHero h1 { font-size: 23px; }
  .DevGrid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
  .DevAssetGrid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
  .DevTabs { overflow-x: auto; scrollbar-width: none; }
  .DevTabs::-webkit-scrollbar { display: none; }
}
