/* ==========================================================================
   BWTP — Best Way To Play. MediaWiki / PCGamingWiki-inspired styling.
   Light + dark themes via CSS variables on :root / [data-theme="dark"].
   ========================================================================== */
:root {
  --bg: #f6f7f9;
  --bg-content: #ffffff;
  --bg-soft: #f8f9fa;
  --bg-header: #ffffff;
  --bg-sidebar: #f6f7f9;
  --text: #202122;
  --text-soft: #54595d;
  --text-faint: #72777d;
  --border: #c8ccd1;
  --border-soft: #eaecf0;
  --link: #0b5cad;
  --link-visited: #6b4ba1;
  --link-red: #ba0000;
  --accent: #0b5cad;
  --table-head: #eaecf0;
  --table-border: #c8ccd1;
  --infobox-bg: #f8f9fa;
  --hero-bg: #eaf3fb;
  --hero-border: #b6d4ef;
  --code-bg: #f0f1f3;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.08);

  --tier-best: #14866d;
  --tier-great: #2d7dd2;
  --tier-good: #b8860b;
  --tier-situational: #c2691a;
  --tier-avoid: #9aa0a6;

  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-serif: "Linux Libertine", Georgia, "Times New Roman", serif;
}
[data-theme="dark"] {
  --bg: #1b1c1f;
  --bg-content: #202124;
  --bg-soft: #26282c;
  --bg-header: #16171a;
  --bg-sidebar: #1b1c1f;
  --text: #e8eaed;
  --text-soft: #b5b9bf;
  --text-faint: #9aa0a6;
  --border: #3c4043;
  --border-soft: #2d2f33;
  --link: #6fb1ff;
  --link-visited: #b89be0;
  --link-red: #ff6f6f;
  --accent: #6fb1ff;
  --table-head: #2a2d31;
  --table-border: #3c4043;
  --infobox-bg: #26282c;
  --hero-bg: #1c2a38;
  --hero-border: #2d4a66;
  --code-bg: #2a2d31;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
}
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
a:visited { color: var(--link-visited); }
a.redlink, a.redlink:visited { color: var(--link-red); }
code {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.86em;
  background: var(--code-bg);
  padding: 0.1em 0.35em;
  border-radius: 3px;
}

/* ---- Top bar ---------------------------------------------------------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--bg-header);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow);
}
.topbar__inner {
  display: flex;
  align-items: center;
  gap: 14px;
  max-width: 1280px;
  margin: 0 auto;
  padding: 8px 16px;
}
.brand { display: flex; align-items: center; gap: 9px; color: var(--text); }
.brand:hover { text-decoration: none; }
.brand__logo {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: linear-gradient(150deg, #0b5cad, #1d8fd1);
  color: #fff;
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 700;
}
.brand__text { display: flex; flex-direction: column; line-height: 1.05; }
.brand__text strong { font-size: 18px; letter-spacing: 0.5px; }
.brand__text small { color: var(--text-faint); font-size: 11px; }

.search { position: relative; flex: 1; max-width: 480px; margin: 0 auto; }
.search__input {
  width: 100%;
  padding: 8px 36px 8px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg-content);
  color: var(--text);
  font-size: 14px;
}
.search__input:focus { outline: 2px solid var(--accent); outline-offset: -1px; }
.search__go { position: absolute; right: 2px; top: 50%; transform: translateY(-50%); }
.suggest {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  margin: 0;
  padding: 4px;
  list-style: none;
  background: var(--bg-content);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
  max-height: 70vh;
  overflow-y: auto;
}
.suggest li { border-radius: 6px; }
.suggest a {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 7px 9px;
  color: var(--text);
}
.suggest a:hover, .suggest a.active { background: var(--bg-soft); text-decoration: none; }
.suggest img, .suggest .s-thumb { width: 34px; height: 44px; flex: 0 0 34px; object-fit: cover; border-radius: 3px; background: var(--bg-soft); }
.suggest .s-title { font-weight: 600; }
.suggest .s-meta { color: var(--text-faint); font-size: 12px; }
.suggest .no-hit { color: var(--text-faint); font-style: italic; cursor: default; }
.suggest .no-hit:hover { background: transparent; }

.topnav { display: flex; align-items: center; gap: 4px; }
.topnav a { padding: 6px 10px; border-radius: 6px; color: var(--text-soft); font-size: 14px; }
.topnav a:hover { background: var(--bg-soft); text-decoration: none; }
.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--text-soft);
  font-size: 16px;
  cursor: pointer;
}
.icon-btn:hover { background: var(--bg-soft); }
.menu-toggle { display: none; }

/* ---- Layout ----------------------------------------------------------- */
.layout {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  gap: 0;
  max-width: 1280px;
  margin: 0 auto;
  align-items: start;
}
.sidebar {
  position: sticky;
  top: 51px;
  align-self: start;
  padding: 18px 10px 40px;
  font-size: 13.5px;
  max-height: calc(100vh - 51px);
  overflow-y: auto;
}
.sidebar h4 {
  margin: 16px 6px 5px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--text-faint);
  font-weight: 700;
}
.sidebar a {
  display: flex;
  justify-content: space-between;
  gap: 6px;
  padding: 4px 8px;
  border-radius: 5px;
  color: var(--text-soft);
}
.sidebar a:hover { background: var(--bg-soft); text-decoration: none; color: var(--text); }
.sidebar a.active { background: var(--hero-bg); color: var(--link); font-weight: 600; }
.sidebar .count { color: var(--text-faint); font-size: 11px; }

.content {
  background: var(--bg-content);
  border-left: 1px solid var(--border-soft);
  min-height: 70vh;
  padding: 22px 30px 60px;
  outline: none;
}
.loading { color: var(--text-faint); padding: 40px 0; text-align: center; }

/* ---- Article ---------------------------------------------------------- */
.article h1.page-title {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: 30px;
  margin: 0 0 2px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border);
}
.article .subtitle { color: var(--text-faint); font-size: 14px; margin: 0 0 16px; }
.article .lead { font-size: 16px; line-height: 1.55; margin: 4px 0 16px; }
.extract-note { font-size: 13.5px; color: var(--text-soft); border-left: 3px solid var(--border); padding-left: 12px; margin: 12px 0; }
.extract-note .extract-src { color: var(--text-faint); font-size: 12px; }
.article h2 {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: 23px;
  margin: 26px 0 10px;
  padding-bottom: 5px;
  border-bottom: 1px solid var(--border-soft);
  scroll-margin-top: 60px;
}
.article h3 { font-size: 17px; margin: 20px 0 8px; scroll-margin-top: 60px; }
.article p { margin: 10px 0; }
.article ul, .article ol { margin: 10px 0; padding-left: 26px; }
.article li { margin: 4px 0; }
.article blockquote {
  margin: 12px 0;
  padding: 6px 14px;
  border-left: 3px solid var(--accent);
  background: var(--bg-soft);
  color: var(--text-soft);
}

/* breadcrumb / category bar */
.crumbs { font-size: 13px; color: var(--text-faint); margin: 0 0 10px; }
.crumbs a { color: var(--text-soft); }

/* infobox */
.infobox {
  float: right;
  width: 300px;
  margin: 4px 0 16px 22px;
  border: 1px solid var(--table-border);
  border-radius: 6px;
  background: var(--infobox-bg);
  font-size: 13px;
  overflow: hidden;
}
.infobox__title {
  text-align: center;
  font-weight: 700;
  padding: 8px 10px;
  background: var(--table-head);
  border-bottom: 1px solid var(--table-border);
}
.infobox__img { padding: 10px; text-align: center; }
.infobox__img img { max-width: 100%; max-height: 360px; border-radius: 3px; box-shadow: var(--shadow); }
.infobox__cap { color: var(--text-faint); font-size: 11.5px; margin-top: 5px; }
.infobox table { width: 100%; border-collapse: collapse; }
.infobox th, .infobox td { text-align: left; vertical-align: top; padding: 5px 10px; border-top: 1px solid var(--border-soft); }
.infobox th { width: 38%; color: var(--text-soft); font-weight: 600; }
.infobox .rating-row { display: flex; flex-wrap: wrap; gap: 5px; }
.score-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 1px 7px;
  border-radius: 10px;
  font-size: 11.5px;
  font-weight: 700;
  color: #fff;
}

/* BWTP hero callout */
.bwtp-hero {
  clear: none;
  border: 1px solid var(--hero-border);
  background: var(--hero-bg);
  border-radius: 10px;
  padding: 14px 16px;
  margin: 4px 0 20px;
  display: flex;
  gap: 14px;
  align-items: flex-start;
}
.bwtp-hero__icon { font-size: 26px; line-height: 1; }
.bwtp-hero__body { flex: 1; }
.bwtp-hero__label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.7px; color: var(--text-faint); font-weight: 700; }
.bwtp-hero__method { font-size: 18px; font-weight: 700; margin: 1px 0 4px; }
.bwtp-hero__summary { color: var(--text-soft); }
.bwtp-hero__summary a { font-weight: 600; }

/* tier badge */
.tier {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 11px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: #fff;
  white-space: nowrap;
}
.tier--best { background: var(--tier-best); }
.tier--great { background: var(--tier-great); }
.tier--good { background: var(--tier-good); }
.tier--situational { background: var(--tier-situational); }
.tier--avoid { background: var(--tier-avoid); }

/* ways list */
.ways { display: grid; gap: 12px; margin: 8px 0 4px; }
.way {
  border: 1px solid var(--border);
  border-left: 4px solid var(--border);
  border-radius: 8px;
  padding: 12px 14px;
  background: var(--bg-content);
}
.way--best { border-left-color: var(--tier-best); background: color-mix(in srgb, var(--tier-best) 6%, var(--bg-content)); }
.way--great { border-left-color: var(--tier-great); }
.way--good { border-left-color: var(--tier-good); }
.way--situational { border-left-color: var(--tier-situational); }
.way--avoid { border-left-color: var(--tier-avoid); }
.way__head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.way__method { font-weight: 700; font-size: 15.5px; }
.way__chips { display: flex; flex-wrap: wrap; gap: 6px; margin-left: auto; }
.chip {
  font-size: 11.5px;
  padding: 1px 8px;
  border-radius: 10px;
  background: var(--bg-soft);
  border: 1px solid var(--border-soft);
  color: var(--text-soft);
}
.way__summary { margin: 6px 0; color: var(--text-soft); }
.way__pc { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 18px; margin-top: 8px; }
.way__pc ul { margin: 2px 0; padding-left: 18px; font-size: 13.5px; }
.way__pc .pros li::marker { content: "✓ "; color: var(--tier-best); }
.way__pc .cons li::marker { content: "✕ "; color: var(--tier-avoid); }
.way__pc h5 { margin: 0; font-size: 12px; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-faint); }
.way__notes { margin-top: 8px; font-size: 13.5px; color: var(--text-soft); }
.way__tool-link { font-weight: 600; }

/* tables */
.table-wrap { overflow-x: auto; margin: 12px 0; }
table.wikitable { border-collapse: collapse; width: 100%; font-size: 14px; background: var(--bg-content); }
table.wikitable th, table.wikitable td { border: 1px solid var(--table-border); padding: 6px 10px; vertical-align: top; }
table.wikitable th { background: var(--table-head); text-align: left; }
table.wikitable tbody tr:nth-child(even) { background: var(--bg-soft); }

/* releases timeline */
.releases { border-collapse: collapse; width: 100%; font-size: 14px; }
.releases th, .releases td { border: 1px solid var(--table-border); padding: 6px 10px; vertical-align: top; }
.releases th { background: var(--table-head); text-align: left; white-space: nowrap; }
.releases .yr { font-variant-numeric: tabular-nums; white-space: nowrap; font-weight: 600; }
.region-tag { font-size: 11px; color: var(--text-faint); border: 1px solid var(--border-soft); border-radius: 4px; padding: 0 4px; }

/* TOC */
.toc {
  display: inline-block;
  min-width: 200px;
  max-width: 320px;
  border: 1px solid var(--border);
  background: var(--bg-soft);
  border-radius: 6px;
  padding: 10px 14px;
  margin: 6px 0 14px;
  font-size: 13.5px;
}
.toc h4 { margin: 0 0 4px; font-size: 12px; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-faint); }
.toc ol { margin: 0; padding-left: 18px; }
.toc ol ol { padding-left: 16px; }
.toc li { margin: 2px 0; }

/* external links + categories + references */
.ext-links { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.ext-links a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--bg-soft);
  font-size: 13px;
  color: var(--text);
}
.ext-links a:hover { border-color: var(--accent); text-decoration: none; }
.references { font-size: 13px; color: var(--text-soft); }
.references li { margin: 3px 0; word-break: break-word; }

.cat-bar {
  margin-top: 30px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg-soft);
  font-size: 13px;
}
.cat-bar .cat-label { color: var(--text-faint); font-weight: 700; margin-right: 6px; text-transform: uppercase; font-size: 11px; letter-spacing: 0.5px; }
.cat-link {
  display: inline-block;
  margin: 3px 4px 3px 0;
  padding: 2px 9px;
  border-radius: 12px;
  background: var(--bg-content);
  border: 1px solid var(--border);
  font-size: 12.5px;
}

/* screenshots gallery */
.shots { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 8px; margin: 12px 0; }
.shots a img { width: 100%; height: 110px; object-fit: cover; border-radius: 5px; border: 1px solid var(--border); display: block; }

/* ---- Home ------------------------------------------------------------- */
.hero-home {
  background: linear-gradient(135deg, #0b5cad, #1d8fd1);
  color: #fff;
  border-radius: 12px;
  padding: 26px 28px;
  margin-bottom: 22px;
}
.hero-home h1 { margin: 0 0 6px; font-size: 27px; font-family: var(--font-serif); font-weight: 400; }
.hero-home p { margin: 0; max-width: 60ch; opacity: 0.95; }
.hero-home .stats { display: flex; flex-wrap: wrap; gap: 22px; margin-top: 16px; }
.hero-home .stat b { font-size: 22px; display: block; }
.hero-home .stat span { font-size: 12px; opacity: 0.85; }

.section-title { font-family: var(--font-serif); font-weight: 400; font-size: 21px; margin: 26px 0 12px; padding-bottom: 5px; border-bottom: 1px solid var(--border-soft); }
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 14px; }
.gcard {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: 9px;
  overflow: hidden;
  background: var(--bg-content);
  color: var(--text);
  transition: transform 0.08s ease, box-shadow 0.08s ease;
}
.gcard:hover { text-decoration: none; transform: translateY(-2px); box-shadow: 0 6px 18px rgba(0, 0, 0, 0.14); }
.gcard__art { aspect-ratio: 3 / 4; background: var(--bg-soft) center/cover no-repeat; position: relative; }
.gcard__art .tier { position: absolute; left: 7px; top: 7px; }
.gcard__art .noart { display: grid; place-items: center; height: 100%; color: var(--text-faint); font-size: 12px; padding: 8px; text-align: center; }
.gcard__body { padding: 8px 10px; }
.gcard__title { font-weight: 700; font-size: 14px; line-height: 1.25; }
.gcard__meta { color: var(--text-faint); font-size: 12px; margin-top: 2px; }
.gcard__method { color: var(--text-soft); font-size: 12px; margin-top: 5px; }

.tile-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; }
.tile {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 11px 13px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-content);
  color: var(--text);
}
.tile:hover { text-decoration: none; border-color: var(--accent); background: var(--bg-soft); }
.tile .count { color: var(--text-faint); font-size: 12px; }

/* ---- Browse table ----------------------------------------------------- */
.browse-tools { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 6px 0 14px; }
.browse-tools input, .browse-tools select {
  padding: 7px 10px; border: 1px solid var(--border); border-radius: 6px; background: var(--bg-content); color: var(--text); font-size: 14px;
}
.browse-tools input { flex: 1; min-width: 180px; }
table.browse { width: 100%; border-collapse: collapse; font-size: 14px; }
table.browse th, table.browse td { border-bottom: 1px solid var(--border-soft); padding: 8px 10px; text-align: left; vertical-align: middle; }
table.browse th { cursor: pointer; user-select: none; color: var(--text-soft); position: sticky; top: 51px; background: var(--bg-content); }
table.browse th:hover { color: var(--text); }
table.browse th .arrow { color: var(--accent); }
table.browse tbody tr:hover { background: var(--bg-soft); }
table.browse .b-art { width: 34px; height: 44px; object-fit: cover; border-radius: 3px; background: var(--bg-soft); }
table.browse .b-title { font-weight: 600; }
.tag-mini { font-size: 11px; padding: 1px 6px; border-radius: 8px; background: var(--bg-soft); border: 1px solid var(--border-soft); color: var(--text-soft); margin-right: 3px; }

.empty { color: var(--text-faint); padding: 30px; text-align: center; }
.pill-legend { display: flex; flex-wrap: wrap; gap: 10px; margin: 10px 0; font-size: 12.5px; color: var(--text-soft); }
.pill-legend span { display: inline-flex; align-items: center; gap: 5px; }
.dot { width: 11px; height: 11px; border-radius: 50%; display: inline-block; }

/* ---- Footer ----------------------------------------------------------- */
.sitefoot { border-top: 1px solid var(--border); background: var(--bg-header); margin-top: 30px; }
.sitefoot__inner { max-width: 1280px; margin: 0 auto; padding: 18px 16px; color: var(--text-faint); font-size: 12.5px; }
.sitefoot__sources { margin-top: 4px; }

/* ---- Responsive ------------------------------------------------------- */
@media (max-width: 880px) {
  .layout { grid-template-columns: 1fr; }
  .menu-toggle { display: inline-grid; }
  .sidebar {
    position: fixed;
    top: 51px;
    left: 0;
    bottom: 0;
    width: 230px;
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border);
    transform: translateX(-100%);
    transition: transform 0.18s ease;
    z-index: 40;
    max-height: none;
  }
  body.nav-open .sidebar { transform: translateX(0); }
  .content { border-left: none; padding: 18px 16px 50px; }
  .infobox { float: none; width: 100%; margin: 0 0 16px; }
  .brand__text small { display: none; }
  .topnav a:not(#random-link) { display: none; }
}
@media (max-width: 560px) {
  .way__pc { grid-template-columns: 1fr; }
  .hero-home .stats { gap: 14px; }
}

/* ---- Brand logos / icons --------------------------------------------- */
.ico {
  width: 1em;
  height: 1em;
  vertical-align: -0.14em;
  fill: currentColor;
  display: inline-block;
  flex: none;
}
.ico--emoji {
  fill: none;
  font-size: 0.95em;
  line-height: 1;
  vertical-align: -0.06em;
}

/* meta links (infobox values, release/platform links) */
.meta-link { color: var(--link); }
.meta-link .ico { color: var(--text-soft); margin-right: 1px; }
.infobox .meta-link { white-space: nowrap; }

/* inline auto-links inside article prose */
.wikilink { color: var(--link); }
.wikilink .ico { color: var(--text-soft); margin-right: 1px; }
.wikilink--tech, .wikilink--platform { white-space: nowrap; }

/* platform / cost chips */
.chip--platform { display: inline-flex; align-items: center; gap: 4px; color: var(--text-soft); }
.chip--platform:hover { border-color: var(--accent); color: var(--text); text-decoration: none; }
.chip--cost { text-transform: capitalize; font-weight: 600; }
.chip--free { color: var(--tier-best); border-color: color-mix(in srgb, var(--tier-best) 40%, var(--border-soft)); }
.chip--paid { color: var(--text-soft); }

/* tile + sidebar labels with icons */
.tile__label, .side-label { display: inline-flex; align-items: center; gap: 6px; min-width: 0; }
.tile__label { font-weight: 500; }
.tile__label .ico, .side-label .ico { width: 1.15em; height: 1.15em; color: var(--text-soft); }

/* ---- Meta / category pages ------------------------------------------- */
.meta-hero { display: flex; align-items: center; gap: 16px; margin: 2px 0 6px; }
.meta-hero__icon { display: inline-grid; place-items: center; width: 58px; height: 58px; flex: none; border: 1px solid var(--border); border-radius: 12px; background: var(--bg-soft); }
.meta-hero__icon .ico { width: 34px; height: 34px; }
.meta-hero__text .page-title { border: none; padding: 0; margin: 0; }
.meta-hero__text .subtitle { margin: 2px 0 0; }
.meta-desc {
  border: 1px solid var(--border-soft);
  background: var(--bg-soft);
  border-radius: 8px;
  padding: 14px 16px;
  margin: 6px 0 18px;
  font-size: 14px;
  overflow: hidden;
}
.meta-desc__img { float: right; max-width: 190px; max-height: 150px; margin: 0 0 10px 16px; border-radius: 6px; border: 1px solid var(--border); background: var(--bg-content); }
.meta-desc__src { margin: 8px 0 0; color: var(--text-faint); font-size: 12.5px; }
.count-badge { font-size: 13px; color: var(--text-faint); font-weight: 400; }
.meta-hero__mono { font-family: var(--font-serif); font-size: 30px; font-weight: 700; color: var(--accent); }

/* ---- Emulator / tool lists ------------------------------------------- */
.emu-list { list-style: none; padding: 0; margin: 10px 0 4px; display: grid; gap: 10px; }
.emu {
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: 8px;
  padding: 10px 14px;
  background: var(--bg-content);
}
.emu__head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.emu__name { font-weight: 700; font-size: 15px; }
.emu__best { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.4px; color: #fff; background: var(--tier-best); padding: 1px 7px; border-radius: 10px; }
.emu__host { margin-left: auto; color: var(--text-faint); display: inline-flex; gap: 5px; align-items: center; }
.emu__host .ico { width: 1.05em; height: 1.05em; }
.emu__blurb { margin-top: 5px; color: var(--text-soft); font-size: 13.5px; }
.emu__uses { margin-top: 5px; font-size: 12px; color: var(--text-faint); }

/* ---- "My platforms" top-bar menu ------------------------------------- */
.platmenu { position: relative; }
.platmenu__btn {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 6px 10px; border: 1px solid var(--border); border-radius: 6px;
  background: var(--bg-content); color: var(--text-soft); font-size: 13px; cursor: pointer;
}
.platmenu__btn:hover { background: var(--bg-soft); }
.platmenu__btn.is-active { border-color: var(--accent); color: var(--accent); }
.platmenu__count { display: inline-grid; place-items: center; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px; background: var(--accent); color: #fff; font-size: 11px; font-weight: 700; }
.platmenu__panel {
  position: absolute; right: 0; top: calc(100% + 6px); width: 280px;
  background: var(--bg-content); border: 1px solid var(--border); border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2); z-index: 60; overflow: hidden;
}
.platmenu__head { display: flex; align-items: center; gap: 8px; padding: 10px 12px; font-size: 12px; color: var(--text-faint); border-bottom: 1px solid var(--border-soft); }
.platmenu__clear { margin-left: auto; border: 1px solid var(--border); background: var(--bg-soft); color: var(--text-soft); border-radius: 5px; padding: 2px 8px; font-size: 12px; cursor: pointer; }
.platmenu__clear:hover { border-color: var(--accent); color: var(--accent); }
.platmenu__list { max-height: 60vh; overflow-y: auto; padding: 4px; }
.platmenu__row { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 6px; cursor: pointer; font-size: 13.5px; }
.platmenu__row:hover { background: var(--bg-soft); }
.platmenu__name { display: inline-flex; align-items: center; gap: 6px; flex: 1; min-width: 0; }
.platmenu__name .ico { width: 1.1em; height: 1.1em; color: var(--text-soft); }
.platmenu__row input { accent-color: var(--accent); }

@media (max-width: 880px) {
  .platmenu__btn { font-size: 0; gap: 0; padding: 6px 8px; }
  .platmenu__btn::before { content: "🎮"; font-size: 15px; }
  .platmenu__count { font-size: 11px; }
}
