/* ============================================================
   Forked.gg Discovery Portal. Brand v0.1 tokens, shared with
   site/styles.css + forked-platform/web/app.css.
   Game Boy DMG discipline: ~70% void black, phosphor green,
   white + arcade signals used sparingly.
   ============================================================ */
:root {
  --void: #050a05;
  --panel: #0e140c;
  --panel-2: #141b11;
  --panel-3: #182013;
  --moss: #81a454;
  --moss-deep: #5e7a3c;
  --boot: #b6d66b;
  --white: #ffffff;
  --amber: #e8b84b;
  --red: #d64b3f;
  --cyan: #5cc8c8;

  --text: #d4e3c2;
  --muted: #7f8e6c;
  --line: rgba(129, 164, 84, 0.2);
  --line-2: rgba(129, 164, 84, 0.4);

  --f-display: "Anton", system-ui, sans-serif;
  --f-pixel: "Press Start 2P", monospace;
  --f-body: "Space Grotesk", system-ui, sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, monospace;

  --radius: 8px;
  --glow: 0 0 10px rgba(129, 164, 84, 0.4);
  --maxw: 1140px;
}

* { box-sizing: border-box; }
/* The `hidden` attribute must always win — several components (.modal, .account-menu,
   .btn) set their own `display`, which would otherwise override the UA
   `[hidden]{display:none}` and leave "hidden" elements (modals!) visible on load. */
[hidden] { display: none !important; }
html { background: var(--void); scroll-behavior: smooth; }

/* Brand-themed scrollbars (phosphor green on void black), Firefox + WebKit/Blink. */
html { scrollbar-color: var(--moss-deep) var(--void); scrollbar-width: thin; }
::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-track { background: var(--void); }
::-webkit-scrollbar-thumb {
  background: var(--moss-deep);
  border-radius: 6px;
  border: 2px solid var(--void); /* inset so the thumb reads as a rounded pill */
}
::-webkit-scrollbar-thumb:hover { background: var(--moss); }
::-webkit-scrollbar-corner { background: var(--void); }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: var(--f-body);
  font-size: 16px;
  line-height: 1.6;
  background:
    radial-gradient(1100px 520px at 50% -160px, rgba(129, 164, 84, 0.08), transparent 70%),
    linear-gradient(var(--line) 1px, transparent 1px) 0 0 / 100% 34px,
    var(--void);
  overflow-x: hidden;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

/* CRT scanlines + vignette */
.scanlines {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 60;
  background: repeating-linear-gradient(to bottom, rgba(0, 0, 0, 0) 0 2px, rgba(0, 0, 0, 0.22) 2px 3px);
  mix-blend-mode: multiply;
}
.scanlines::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(130% 130% at 50% 35%, transparent 62%, rgba(0, 0, 0, 0.5));
}

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 clamp(18px, 4vw, 40px); }

a { color: inherit; text-decoration: none; }

/* ---- Top bar ---- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: linear-gradient(var(--void), rgba(5, 10, 5, 0.86));
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
}
.topbar-inner {
  display: flex;
  align-items: center;
  gap: 18px;
  padding-top: 14px;
  padding-bottom: 14px;
}
/* Shared cross-app brand + nav (source of truth = account.forked.gg). nav scoped to
   `header nav` so it never touches the results pager (<nav class="pager">). */
.brand {
  flex: 0 0 auto;
  font-family: var(--f-display);
  font-size: 22px;
  letter-spacing: 1.5px;
  color: var(--moss);
  text-shadow: var(--glow);
  text-decoration: none;
  white-space: nowrap;
  line-height: 1;
}
.brand-dot { color: var(--moss-deep); }
.brand-sub {
  font-family: var(--f-pixel);
  font-size: 10px;
  color: var(--muted);
  letter-spacing: 0.5px;
  padding-left: 10px;
  border-left: 1px solid var(--line-2);
  text-shadow: none;
}
.appnav { display: flex; align-items: center; gap: 20px; flex: 0 0 auto; }
.appnav > a, .appnav-top {
  color: var(--muted); text-decoration: none; white-space: nowrap;
  font-family: var(--f-body); font-size: 14px; font-weight: 500;
  background: none; border: 0; padding: 0; cursor: pointer; transition: color 0.15s ease;
}
.appnav > a:hover, .appnav > a.active,
.appnav-top:hover, .appnav-top.active, .appnav-item:hover .appnav-top, .appnav-item:focus-within .appnav-top { color: var(--text); }
.appnav-item { position: relative; }
.appnav-top { display: inline-flex; align-items: center; }
.appnav-top::after { content: "\25BE"; margin-left: 5px; font-size: 11px; color: var(--moss-deep); }
.appnav-menu {
  position: absolute; top: 100%; left: 0; margin-top: 8px; min-width: 168px;
  display: flex; flex-direction: column; gap: 2px;
  background: var(--panel-2); border: 1px solid var(--line-2); border-radius: var(--radius);
  padding: 6px; box-shadow: 0 14px 34px rgba(0, 0, 0, 0.55);
  opacity: 0; visibility: hidden; transform: translateY(-4px);
  transition: opacity 0.15s, transform 0.15s, visibility 0.15s; z-index: 60;
}
.appnav-menu::before { content: ""; position: absolute; top: -8px; left: 0; right: 0; height: 8px; }
.appnav-item:hover .appnav-menu, .appnav-item:focus-within .appnav-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.appnav-menu a {
  color: var(--muted); text-decoration: none; white-space: nowrap;
  font-size: 14px; padding: 8px 11px; border-radius: 6px; transition: color 0.15s, background 0.15s;
}
.appnav-menu a:hover, .appnav-menu a.active { color: var(--text); background: rgba(129, 164, 84, 0.1); }
@media (max-width: 900px) { .appnav { display: none; } }
.search { flex: 1 1 auto; display: flex; justify-content: flex-end; }
.search input {
  width: min(420px, 100%);
  background: var(--panel);
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  color: var(--text);
  font-family: var(--f-body);
  font-size: 15px;
  padding: 9px 13px;
  outline: none;
}
.search input:focus { border-color: var(--moss); box-shadow: var(--glow); }
.search input::placeholder { color: var(--muted); }

.account { flex: 0 0 auto; display: flex; align-items: center; }
.btn-sm { padding: 8px 14px; font-size: 13px; }
.account-menu { display: flex; align-items: center; gap: 10px; }
.account-id { display: flex; flex-direction: column; gap: 1px; line-height: 1.15; }
.account-handle { font-family: var(--f-mono); font-size: 13px; color: var(--moss); }
.account-points {
  font-family: var(--f-mono);
  font-size: 11px;
  color: var(--boot);
  text-decoration: none;
  white-space: nowrap;
}
.account-points:hover { text-decoration: underline; }
.account-avatar { width: 24px; height: 24px; border-radius: 50%; object-fit: cover; border: 1px solid var(--line-2); vertical-align: middle; }

.filters-row { padding-bottom: 12px; display: flex; flex-direction: column; gap: 10px; }
.type-filters { display: flex; gap: 6px; flex-wrap: wrap; }
.seg {
  font-family: var(--f-mono);
  font-size: 12px;
  color: var(--muted);
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 6px 13px;
  cursor: pointer;
  transition: color 0.12s, border-color 0.12s, background 0.12s;
}
.seg:hover { color: var(--text); border-color: var(--line-2); }
.seg[aria-pressed="true"] { color: var(--void); background: var(--moss); border-color: var(--moss); font-weight: 600; }
.genre-row { display: flex; align-items: flex-start; gap: 8px; }
/* Collapsed to one row via an inline max-height that app.js measures from a real
   chip, so the clamp follows the chip's rendered height at any font size. */
.genre-filters { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 8px; flex: 1; min-width: 0; overflow: hidden; }
/* flex-start + no shrink keeps every chip at its natural one-line height, so the
   measured clamp stays stable whether the row is open or closed. */
.genre-filters .chip { flex: none; white-space: nowrap; }
.genre-toggle {
  flex: none;
  font-family: var(--f-mono);
  font-size: 12px;
  color: var(--text);
  background: var(--panel-2);
  border: 1px solid var(--line-2);
  border-radius: 999px;
  padding: 5px 12px;
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.12s, border-color 0.12s;
}
.genre-toggle:hover { border-color: var(--moss); color: var(--moss); }
.chip {
  font-family: var(--f-mono);
  font-size: 12px;
  color: var(--muted);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 12px;
  cursor: pointer;
  transition: color 0.12s, border-color 0.12s;
}
.chip:hover { color: var(--text); border-color: var(--line-2); }
.chip[aria-pressed="true"] {
  color: var(--void);
  background: var(--moss);
  border-color: var(--moss);
  font-weight: 600;
}

/* ---- Main layout ---- */
main { padding-top: 26px; padding-bottom: 60px; }
.feed-section { margin-top: 34px; }
.section-head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 14px; }
.section-title { font-family: var(--f-display); font-size: clamp(20px, 3vw, 28px); margin: 0; letter-spacing: 0.5px; text-transform: uppercase; color: var(--white); }
.section-title::before { content: ""; }
.section-sub { color: var(--muted); font-size: 13px; font-family: var(--f-mono); }
.clear-btn {
  margin-left: auto;
  font-family: var(--f-mono);
  font-size: 12px;
  color: var(--void);
  background: var(--moss);
  border: none;
  border-radius: var(--radius);
  padding: 6px 12px;
  cursor: pointer;
}

/* ---- Results tools: sort + count + pager ---- */
.results-tools { margin-left: auto; display: flex; align-items: center; gap: 14px; }
.results-tools .clear-btn { margin-left: 0; }
.sort-control { display: inline-flex; align-items: center; gap: 8px; }
.sort-label { font-family: var(--f-mono); font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.5px; }
#sort-select {
  font-family: var(--f-mono);
  font-size: 12px;
  color: var(--text);
  background: var(--panel-2);
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  padding: 6px 10px;
  cursor: pointer;
}
#sort-select:focus-visible { outline: 2px solid var(--moss); outline-offset: 1px; }
.results-count { font-family: var(--f-mono); font-size: 12px; color: var(--muted); margin: -4px 0 12px; }
.pager { display: flex; align-items: center; justify-content: center; gap: 16px; margin: 26px 0 8px; }
.pager-btn {
  font-family: var(--f-mono);
  font-size: 13px;
  color: var(--text);
  background: var(--panel-2);
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  padding: 8px 16px;
  cursor: pointer;
}
.pager-btn:hover:not(:disabled) { border-color: var(--moss); color: var(--boot); }
.pager-btn:disabled { opacity: 0.4; cursor: default; }
.pager-status { font-family: var(--f-mono); font-size: 12px; color: var(--muted); }

/* ---- Per-game page (B) ---- */
.back-link {
  font-family: var(--f-mono);
  font-size: 13px;
  color: var(--moss);
  background: none;
  border: none;
  padding: 4px 0;
  margin-bottom: 16px;
  cursor: pointer;
}
.back-link:hover { color: var(--boot); }
.game-page { display: flex; flex-direction: column; gap: 18px; }
.game-hero { display: flex; gap: 24px; align-items: flex-start; }
.game-hero-art {
  flex: 0 0 clamp(220px, 40%, 460px);
  aspect-ratio: 460 / 215;
  border-radius: var(--radius);
  border: 1px solid var(--line-2);
  background-size: cover !important;
  background-position: center !important;
}
.game-hero-info { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.game-title { font-family: var(--f-display); font-size: clamp(28px, 5vw, 48px); margin: 0; line-height: 1.05; letter-spacing: 0.5px; text-transform: uppercase; }
.game-creator { font-family: var(--f-mono); font-size: 14px; color: var(--muted); }
.game-stats { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.game-boost { align-self: flex-start; margin-top: 6px; }
.game-boost.boosted { opacity: 0.75; }
.game-blurb { font-size: 17px; line-height: 1.65; color: var(--text); max-width: 68ch; margin: 0; }
.game-play { margin: 2px 0; }
.game-tags { margin-top: 2px; }
.game-loading, .game-notfound { font-family: var(--f-mono); color: var(--muted); padding: 40px 0; }
.game-notfound { display: flex; flex-direction: column; gap: 14px; align-items: flex-start; }
@media (max-width: 680px) {
  .game-hero { flex-direction: column; }
  .game-hero-art { flex-basis: auto; width: 100%; }
}

/* Two-column game page: main content + "Boosted by" side column */
.game-layout { display: flex; gap: 28px; align-items: flex-start; }
.game-layout .game-page { flex: 1 1 auto; min-width: 0; }
.game-aside { flex: 0 0 210px; }
.boosters {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  padding: 12px 12px 14px;
  position: sticky;
  top: 16px;
}
.boosters-head { font-family: var(--f-pixel); font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 10px; }
.boosters-list { display: flex; flex-direction: column; gap: 8px; }
.boosters-empty { font-family: var(--f-mono); font-size: 12px; color: var(--muted); }
.booster { display: flex; align-items: center; gap: 8px; text-decoration: none; color: var(--text); padding: 3px 4px; border-radius: 4px; }
.booster:hover { background: var(--panel-2); }
.booster:hover .booster-handle { color: var(--boot); }
.booster-avatar { width: 22px; height: 22px; border-radius: 50%; object-fit: cover; border: 1px solid var(--line-2); flex: 0 0 auto; }
.booster-handle { font-family: var(--f-mono); font-size: 12px; color: var(--moss); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 760px) {
  .game-layout { flex-direction: column; }
  .game-aside { flex-basis: auto; width: 100%; }
  .boosters { position: static; }
}

/* User profile page */
.user-header { display: flex; align-items: center; gap: 16px; margin-bottom: 20px; }
.user-avatar { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; border: 1px solid var(--line-2); }
.user-name { font-family: var(--f-display); font-size: clamp(24px, 4vw, 34px); margin: 0; text-transform: uppercase; letter-spacing: 0.5px; }
.user-sub { font-family: var(--f-mono); font-size: 13px; color: var(--muted); margin-top: 2px; }

/* ---- Featured hero ---- */
.featured { margin-top: 8px; }
.hero {
  position: relative;
  display: block;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--line-2);
  min-height: 320px;
  isolation: isolate;
}
.hero-art { position: absolute; inset: 0; z-index: -2; }
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(90deg, rgba(5, 10, 5, 0.92) 0%, rgba(5, 10, 5, 0.7) 40%, rgba(5, 10, 5, 0.1) 100%);
}
.hero-body { padding: clamp(20px, 4vw, 40px); max-width: 620px; display: flex; flex-direction: column; height: 100%; justify-content: flex-end; min-height: 320px; }
.hero h1 { font-family: var(--f-display); font-size: clamp(34px, 6vw, 60px); margin: 8px 0 6px; line-height: 0.98; text-transform: uppercase; }
.hero .blurb { color: var(--text); font-size: 16px; margin: 0 0 14px; }
.hero-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; color: var(--muted); font-family: var(--f-mono); font-size: 13px; margin-bottom: 18px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--f-body);
  font-weight: 600;
  font-size: 15px;
  border-radius: var(--radius);
  padding: 11px 20px;
  cursor: pointer;
  border: 1px solid transparent;
}
.btn-play { background: var(--moss); color: var(--void); box-shadow: var(--glow); }
.btn-play:hover { background: var(--boot); }
.btn-ghost { background: transparent; border-color: var(--line-2); color: var(--text); }
.btn-ghost:hover { border-color: var(--moss); }
.btn[disabled] { opacity: 0.55; cursor: default; box-shadow: none; }

/* ---- Card rows / grid ---- */
.card-row {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(230px, 1fr);
  gap: 16px;
  overflow-x: auto;
  padding-bottom: 8px;
  scroll-snap-type: x proximity;
}
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--panel);
  scroll-snap-align: start;
  transition: border-color 0.14s, transform 0.14s;
  cursor: pointer;
}
.card:hover { border-color: var(--moss); transform: translateY(-2px); }
.card-art { position: relative; aspect-ratio: 16 / 10; }
.card-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  font-family: var(--f-pixel);
  font-size: 8px;
  letter-spacing: 0.5px;
  padding: 4px 6px;
  border-radius: 4px;
  background: rgba(5, 10, 5, 0.82);
  border: 1px solid var(--line-2);
  color: var(--boot);
}
.card-boosts {
  position: absolute;
  top: 8px;
  right: 8px;
  font-family: var(--f-mono);
  font-size: 12px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(5, 10, 5, 0.82);
  border: 1px solid var(--line);
  color: var(--text);
}
.card-boosts.zero { color: var(--muted); }
button.card-boosts { cursor: pointer; font-family: var(--f-mono); transition: color 0.12s, border-color 0.12s, background 0.12s; }
button.card-boosts:not(:disabled):hover { color: var(--void); background: var(--moss); border-color: var(--moss); }
button.card-boosts:disabled { cursor: default; }
.card-boosts.boosted { color: var(--boot); border-color: var(--moss); }
.btn.boosted { border-color: var(--moss); color: var(--boot); }

/* Interest gate (P5): web3-only content is hidden by default (web2-first) and only
   shown once the visitor opts into web3 (data-web3="on" on <html>). */
.web3-only { display: none !important; }
:root[data-web3="on"] .web3-only { display: revert !important; }
/* Pulls a filter chip out of the row regardless of the gate (the web3 chip for a
   player who hid web3 games). Must stay after the rule above to win the tie. */
.genre-filters .chip.chip-off { display: none !important; }
.foot-web3 { color: var(--moss); }
.interest-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 6px; }
.ichip {
  font-family: var(--f-mono);
  font-size: 13px;
  color: var(--muted);
  background: var(--panel-2);
  border: 1px solid var(--line-2);
  border-radius: 999px;
  padding: 8px 14px;
  cursor: pointer;
  transition: color 0.12s, border-color 0.12s, background 0.12s;
}
.ichip:hover { color: var(--text); }
.ichip[aria-pressed="true"] { color: var(--void); background: var(--moss); border-color: var(--moss); font-weight: 600; }

/* Community threads (P5) */
.comments { border-top: 1px solid var(--line); margin-top: 18px; padding-top: 14px; }
.comments-head { font-family: var(--f-pixel); font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 10px; }
.comment { padding: 8px 0; border-bottom: 1px solid var(--line); }
.comment-top { display: flex; align-items: baseline; gap: 10px; }
.comment-avatar { width: 20px; height: 20px; border-radius: 50%; object-fit: cover; border: 1px solid var(--line-2); }
.comment-handle { font-family: var(--f-mono); font-size: 12px; color: var(--moss); }
.comment-report { margin-left: auto; background: none; border: none; color: var(--muted); font-size: 11px; cursor: pointer; }
.comment-report:hover { color: var(--red); }
/* Moderator-only delete. When both buttons show, report keeps the margin-left:auto
   push and remove sits just after it. */
.comment-remove { background: none; border: none; color: var(--muted); font-size: 11px; cursor: pointer; }
.comment-remove:hover { color: var(--red); }
.comment-top .comment-remove:only-of-type { margin-left: auto; }
.comment-text { color: var(--text); font-size: 14px; white-space: pre-wrap; word-break: break-word; margin-top: 3px; }
.comment-empty { color: var(--muted); font-family: var(--f-mono); font-size: 13px; padding: 6px 0; }
.comment-form { display: flex; gap: 10px; margin-top: 12px; }
.comment-form textarea {
  flex: 1;
  background: var(--panel-2);
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  color: var(--text);
  font-family: var(--f-body);
  font-size: 14px;
  padding: 8px 11px;
  resize: vertical;
  min-height: 40px;
  outline: none;
}
.comment-form textarea:focus { border-color: var(--moss); box-shadow: var(--glow); }

/* Game detail + embed play (P4) */
.detail-card { width: min(760px, 100%); }
.detail-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; color: var(--muted); font-family: var(--f-mono); font-size: 13px; margin: 4px 0 10px; }
.detail-blurb { color: var(--text); margin: 0 0 16px; }
.detail-play { margin-bottom: 14px; }
.detail-note { color: var(--text); font-size: 14px; margin: 0 0 12px; }
.detail-note.muted { color: var(--muted); }
.detail-playrow { display: flex; gap: 12px; flex-wrap: wrap; }
.embed-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--line-2);
  border-radius: 8px;
  overflow: hidden;
  background: #000;
}
.embed-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* Admin review cards (P3) */
.sub-card { border: 1px solid var(--line); background: var(--panel); border-radius: 10px; padding: 16px 18px; margin-bottom: 14px; }
.sub-title { font-family: var(--f-display); font-size: 20px; text-transform: uppercase; letter-spacing: 0.4px; margin-bottom: 8px; }
.sub-field { display: flex; gap: 10px; padding: 3px 0; font-size: 14px; }
.sub-label { font-family: var(--f-pixel); font-size: 9px; color: var(--muted); min-width: 60px; padding-top: 3px; text-transform: uppercase; }
.sub-value { color: var(--text); word-break: break-word; }
.sub-value.mono { font-family: var(--f-mono); font-size: 13px; color: var(--cyan); }
.sub-actions { display: flex; gap: 10px; margin-top: 12px; }

/* Submit modal (P3) */
.modal {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(5, 10, 5, 0.72);
  backdrop-filter: blur(3px);
}
.modal-card {
  width: min(520px, 100%);
  max-height: 90vh;
  overflow-y: auto;
  background: var(--panel);
  border: 1px solid var(--line-2);
  border-radius: 10px;
  padding: 22px 24px 24px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
}
.modal-head { display: flex; align-items: center; justify-content: space-between; }
.modal-head h2 { font-family: var(--f-display); font-size: 24px; margin: 0; text-transform: uppercase; letter-spacing: 0.5px; }
.modal-x { background: none; border: none; color: var(--muted); font-size: 18px; cursor: pointer; }
.modal-x:hover { color: var(--text); }
.modal-note { color: var(--muted); font-size: 13px; margin: 6px 0 16px; }
.submit-form { display: flex; flex-direction: column; gap: 12px; }
.submit-form label { display: flex; flex-direction: column; gap: 5px; font-family: var(--f-mono); font-size: 12px; color: var(--muted); }
.submit-form input {
  background: var(--panel-2);
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  color: var(--text);
  font-family: var(--f-body);
  font-size: 15px;
  padding: 9px 12px;
  outline: none;
}
.submit-form input:focus { border-color: var(--moss); box-shadow: var(--glow); }
.submit-actions { display: flex; align-items: center; gap: 14px; margin-top: 6px; }
.submit-msg { font-family: var(--f-mono); font-size: 12px; color: var(--amber); }

/* Settings modal — labelled toggle switch */
.settings-row { margin: 14px 0 6px; }
.switch { display: flex; align-items: flex-start; gap: 14px; cursor: pointer; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch-track {
  flex: none;
  position: relative;
  width: 44px;
  height: 24px;
  margin-top: 2px;
  background: var(--panel-3);
  border: 1px solid var(--line-2);
  border-radius: 999px;
  transition: background 0.15s, border-color 0.15s;
}
.switch-thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  background: var(--muted);
  border-radius: 50%;
  transition: transform 0.15s, background 0.15s;
}
.switch input:checked + .switch-track { background: var(--moss-deep); border-color: var(--moss); }
.switch input:checked + .switch-track .switch-thumb { transform: translateX(20px); background: var(--boot); }
.switch input:focus-visible + .switch-track { box-shadow: var(--glow); }
.switch-label { display: flex; flex-direction: column; gap: 3px; }
.switch-title { font-family: var(--f-body); font-size: 15px; color: var(--text); }
.switch-note { font-family: var(--f-mono); font-size: 12px; color: var(--muted); line-height: 1.5; }

/* Submit-form taxonomy pickers: multi-select chips from the catalog vocabulary */
.submit-picker { display: flex; flex-direction: column; gap: 7px; }
.picker-label { font-family: var(--f-mono); font-size: 12px; color: var(--muted); }
.picker-label small { opacity: 0.7; font-size: 11px; }
.tag-picker { display: flex; flex-wrap: wrap; gap: 7px; }
.tag-picker .chip.pick { font-size: 11px; padding: 4px 10px; }
.picker-empty { font-family: var(--f-mono); font-size: 12px; color: var(--muted); }
.tag-picker.at-cap { animation: pickShake 0.3s ease; }
@keyframes pickShake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-3px); }
  75% { transform: translateX(3px); }
}

/* Boost toast */
.toast {
  position: fixed;
  left: 50%;
  bottom: 26px;
  transform: translateX(-50%) translateY(20px);
  background: var(--panel-2);
  border: 1px solid var(--line-2);
  color: var(--text);
  font-family: var(--f-mono);
  font-size: 13px;
  padding: 10px 16px;
  border-radius: var(--radius);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s, transform 0.18s;
  z-index: 80;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.ok { border-color: var(--moss); box-shadow: var(--glow); }
.toast.err { border-color: var(--red); color: #f0b8b2; }
.card-body { padding: 12px 13px 14px; display: flex; flex-direction: column; gap: 6px; }
.card-title { font-family: var(--f-display); font-size: 18px; letter-spacing: 0.3px; text-transform: uppercase; line-height: 1.05; }
.card-creator { font-family: var(--f-mono); font-size: 12px; color: var(--muted); }
.card-tagrow { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 2px; }
.card-steam {
  margin-top: 4px;
  font-family: var(--f-mono);
  font-size: 12px;
  color: var(--moss);
  text-decoration: none;
  align-self: flex-start;
  border-bottom: 1px solid transparent;
}
.card-steam:hover { color: var(--boot); border-bottom-color: var(--moss); }
.tag { font-size: 11px; color: var(--muted); border: 1px solid var(--line); border-radius: 4px; padding: 1px 6px; }
.tag.integ { color: var(--cyan); border-color: rgba(92, 200, 200, 0.35); }
.tag.info { color: var(--amber); border-color: rgba(232, 184, 75, 0.35); }

.empty { color: var(--muted); font-family: var(--f-mono); padding: 30px 0; text-align: center; }
.site-foot { display: flex; align-items: center; gap: 12px; padding: 30px 0 50px; color: var(--muted); font-family: var(--f-mono); font-size: 12px; border-top: 1px solid var(--line); margin-top: 30px; }
.foot-badge { width: 30px; height: 30px; opacity: 0.85; filter: drop-shadow(0 0 5px rgba(129, 164, 84, 0.3)); }

@media (max-width: 640px) {
  .topbar-inner { flex-wrap: wrap; }
  .brand-sub { display: none; }
  .search { flex-basis: 100%; justify-content: flex-start; }
  .search input { width: 100%; }
}
