/* 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);
}
