/* Modora. Barlow (self-hosted) for everything; the condensed cut only for small uppercase labels.
   Accent colours come from /site.css (the owner's Customize settings), which overrides the defaults below. */
@font-face { font-family: 'Barlow'; font-weight: 400; font-display: swap; src: url(/fonts/barlow-400.woff2) format('woff2'); }
@font-face { font-family: 'Barlow'; font-weight: 500; font-display: swap; src: url(/fonts/barlow-500.woff2) format('woff2'); }
@font-face { font-family: 'Barlow'; font-weight: 600; font-display: swap; src: url(/fonts/barlow-600.woff2) format('woff2'); }
@font-face { font-family: 'Barlow'; font-weight: 700; font-display: swap; src: url(/fonts/barlow-700.woff2) format('woff2'); }
@font-face { font-family: 'Barlow Condensed'; font-weight: 600; font-display: swap; src: url(/fonts/barlow-condensed-600.woff2) format('woff2'); }

:root {
  color-scheme: dark;
  --bg: #0a0c11;
  --bg-2: #0d1016;
  --surface: #12151c;
  --surface-2: #171b23;
  --surface-3: #1e232d;
  --border: rgba(255, 255, 255, 0.07);
  --border-2: rgba(255, 255, 255, 0.11);
  --border-3: rgba(255, 255, 255, 0.18);
  --text: #eceff4;
  --text-2: #b8c0ce;
  --muted: #8a93a5;
  --faint: #626b7e;
  --accent: #1f66ff;
  --accent-hi: #4a86ff;
  --accent-deep: #0a2f86;
  --on-accent: #ffffff;
  --tint: 0.15;
  --vip: #e2b23c;
  --vip-text: #f1c868;
  --vip-soft: rgba(226, 178, 60, 0.12);
  --vip-line: rgba(226, 178, 60, 0.32);
  --green: #34d399;
  --red: #f87171;
  --amber: #fbbf24;
  --radius: 14px;
  --shadow-lg: 0 24px 60px -18px rgba(0, 0, 0, 0.75), 0 2px 6px rgba(0, 0, 0, 0.3);
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --font: 'Barlow', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-cond: 'Barlow Condensed', 'Barlow', 'Arial Narrow', sans-serif;
  --mono: ui-monospace, 'Cascadia Code', Consolas, monospace;
  --page: min(1280px, 100% - 48px);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 84px; }
body {
  position: relative;
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font: 400 15px/1.55 var(--font);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
main { flex: 1; outline: none; }
a { color: var(--accent-hi); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
h1, h2, h3 { margin: 0; font-weight: 700; line-height: 1.15; letter-spacing: -0.015em; }
p { margin: 0; }
button { font: inherit; color: inherit; }
img { max-width: 100%; }
::selection { background: color-mix(in srgb, var(--accent) 45%, transparent); }
:focus-visible { outline: 2px solid var(--accent-hi); outline-offset: 2px; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.muted { color: var(--muted); }
.small { font-size: 13.5px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: fixed; left: 16px; top: -48px; z-index: 100; padding: 8px 14px; border-radius: 8px; background: var(--accent); color: var(--on-accent); font-weight: 600; }
.skip:focus { top: 12px; text-decoration: none; }

/* ---------- header art: the owner's picture, fading into the page ---------- */
.backdrop {
  position: absolute;
  inset: 0 0 auto;
  z-index: -1;
  height: 320px;
  overflow: hidden;
  background: #0b0e15 url(/backdrop.svg) center 42% / cover no-repeat;
  transition: height 0.5s var(--ease);
}
.backdrop::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(rgb(10 12 17 / calc(var(--tint) + 0.45)), rgb(10 12 17 / calc(var(--tint) + 0.45))),
    linear-gradient(180deg, rgba(10, 12, 17, 0) 40%, var(--bg) 100%);
}
body[data-view='mods'] .backdrop { height: 640px; }
body[data-view='mods'] .backdrop::before {
  background:
    linear-gradient(rgb(10 12 17 / var(--tint)), rgb(10 12 17 / var(--tint))),
    linear-gradient(90deg, rgba(10, 12, 17, 0.88) 0%, rgba(10, 12, 17, 0.55) 40%, rgba(10, 12, 17, 0.08) 78%),
    linear-gradient(180deg, rgba(10, 12, 17, 0.3) 0%, rgba(10, 12, 17, 0) 22%, rgba(10, 12, 17, 0.5) 66%, var(--bg) 100%);
}

/* ---------- top bar ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  border-bottom: 1px solid var(--border);
  background: rgba(10, 12, 17, 0.74);
  -webkit-backdrop-filter: saturate(150%) blur(16px);
  backdrop-filter: saturate(150%) blur(16px);
}
.topbar-inner { display: flex; align-items: center; gap: 28px; width: var(--page); height: 64px; margin: 0 auto; }
.brand { display: inline-flex; flex: none; align-items: center; }
/* logo-clear.png is the owner's logo with its black background turned into transparency. */
.brand-logo { display: block; width: auto; height: 36px; }
.nav { display: flex; align-items: stretch; align-self: stretch; gap: 2px; }
.nav a {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  color: var(--text-2);
  font-size: 14.5px;
  font-weight: 500;
  white-space: nowrap;
  transition: color 0.15s;
}
.nav a:hover { color: var(--text); text-decoration: none; }
.nav a.active { color: var(--text); }
.nav a.active::after { content: ''; position: absolute; left: 12px; right: 12px; bottom: -1px; height: 2px; border-radius: 2px 2px 0 0; background: var(--accent); }
.count-pill { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--accent); color: var(--on-accent); font-size: 11px; font-weight: 700; line-height: 18px; text-align: center; font-variant-numeric: tabular-nums; }
.top-actions { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.account { display: flex; align-items: center; gap: 8px; }

/* Live "online" counter */
.online {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 32px;
  padding: 0 12px 0 11px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-2);
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  cursor: default;
}
.online b { display: inline-block; color: var(--text); font-weight: 600; }
.online b.tick { animation: tick 0.4s var(--ease); }
@keyframes tick { from { opacity: 0; transform: translateY(-45%); } }
.live-dot { position: relative; flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--green); }
.live-dot::after { content: ''; position: absolute; inset: 0; border-radius: 50%; background: var(--green); animation: ping 2.4s var(--ease) infinite; }
@keyframes ping { 0% { opacity: 0.55; transform: scale(1); } 75%, 100% { opacity: 0; transform: scale(2.7); } }
.online.stale .live-dot { background: var(--faint); }
.online.stale .live-dot::after { display: none; }
.online.stale b { color: var(--text-2); }

/* Account menu */
.menu-wrap { position: relative; }
.account-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 9px 0 12px;
  border: 1px solid var(--border-2);
  border-radius: 10px;
  background: var(--surface);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.15s, border-color 0.15s;
}
.account-btn:hover { border-color: var(--border-3); background: var(--surface-2); }
.account-btn > .icon { width: 16px; height: 16px; color: var(--muted); transition: transform 0.2s var(--ease); }
.account-btn[aria-expanded='true'] > .icon { transform: rotate(180deg); }
.account-name { max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 40;
  min-width: 240px;
  padding: 6px;
  border: 1px solid var(--border-2);
  border-radius: 12px;
  background: var(--surface-2);
  box-shadow: var(--shadow-lg);
  transform-origin: top right;
  animation: pop-in 0.16s var(--ease);
}
@keyframes pop-in { from { opacity: 0; transform: translateY(-4px) scale(0.98); } }
.menu-head { display: grid; gap: 4px; margin-bottom: 6px; padding: 10px 10px 12px; border-bottom: 1px solid var(--border); }
.menu-head b { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-weight: 600; }
.menu-head span { color: var(--muted); font-size: 13px; }
.menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 10px;
  border: 0;
  border-radius: 8px;
  background: none;
  color: var(--text-2);
  font-size: 14px;
  text-align: left;
  cursor: pointer;
}
.menu-item:hover, .menu-item:focus-visible { background: rgba(255, 255, 255, 0.06); color: var(--text); text-decoration: none; }
.menu-item .icon { width: 17px; height: 17px; color: var(--muted); }
.menu-sep { height: 1px; margin: 6px 4px; background: var(--border); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 38px;
  padding: 0 16px;
  border: 1px solid var(--border-2);
  border-radius: 9px;
  background: var(--surface-2);
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.15s, border-color 0.15s, color 0.15s, box-shadow 0.15s, transform 0.1s;
}
.btn:hover { border-color: var(--border-3); background: var(--surface-3); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn:disabled, .btn[aria-disabled='true'] { opacity: 0.5; cursor: not-allowed; pointer-events: none; }
.btn .icon { width: 17px; height: 17px; }
.btn-primary { border-color: transparent; background: var(--accent); color: var(--on-accent); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16), 0 1px 2px rgba(0, 0, 0, 0.35); }
.btn-primary:hover { border-color: transparent; background: var(--accent-hi); }
.btn-discord { border-color: transparent; background: #5865f2; color: #fff; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14), 0 1px 2px rgba(0, 0, 0, 0.35); }
.btn-discord:hover { border-color: transparent; background: #4752c4; }
.label-short { display: none; }
.btn-vip { border-color: transparent; background: var(--vip); color: #1d1500; }
.btn-vip:hover { border-color: transparent; background: #ecc05a; }
.btn-danger { border-color: rgba(248, 113, 113, 0.32); background: transparent; color: #fca5a5; }
.btn-danger:hover { border-color: rgba(248, 113, 113, 0.55); background: rgba(248, 113, 113, 0.1); }
.btn-ghost { border-color: transparent; background: transparent; color: var(--text-2); }
.btn-ghost:hover { border-color: transparent; background: rgba(255, 255, 255, 0.06); color: var(--text); }
.btn-glass { border-color: rgba(255, 255, 255, 0.16); background: rgba(255, 255, 255, 0.08); color: #fff; -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.btn-glass:hover { border-color: rgba(255, 255, 255, 0.26); background: rgba(255, 255, 255, 0.14); }
.btn-lg { height: 46px; padding: 0 22px; border-radius: 11px; font-size: 15px; }
.btn-sm { height: 32px; padding: 0 12px; border-radius: 8px; font-size: 13px; }
.btn-sm .icon { width: 15px; height: 15px; }
.btn-icon { width: 38px; padding: 0; }
.btn-block { width: 100%; }
.link-btn { padding: 0; border: 0; background: none; color: var(--accent-hi); font-weight: 600; cursor: pointer; }
.link-btn:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- badges and pills ---------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 20px;
  padding: 0 7px;
  border-radius: 6px;
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.badge .icon { width: 12px; height: 12px; stroke-width: 2.2; }
.badge-vip { background: var(--vip-soft); color: var(--vip-text); box-shadow: inset 0 0 0 1px var(--vip-line); }
.badge-role { background: color-mix(in srgb, var(--accent) 15%, transparent); color: var(--accent-hi); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 38%, transparent); }
.badge-ok { background: rgba(52, 211, 153, 0.1); color: #6ee7b7; box-shadow: inset 0 0 0 1px rgba(52, 211, 153, 0.3); }
.badge-bad { background: rgba(248, 113, 113, 0.1); color: #fca5a5; box-shadow: inset 0 0 0 1px rgba(248, 113, 113, 0.3); }
.badge-wait { background: rgba(255, 255, 255, 0.05); color: var(--text-2); box-shadow: inset 0 0 0 1px var(--border-2); }
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 26px;
  padding: 0 10px;
  border: 1px solid var(--border-2);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-2);
  font-size: 12.5px;
  font-weight: 500;
  white-space: nowrap;
}
.pill .icon { width: 14px; height: 14px; }
.pill.vip { border-color: var(--vip-line); background: var(--vip-soft); color: var(--vip-text); }
.author { display: inline-flex; align-items: center; gap: 6px; min-width: 0; vertical-align: middle; }
.author-name { overflow: hidden; color: var(--text); font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
.dot-sep { flex: none; width: 3px; height: 3px; border-radius: 50%; background: var(--faint); }

/* ---------- page frame ---------- */
.page { width: var(--page); margin: 0 auto; padding-bottom: 96px; }
.page.narrow { width: min(900px, 100% - 48px); }
.page.enter { animation: page-in 0.34s var(--ease) both; }
@keyframes page-in { from { opacity: 0; transform: translateY(8px); } }
.surface { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.panel { padding: 22px; }
.card-title { margin-bottom: 12px; font-size: 16px; font-weight: 600; }
.page-head { padding: 52px 0 28px; }
.page-head h1 { font-size: clamp(30px, 4vw, 40px); letter-spacing: -0.025em; }
.page-head p { max-width: 62ch; margin-top: 10px; color: var(--text-2); font-size: 16px; }
.section-title { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 48px 0 14px; }
.section-title h2 { font-size: 18px; font-weight: 600; }

.notice-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 20px;
  padding: 11px 12px 11px 14px;
  border: 1px solid var(--border-2);
  border-radius: 12px;
  background: rgba(18, 21, 28, 0.86);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  font-size: 14px;
  animation: page-in 0.4s var(--ease) both;
}
.notice-bar .notice-text { flex: 1; color: var(--text-2); }
.notice-bar .btn { flex: none; }

/* ---------- home ---------- */
.hero { max-width: 700px; padding: 92px 0 76px; }
.home-message { display: flex; align-items: flex-start; gap: 12px; max-width: 640px; margin-bottom: 26px; padding: 14px 14px 14px 16px; border: 1px solid color-mix(in srgb, var(--accent) 55%, transparent); border-radius: 14px; background: color-mix(in srgb, var(--accent) 16%, rgba(14, 17, 24, 0.88)); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.28); animation: page-in 0.4s var(--ease) both; }
.home-message-icon { flex: none; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; background: var(--accent); color: var(--on-accent); }
.home-message-icon .icon { width: 17px; height: 17px; }
.home-message-text { flex: 1; margin: 4px 0 0; color: #fff; font-size: 15.5px; font-weight: 500; line-height: 1.5; white-space: pre-line; overflow-wrap: anywhere; }
.home-message-edit { flex: none; }
.home-message-add { margin-bottom: 18px; }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; margin-bottom: 20px; color: var(--text-2); font: 600 13px/1 var(--font-cond); letter-spacing: 0.16em; text-transform: uppercase; }
.eyebrow::before { content: ''; width: 22px; height: 2px; border-radius: 2px; background: var(--accent); }
.hero-title { font-size: clamp(46px, 6.6vw, 80px); line-height: 0.98; letter-spacing: -0.035em; text-wrap: balance; }
.hero-title .dot { color: var(--accent); }
.hero-lead { max-width: 52ch; margin-top: 22px; color: #cdd3de; font-size: 17.5px; line-height: 1.6; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.hero-stats { display: flex; flex-wrap: wrap; gap: 14px 44px; margin: 46px 0 0; padding: 0; }
.hero-stats > div { display: grid; gap: 4px; }
.hero-stats dt { order: 2; color: var(--muted); font-size: 13px; }
.hero-stats dd { order: 1; display: flex; align-items: center; gap: 10px; margin: 0; font-size: 26px; font-weight: 700; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }

.catalog { display: grid; grid-template-columns: 216px minmax(0, 1fr); align-items: start; gap: 40px; }
.filters { position: sticky; top: 88px; display: grid; gap: 26px; }
.filter-group h3 { margin-bottom: 8px; padding: 0 10px; color: var(--muted); font: 600 12px/1 var(--font-cond); letter-spacing: 0.15em; text-transform: uppercase; }
.filter-list { display: grid; gap: 2px; }
.filter-sep { display: none; }
.filter-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  height: 36px;
  padding: 0 10px;
  border: 0;
  border-radius: 8px;
  background: none;
  color: var(--text-2);
  font-size: 14px;
  font-weight: 500;
  text-align: left;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.15s, color 0.15s;
}
.filter-item:hover { background: rgba(255, 255, 255, 0.04); color: var(--text); }
.filter-item .icon { width: 17px; height: 17px; color: var(--muted); transition: color 0.15s; }
.filter-item[aria-pressed='true'] { background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--text); }
.filter-item[aria-pressed='true'] .icon { color: var(--accent-hi); }
.filter-count { margin-left: auto; color: var(--faint); font-size: 12.5px; font-variant-numeric: tabular-nums; }
.catalog-bar { display: flex; gap: 12px; margin-bottom: 14px; }
.search { position: relative; flex: 1; }
.search .icon { position: absolute; top: 50%; left: 13px; color: var(--muted); transform: translateY(-50%); pointer-events: none; }
.search input { height: 42px; padding-left: 40px; }
.sort select { width: auto; height: 42px; }
.pager { display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 28px; flex-wrap: wrap; }
.pager-nums { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: center; }
.pager button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 38px; min-width: 38px; padding: 0 12px; border: 1px solid var(--border-2); border-radius: 9px; background: var(--surface-2); color: inherit; font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
.pager button:hover:not(:disabled) { border-color: var(--border-3); background: var(--surface-3); }
.pager button:disabled { opacity: 0.4; cursor: not-allowed; }
.pager button.is-current { border-color: transparent; background: var(--accent); color: var(--on-accent); }
.pager .icon { width: 16px; height: 16px; }
.pager-gap { color: var(--muted); padding: 0 2px; }
@media (max-width: 560px) { .pager-step span { display: none; } .pager-step { padding: 0 10px; } }
.result-line { min-height: 21px; margin-bottom: 16px; color: var(--muted); font-size: 13.5px; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); gap: 20px; }
.mod-card {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: inherit;
  transition: transform 0.25s var(--ease), border-color 0.2s, box-shadow 0.25s var(--ease);
  animation: card-in 0.45s var(--ease) both;
  animation-delay: calc(var(--i, 0) * 40ms);
}
.mod-card:hover { border-color: var(--border-3); box-shadow: 0 18px 40px -20px rgba(0, 0, 0, 0.8); text-decoration: none; transform: translateY(-3px); }
.mod-link { display: flex; flex: 1; flex-direction: column; border-radius: inherit; color: inherit; }
.mod-link:hover { text-decoration: none; }
.mod-link:focus-visible { outline-offset: -2px; }
/* Owner/admin only: delete straight from the list. */
.card-delete {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: rgba(10, 12, 17, 0.75);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  color: #fca5a5;
  opacity: 0;
  cursor: pointer;
  transition: opacity 0.15s, background-color 0.15s, color 0.15s;
}
.card-delete .icon { width: 17px; height: 17px; }
.mod-card:hover .card-delete, .card-delete:focus-visible { opacity: 1; }
.card-delete:hover { background: #b91c1c; color: #fff; }
.mod-card.is-vip { border-color: rgba(226, 178, 60, 0.2); }
.mod-card.is-vip:hover { border-color: rgba(226, 178, 60, 0.45); }
@keyframes card-in { from { opacity: 0; transform: translateY(10px); } }
.mod-cover { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: var(--surface-2); }
.mod-cover img { display: block; width: 100%; height: 100%; object-fit: cover; opacity: 0; transform: scale(1.02); transition: opacity 0.4s, transform 0.7s var(--ease); }
.mod-cover img.loaded { opacity: 1; transform: scale(1); }
.mod-card:hover .mod-cover img.loaded { transform: scale(1.045); }
.cover-empty {
  display: grid;
  place-items: center;
  height: 100%;
  background:
    radial-gradient(120% 90% at 0% 0%, color-mix(in srgb, var(--accent) 20%, transparent), transparent 62%),
    linear-gradient(180deg, var(--surface-2), var(--surface));
  color: color-mix(in srgb, var(--accent-hi) 65%, #fff);
}
.cover-empty .icon { width: 40px; height: 40px; opacity: 0.75; stroke-width: 1.3; }
.cover-tag {
  position: absolute;
  top: 10px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 24px;
  padding: 0 8px;
  border-radius: 7px;
  background: rgba(10, 12, 17, 0.72);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
}
.cover-tag .icon { width: 13px; height: 13px; stroke-width: 2; }
/* Category tags on the mod cards, one colour per category. */
.cover-tag.cat-standalones { background: rgba(37, 99, 235, 0.9); }
.cover-tag.cat-trucks { background: rgba(37, 99, 235, 0.9); }
.cover-tag.cat-truck-mods { background: rgba(8, 145, 178, 0.9); }
.cover-tag.cat-interior-mods { background: rgba(180, 83, 9, 0.92); }
.cover-tag.cat-interior-addons { background: rgba(79, 70, 229, 0.9); }
.cover-tag.cat-trailers { background: rgba(234, 88, 12, 0.9); }
.cover-tag.cat-maps { background: rgba(22, 163, 74, 0.9); }
.cover-tag.cat-sounds { background: rgba(147, 51, 234, 0.9); }
.cover-tag.cat-skins { background: rgba(219, 39, 119, 0.9); }
.cover-tag.cat-tuning-mods { background: rgba(220, 38, 38, 0.9); }
.cover-tag.cat-other { background: rgba(71, 85, 105, 0.92); }
.cover-tag.vip { left: 10px; background: var(--vip); color: #1d1500; }
.cover-tag.count { top: auto; right: 10px; bottom: 10px; }
.cover-tags { position: absolute; top: 10px; left: 10px; right: 52px; display: flex; flex-wrap: wrap; gap: 6px; pointer-events: none; }
.cover-tags .cover-tag { position: static; }
.cover-tag.top { background: linear-gradient(135deg, #f6d365, #e2a23c); color: #241600; letter-spacing: 0.03em; box-shadow: 0 2px 10px rgba(226, 162, 60, 0.35); }
.pill.top { border-color: rgba(246, 211, 101, 0.55); background: linear-gradient(135deg, rgba(246, 211, 101, 0.2), rgba(226, 162, 60, 0.1)); color: #f6d365; font-weight: 600; letter-spacing: 0.03em; }
.badge-top { background: rgba(246, 211, 101, 0.12); color: #f6d365; box-shadow: inset 0 0 0 1px rgba(246, 211, 101, 0.35); }

/* People who aren't signed in see this instead of the mods. */
.catalog-locked { padding-bottom: 24px; }
.gate { display: grid; justify-items: center; gap: 12px; max-width: 560px; margin: 0 auto; padding: 44px 28px; text-align: center; }
.gate h2 { font-size: 22px; }
.gate p { max-width: 46ch; color: var(--text-2); }
.gate .btn { margin-top: 6px; }
.gate-icon { display: grid; place-items: center; width: 54px; height: 54px; border-radius: 16px; background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--accent-hi); }
.gate-icon .icon { width: 26px; height: 26px; }
.mod-body { display: flex; flex: 1; flex-direction: column; gap: 6px; padding: 14px 16px; }
.mod-meta { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12.5px; font-weight: 500; }
.mod-title { display: -webkit-box; overflow: hidden; font-size: 16.5px; font-weight: 600; line-height: 1.3; letter-spacing: -0.01em; overflow-wrap: anywhere; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.mod-desc { display: -webkit-box; overflow: hidden; color: var(--muted); font-size: 13.5px; line-height: 1.5; overflow-wrap: anywhere; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.mod-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto; padding-top: 12px; border-top: 1px solid var(--border); color: var(--muted); font-size: 13px; }
.mod-foot time { flex: none; }

.skeleton { overflow: hidden; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.sk { background: linear-gradient(90deg, rgba(255, 255, 255, 0.035) 25%, rgba(255, 255, 255, 0.075) 37%, rgba(255, 255, 255, 0.035) 63%); background-size: 400% 100%; animation: shimmer 1.4s ease infinite; }
.sk-cover { aspect-ratio: 16 / 10; }
.sk-line { height: 11px; margin: 14px 16px 0; border-radius: 6px; }
.sk-line.short { width: 38%; }
.sk-line.mid { width: 62%; margin-bottom: 18px; }
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: 0 0; } }

.empty { display: grid; justify-items: center; gap: 8px; padding: 64px 24px; border: 1px dashed var(--border-2); border-radius: var(--radius); text-align: center; }
.empty > .icon { width: 34px; height: 34px; margin-bottom: 6px; color: var(--muted); stroke-width: 1.5; }
.empty h3 { font-size: 18px; font-weight: 600; }
.empty p { max-width: 44ch; color: var(--muted); }
.empty .btn { margin-top: 12px; }

/* ---------- mod page ---------- */
.crumbs { display: flex; align-items: center; gap: 10px; padding-top: 28px; color: var(--muted); font-size: 13.5px; }
.crumbs a { display: inline-flex; align-items: center; gap: 6px; color: var(--text-2); }
.crumbs a:hover { color: var(--text); text-decoration: none; }
.crumbs .icon { width: 16px; height: 16px; }
.mod-head { padding: 22px 0 28px; }
.tag-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.mod-head .tag-row { margin-bottom: 14px; }
.mod-head h1 { font-size: clamp(28px, 3.6vw, 42px); letter-spacing: -0.03em; overflow-wrap: anywhere; text-wrap: balance; }
.byline { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 9px; margin-top: 12px; color: var(--muted); font-size: 14px; }
.mod-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; align-items: start; gap: 28px; }
.mod-main { display: grid; gap: 22px; min-width: 0; }
.mod-side { position: sticky; top: 88px; display: grid; gap: 16px; }
.mod-loading { display: grid; place-items: center; padding: 120px 0; }
.prose { color: #c9cfda; font-size: 15px; line-height: 1.7; white-space: pre-line; overflow-wrap: anywhere; }

.gallery { display: grid; gap: 10px; }
.stage {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #07090d;
  cursor: zoom-in;
  touch-action: pan-y;
  user-select: none;
}
.stage img { display: block; width: 100%; height: 100%; object-fit: contain; opacity: 0; transition: opacity 0.3s; }
.stage img.loaded { opacity: 1; }
.stage-btn {
  position: absolute;
  top: 50%;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(10, 12, 17, 0.62);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  color: #fff;
  opacity: 0;
  transform: translateY(-50%);
  cursor: pointer;
  transition: opacity 0.2s, background-color 0.15s;
}
.stage-btn .icon { width: 20px; height: 20px; }
.stage:hover .stage-btn, .stage:focus-within .stage-btn { opacity: 1; }
.stage-btn:hover { background: rgba(10, 12, 17, 0.88); }
.stage-btn.prev { left: 12px; }
.stage-btn.next { right: 12px; }
.stage-count {
  position: absolute;
  right: 12px;
  bottom: 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 26px;
  padding: 0 9px;
  border-radius: 7px;
  background: rgba(10, 12, 17, 0.66);
  color: #fff;
  font-size: 12.5px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  pointer-events: none;
}
.stage-count .icon { width: 14px; height: 14px; }
.thumbs { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: thin; }
.thumb { flex: none; width: 108px; aspect-ratio: 16 / 10; overflow: hidden; padding: 0; border: 2px solid transparent; border-radius: 9px; background: var(--surface-2); opacity: 0.6; cursor: pointer; transition: opacity 0.15s, border-color 0.15s; }
.thumb:hover { opacity: 1; }
.thumb[aria-current='true'] { border-color: var(--accent); opacity: 1; }
.thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }

.get-card { display: grid; gap: 10px; }
.get-note { color: var(--muted); font-size: 13px; text-align: center; }
.get-count { color: var(--text-2); font-size: 14px; text-align: center; font-variant-numeric: tabular-nums; }
.get-count b { color: var(--text); font-size: 18px; font-weight: 700; }
.get-card.vip-needed { border-color: var(--vip-line); }
.row-stat { display: grid; justify-items: end; min-width: 76px; color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.row-stat b { color: var(--text); font-size: 16px; font-weight: 700; }

/* Choose Mod Installation Location */
.folder-body .label { margin-top: 4px; }
.folder-path { display: flex; align-items: center; gap: 10px; padding: 11px 12px; border: 1px solid var(--border-2); border-radius: 10px; background: var(--bg-2); font: 500 13px/1.4 var(--mono); overflow-wrap: anywhere; }
.folder-path .icon { flex: none; color: var(--accent-hi); }
#folder-dialog { width: min(520px, calc(100% - 32px)); }

/* Downloads in the app, bottom left */
.downloads { position: fixed; left: 20px; bottom: 20px; z-index: 55; display: grid; gap: 10px; width: min(360px, calc(100% - 32px)); }
.downloads:empty { display: none; }
.download-item { display: grid; gap: 8px; padding: 12px 12px 12px 14px; border: 1px solid var(--border-2); border-radius: 12px; background: var(--surface-3); box-shadow: var(--shadow-lg); animation: toast-in 0.3s var(--ease); }
.download-head { display: flex; align-items: center; gap: 8px; }
.download-head b { flex: 1; min-width: 0; overflow: hidden; font-size: 14px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.download-head .icon { color: var(--accent-hi); }
.download-item.done .download-head .icon { color: var(--green); }
.download-item.failed { border-color: rgba(248, 113, 113, 0.5); }
.download-item.failed .download-head .icon { color: var(--red); }
.download-item .progress { width: 100%; margin: 0; }
.download-status { color: var(--muted); font-size: 12.5px; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.download-item .link-btn { justify-self: start; font-size: 13px; }
.get-vip { display: flex; align-items: center; justify-content: center; gap: 6px; color: var(--vip-text); font-size: 13px; font-weight: 500; }
.get-vip .icon { width: 15px; height: 15px; }
.vip-lock { display: grid; gap: 10px; padding: 20px; border: 1px solid var(--vip-line); border-radius: var(--radius); background: linear-gradient(180deg, rgba(226, 178, 60, 0.13), rgba(226, 178, 60, 0.04)); }
.vip-lock h3 { display: flex; align-items: center; gap: 8px; color: var(--vip-text); font-size: 15.5px; font-weight: 600; }
.vip-lock p { color: var(--text-2); font-size: 14px; }
.vip-lock .btn { margin-top: 4px; }
.side-title { padding: 18px 20px 4px; color: var(--muted); font: 600 12px/1 var(--font-cond); letter-spacing: 0.15em; text-transform: uppercase; }
.panel > .side-title { padding: 0 0 14px; }
.facts { margin: 0; padding: 4px 20px 8px; }
.facts > div { display: flex; justify-content: space-between; gap: 16px; padding: 11px 0; border-bottom: 1px solid var(--border); font-size: 14px; }
.facts > div:last-child { border-bottom: 0; }
.facts dt { flex: none; color: var(--muted); }
.facts dd { min-width: 0; margin: 0; color: var(--text); font-weight: 500; text-align: right; overflow-wrap: anywhere; }

/* ---------- forms ---------- */
input, select, textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border-2);
  border-radius: 9px;
  background: var(--bg-2);
  color: var(--text);
  font: inherit;
  font-size: 14.5px;
  transition: border-color 0.15s, box-shadow 0.15s;
}
input:hover, select:hover, textarea:hover { border-color: var(--border-3); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 26%, transparent); }
input::placeholder, textarea::placeholder { color: var(--faint); }
textarea { min-height: 150px; line-height: 1.55; resize: vertical; }
select {
  appearance: none;
  padding-right: 36px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238a93a5' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6.5 9.5 5.5 5.5 5.5-5.5'/%3E%3C/svg%3E");
  background-position: right 11px center;
  background-repeat: no-repeat;
  background-size: 16px;
  cursor: pointer;
}
select option { background: var(--surface-2); }
.form-card { overflow: hidden; }
.form-section { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 24px; padding: 28px; border-bottom: 1px solid var(--border); }
.form-section > header h2 { font-size: 15px; font-weight: 600; }
.form-section > header p { margin-top: 6px; color: var(--muted); font-size: 13.5px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 16px; }
.field { display: grid; align-content: start; gap: 7px; min-width: 0; }
.field.full { grid-column: 1 / -1; }
.label { color: var(--text-2); font-size: 13.5px; font-weight: 500; }
.hint { color: var(--faint); font-size: 12.5px; }
.form-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 12px 16px; padding: 18px 28px; background: rgba(255, 255, 255, 0.015); }
.form-foot .hint { margin-right: auto; }
.form-error { color: var(--red); font-size: 14px; font-weight: 500; }
.form-error:empty { display: none; }
.segmented { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; border: 1px solid var(--border-2); border-radius: 11px; background: var(--bg-2); justify-self: start; }
.segmented button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 32px;
  padding: 0 14px;
  border: 0;
  border-radius: 8px;
  background: none;
  color: var(--text-2);
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.15s, color 0.15s, box-shadow 0.15s;
}
.segmented button:hover { color: var(--text); }
.segmented button[aria-pressed='true'] { background: var(--surface-3); color: var(--text); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.35), inset 0 0 0 1px var(--border-2); }
.segmented .icon { width: 16px; height: 16px; }
.drop {
  display: grid;
  justify-items: center;
  gap: 6px;
  padding: 28px 20px;
  border: 1.5px dashed var(--border-3);
  border-radius: 12px;
  background: var(--bg-2);
  color: var(--muted);
  text-align: center;
  overflow-wrap: anywhere;
  cursor: pointer;
  transition: border-color 0.15s, background-color 0.15s;
}
.drop:hover, .drop.over { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 7%, var(--bg-2)); }
.drop.done { border-style: solid; border-color: rgba(52, 211, 153, 0.45); }
.drop > .icon { width: 26px; height: 26px; color: var(--accent-hi); }
.drop strong { color: var(--text); font-weight: 600; }
.progress { width: min(320px, 100%); height: 6px; margin-top: 6px; overflow: hidden; border-radius: 3px; background: rgba(255, 255, 255, 0.08); }
.progress i { display: block; width: 0; height: 100%; border-radius: 3px; background: var(--accent); transition: width 0.25s var(--ease); }

/* Pictures on the submit form */
.image-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(136px, 1fr)); gap: 10px; }
.image-tile, .image-add { position: relative; aspect-ratio: 16 / 10; overflow: hidden; border-radius: 10px; }
.image-tile { border: 1px solid var(--border-2); background: var(--surface-2); animation: pop-in 0.25s var(--ease); }
.image-tile img { display: block; width: 100%; height: 100%; object-fit: cover; transition: filter 0.2s; }
.image-tile.busy img { filter: brightness(0.5); }
.image-tile.error { border-color: rgba(248, 113, 113, 0.6); }
.image-tile.error img { filter: grayscale(1) brightness(0.45); }
.tile-cover { position: absolute; left: 6px; bottom: 6px; display: inline-flex; align-items: center; height: 20px; padding: 0 7px; border-radius: 6px; background: rgba(10, 12, 17, 0.78); color: #fff; font-size: 11px; font-weight: 600; }
.tile-state { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; font-size: 12px; font-weight: 600; text-align: center; }
.tile-actions { position: absolute; top: 6px; right: 6px; display: flex; gap: 4px; opacity: 0; transition: opacity 0.15s; }
.image-tile:hover .tile-actions, .image-tile:focus-within .tile-actions { opacity: 1; }
.tile-btn { display: grid; place-items: center; width: 26px; height: 26px; padding: 0; border: 0; border-radius: 7px; background: rgba(10, 12, 17, 0.8); color: #fff; cursor: pointer; }
.tile-btn:hover { background: rgba(10, 12, 17, 0.96); }
.tile-btn .icon { width: 14px; height: 14px; stroke-width: 2.2; }
.image-add {
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 4px;
  border: 1.5px dashed var(--border-3);
  background: var(--bg-2);
  color: var(--text-2);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 0.15s, background-color 0.15s, color 0.15s;
}
.image-add:hover, .image-tiles.over .image-add { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 7%, var(--bg-2)); color: var(--text); }
.image-add .icon { width: 20px; height: 20px; }
.image-add small { color: var(--faint); font-size: 11.5px; }
.spinner { width: 22px; height: 22px; border: 2.5px solid rgba(255, 255, 255, 0.22); border-top-color: #fff; border-radius: 50%; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- lists ---------- */
.list { overflow: hidden; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.list-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; padding: 14px 18px; border-bottom: 1px solid var(--border); }
.list-row:last-child { border-bottom: 0; }
.list-empty { padding: 22px 18px; color: var(--muted); font-size: 14px; }
.row-main { flex: 1 1 240px; min-width: 0; }
.row-title { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; font-size: 15px; font-weight: 600; overflow-wrap: anywhere; }
.row-title a { color: inherit; }
.meta { margin-top: 3px; color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
.row-thumb { display: grid; flex: none; place-items: center; width: 72px; aspect-ratio: 16 / 10; overflow: hidden; border-radius: 8px; background: var(--surface-2); color: var(--faint); }
.row-thumb img { width: 100%; height: 100%; object-fit: cover; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.actions .spacer { flex: 1; }
.online-flag { display: inline-flex; align-items: center; gap: 6px; color: #6ee7b7; font-size: 12px; font-weight: 500; }
.online-flag .live-dot { width: 7px; height: 7px; }
.stack { display: grid; gap: 14px; }
.review { display: grid; gap: 16px; padding: 22px; }
.review-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 12px; }
.review h3 { font-size: 18px; font-weight: 600; overflow-wrap: anywhere; }
.strip { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px; }
.strip button { flex: none; width: 128px; aspect-ratio: 16 / 10; overflow: hidden; padding: 0; border: 1px solid var(--border-2); border-radius: 8px; background: var(--surface-2); cursor: zoom-in; transition: border-color 0.15s; }
.strip button:hover { border-color: var(--border-3); }
.strip img { display: block; width: 100%; height: 100%; object-fit: cover; }
.desc-box { max-height: 10em; overflow: auto; color: var(--text-2); font-size: 14px; line-height: 1.6; white-space: pre-line; overflow-wrap: anywhere; }
.source-box { display: flex; align-items: center; gap: 10px; min-width: 0; padding: 10px 12px; border: 1px solid var(--border); border-radius: 9px; background: var(--bg-2); font: 500 13px/1.45 var(--mono); overflow-wrap: anywhere; }
.source-box .icon { color: var(--accent-hi); }
.source-box a { color: #cfe0ff; }
.filter { max-width: 360px; margin-bottom: 14px; }

.subtabs { display: flex; gap: 2px; margin-bottom: 22px; overflow-x: auto; border-bottom: 1px solid var(--border); scrollbar-width: none; }
.subtabs::-webkit-scrollbar { display: none; }
.subtab { position: relative; display: inline-flex; flex: none; align-items: center; gap: 8px; height: 44px; padding: 0 14px; border: 0; background: none; color: var(--text-2); font-size: 14px; font-weight: 500; white-space: nowrap; cursor: pointer; transition: color 0.15s; }
.subtab:hover { color: var(--text); }
.subtab[aria-selected='true'] { color: var(--text); }
.subtab[aria-selected='true']::after { content: ''; position: absolute; left: 10px; right: 10px; bottom: -1px; height: 2px; border-radius: 2px 2px 0 0; background: var(--accent); }
.subtab .n { min-width: 20px; height: 18px; padding: 0 6px; border-radius: 9px; background: rgba(255, 255, 255, 0.08); color: var(--text-2); font-size: 11.5px; line-height: 18px; text-align: center; font-variant-numeric: tabular-nums; }

/* ---------- customize ---------- */
.custom { display: grid; gap: 0; overflow: hidden; }
.custom-section { display: grid; gap: 18px; padding: 26px 28px; border-bottom: 1px solid var(--border); }
.custom-section h3 { font-size: 16px; font-weight: 600; }
.custom-section > div > p { margin-top: 6px; }
.custom-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 28px; }
.scene-picker { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 14px; }
.scene-card { display: grid; gap: 8px; padding: 0; border: 0; background: none; color: var(--text-2); text-align: left; cursor: pointer; }
.scene-thumb { display: grid; place-items: center; aspect-ratio: 16 / 9; overflow: hidden; border: 2px solid var(--border-2); border-radius: 10px; background: var(--surface-2); transition: border-color 0.15s, transform 0.2s var(--ease); }
.scene-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.scene-thumb .icon { width: 24px; height: 24px; }
.scene-card:hover .scene-thumb { border-color: var(--border-3); transform: translateY(-2px); }
.scene-card.upload .scene-thumb { border-style: dashed; color: var(--muted); }
.scene-card.selected { color: var(--text); }
.scene-card.selected .scene-thumb { border-color: var(--accent); }
.scene-label { display: flex; align-items: center; gap: 6px; font-size: 13.5px; font-weight: 500; }
.scene-label .icon { width: 15px; height: 15px; color: var(--accent-hi); stroke-width: 2.4; }
.scene-slot { position: relative; display: grid; }
.scene-delete { position: absolute; top: 7px; right: 7px; display: grid; place-items: center; width: 28px; height: 28px; padding: 0; border: 0; border-radius: 8px; background: rgba(10, 12, 17, 0.8); color: #fff; opacity: 0; cursor: pointer; transition: opacity 0.15s, background-color 0.15s; }
.scene-slot:hover .scene-delete, .scene-delete:focus-visible { opacity: 1; }
.scene-delete:hover { background: #b91c1c; }
.scene-delete .icon { width: 15px; height: 15px; }
.swatches { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; }
.swatch { width: 30px; height: 30px; padding: 0; border: 2px solid rgba(255, 255, 255, 0.2); border-radius: 50%; cursor: pointer; transition: transform 0.15s; }
.swatch:hover { transform: scale(1.08); }
.swatch[aria-pressed='true'] { outline: 2px solid #fff; outline-offset: 2px; }
.swatches input[type='color'] { width: 44px; height: 32px; padding: 2px 3px; cursor: pointer; }
.range { display: flex; align-items: center; gap: 14px; }
.range input { padding: 0; border: 0; background: none; accent-color: var(--accent); box-shadow: none; }
.range output { min-width: 44px; font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; }
.toggle-row { display: flex; align-items: flex-start; gap: 14px; cursor: pointer; }
.toggle-row b { display: block; margin-bottom: 2px; font-weight: 600; }
.toggle { position: relative; flex: none; width: 42px; height: 24px; margin: 0; padding: 0; border: 1px solid var(--border-3); border-radius: 12px; background: var(--surface-3); appearance: none; cursor: pointer; transition: background-color 0.2s, border-color 0.2s; }
.toggle::after { content: ''; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%; background: #c7ccd6; transition: transform 0.2s var(--ease), background-color 0.2s; }
.toggle:checked { border-color: transparent; background: var(--accent); }
.toggle:checked::after { background: #fff; transform: translateX(18px); }
.toggle:focus { box-shadow: none; }
.custom-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; padding: 18px 28px; }
.custom-foot .hint { margin-left: auto; }

/* ---------- Discord setup ---------- */
.setup { display: grid; gap: 16px; }
.setup-status { display: grid; gap: 10px; padding: 18px 22px; }
.status-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; font-size: 14px; }
.status-row b { font-weight: 600; }
.status-row span:last-child { color: var(--muted); }
.status-dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--faint); }
.status-dot.ok { background: var(--green); }
.status-dot.bad { background: var(--red); }
.step { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 16px; padding: 24px; }
.step-n { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--accent-hi); font-size: 14px; font-weight: 700; }
.step-body { display: grid; gap: 14px; min-width: 0; }
.step h2 { font-size: 16px; font-weight: 600; }
.step p, .step li { color: var(--text-2); font-size: 14px; }
.step ol { display: grid; gap: 5px; margin: 0; padding-left: 18px; }
.step b { color: var(--text); font-weight: 600; }
.uri-list { display: grid; gap: 6px; }
.uri { display: flex; align-items: center; gap: 8px; padding: 5px 5px 5px 12px; border: 1px solid var(--border-2); border-radius: 9px; background: var(--bg-2); font: 500 12.5px/1.4 var(--mono); }
.uri span { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.checks { display: grid; gap: 8px; }
.check { display: flex; align-items: flex-start; gap: 10px; padding: 11px 13px; border-radius: 10px; background: rgba(52, 211, 153, 0.08); color: #a7f3d0; font-size: 14px; }
.check .icon { margin-top: 1px; }
.check b { font-weight: 600; }
.check.bad { background: rgba(248, 113, 113, 0.09); color: #fecaca; }
.check > span { flex: 1; min-width: 0; }
.check .uri-list { margin-top: 10px; }
.check .uri { color: var(--text); }
.log-note { margin-bottom: 14px; }
.warn-text { display: flex; align-items: center; gap: 4px; color: #fcd34d; }
.warn-text .icon { width: 14px; height: 14px; }
.add-mod .icon { width: 17px; height: 17px; }
.check.warn { background: rgba(251, 191, 36, 0.09); color: #fde68a; }

/* ---------- dialogs ---------- */
dialog {
  width: min(460px, calc(100% - 32px));
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  padding: 0;
  border: 1px solid var(--border-2);
  border-radius: 16px;
  background: var(--surface-2);
  color: var(--text);
  box-shadow: var(--shadow-lg);
}
dialog[open] { animation: dialog-in 0.22s var(--ease); }
dialog::backdrop { background: rgba(4, 6, 10, 0.72); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
dialog[open]::backdrop { animation: fade-in 0.22s ease; }
@keyframes dialog-in { from { opacity: 0; transform: translateY(8px) scale(0.98); } }
@keyframes fade-in { from { opacity: 0; } }
.dialog-body { position: relative; display: grid; gap: 14px; padding: 26px; }
.dialog-body h2 { padding-right: 36px; font-size: 19px; font-weight: 600; }
.dialog-close { position: absolute; top: 14px; right: 14px; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 8px; }
#bg-dialog { width: min(760px, calc(100% - 32px)); }
#bg-dialog .scene-picker { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }

.lightbox { inset: 0; width: 100%; max-width: none; height: 100%; max-height: none; margin: 0; overflow: hidden; border: 0; border-radius: 0; background: rgba(5, 6, 9, 0.95); box-shadow: none; }
.lightbox[open] { animation: fade-in 0.2s ease; }
.lightbox::backdrop { background: transparent; }
.lightbox-bar { position: absolute; top: 0; left: 0; right: 0; display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 60px; padding: 0 12px 0 22px; color: var(--text-2); font-size: 14px; }
.lightbox-bar b { overflow: hidden; color: var(--text); font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.lightbox-stage { position: absolute; inset: 60px 72px 28px; display: grid; place-items: center; touch-action: pan-y; }
.lightbox-img { max-width: 100%; max-height: 100%; border-radius: 6px; object-fit: contain; opacity: 0; transition: opacity 0.25s; }
.lightbox-img.loaded { opacity: 1; }
.lightbox .stage-btn { opacity: 1; }
.lightbox .stage-btn.prev { left: 16px; }
.lightbox .stage-btn.next { right: 16px; }

/* ---------- toasts ---------- */
.toasts { position: fixed; right: 20px; bottom: 20px; z-index: 60; display: grid; justify-items: end; gap: 10px; width: min(390px, calc(100% - 32px)); pointer-events: none; }
.toast { display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; border: 1px solid var(--border-2); border-radius: 12px; background: var(--surface-3); box-shadow: var(--shadow-lg); font-size: 14px; pointer-events: auto; animation: toast-in 0.3s var(--ease); }
.toast .icon { margin-top: 1px; }
.toast.ok .icon { color: var(--green); }
.toast.info .icon { color: var(--accent-hi); }
.toast.error .icon { color: var(--red); }
.toast.out { opacity: 0; transform: translateY(6px); transition: opacity 0.2s, transform 0.2s; }
@keyframes toast-in { from { opacity: 0; transform: translateY(10px) scale(0.98); } }

/* ---------- error page ---------- */
.picker-title { margin: 10px 0 0; }
body.plain { display: grid; place-items: center; padding: 24px; }
.error-page { display: grid; justify-items: center; gap: 22px; width: min(460px, 100%); }
.error-page .panel { display: grid; justify-items: start; gap: 12px; width: 100%; padding: 26px; }
.error-page h1 { font-size: 22px; }

/* ---------- smaller screens ---------- */
@media (max-width: 1100px) {
  .mod-layout { grid-template-columns: minmax(0, 1fr) 300px; }
}
@media (max-width: 960px) {
  .catalog { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .filters { position: static; display: flex; gap: 8px; margin: 0 -24px 14px; padding: 2px 24px 6px; overflow-x: auto; scrollbar-width: none; }
  .filters::-webkit-scrollbar { display: none; }
  .filter-group, .filter-list { display: contents; }
  .filter-group h3 { display: none; }
  .filter-sep { display: block; flex: none; width: 1px; margin: 6px 2px; background: var(--border-2); }
  .filter-item { flex: none; width: auto; height: 34px; padding: 0 12px; border: 1px solid var(--border-2); border-radius: 999px; }
  .filter-item[aria-pressed='true'] { border-color: color-mix(in srgb, var(--accent) 50%, transparent); }
  .filter-count { margin-left: 2px; }
  /* One column: pictures, then how to get it, then the description and details. */
  .mod-layout { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .mod-main, .mod-side { display: contents; }
  .gallery { order: 1; }
  .get-card, .vip-lock { order: 2; }
  .about-card { order: 3; }
  .facts-card { order: 4; }
  .staff-card { order: 5; }
  .form-section { grid-template-columns: minmax(0, 1fr); gap: 16px; }
}
@media (max-width: 760px) {
  :root { --page: calc(100% - 32px); }
  .page.narrow { width: calc(100% - 32px); }
  .topbar-inner { flex-wrap: wrap; gap: 0 12px; height: auto; padding-top: 10px; }
  .brand-logo { height: 30px; }
  .nav { order: 3; width: calc(100% + 8px); height: 44px; margin: 4px -4px 0; overflow-x: auto; scrollbar-width: none; }
  .nav::-webkit-scrollbar { display: none; }
  .online-label { display: none; }
  .label-long { display: none; }
  .label-short { display: inline; }
  .top-actions .add-mod { width: 38px; padding: 0; }
  .top-actions .add-label { display: none; }
  .online { padding: 0 10px; }
  .account-name { max-width: 104px; }
  body[data-view='mods'] .backdrop { height: 560px; }
  .hero { padding: 52px 0 44px; }
  .hero-lead { font-size: 16px; }
  .hero-stats { gap: 12px 30px; margin-top: 36px; }
  .hero-stats dd { font-size: 22px; }
  .filters { margin: 0 -16px 14px; padding: 2px 16px 6px; }
  .grid { gap: 14px; }
  .form-grid { grid-template-columns: minmax(0, 1fr); }
  .form-section { padding: 20px; }
  .form-foot { padding: 16px 20px; }
  .custom-section { padding: 20px; }
  .custom-row { grid-template-columns: minmax(0, 1fr); }
  .custom-foot { padding: 16px 20px; }
  .custom-foot .hint { margin-left: 0; }
  .review { padding: 18px; }
  .actions .spacer { display: none; }
  .step { grid-template-columns: minmax(0, 1fr); gap: 12px; padding: 20px; }
  .lightbox-stage { inset: 60px 8px 20px; }
  .lightbox .stage-btn { display: none; }
  .toasts { left: 16px; right: 16px; bottom: 16px; width: auto; justify-items: stretch; }
  .downloads { left: 16px; right: 16px; bottom: 84px; width: auto; }
}
@media (max-width: 420px) {
  .account-name { max-width: 78px; }
  .catalog-bar { flex-wrap: wrap; }
  .sort, .sort select { width: 100%; }
}
@media (hover: none) {
  .stage-btn, .tile-actions, .scene-delete, .card-delete { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* VIP list: the first letter of the name instead of a profile picture. */
.avatar-initial { display: grid; place-items: center; flex: none; width: 38px; height: 38px; border-radius: 50%; background: color-mix(in srgb, var(--vip) 22%, var(--surface-3)); color: var(--vip); font-weight: 700; font-size: 16px; }
/* Pinned mods (owner and co-owners pin them to the top). */
.cover-tag.pinned { background: var(--accent); color: var(--on-accent, #fff); }
.pill.pinned { border-color: color-mix(in srgb, var(--accent) 55%, transparent); background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--accent-hi); font-weight: 600; }
.badge-pinned { background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--accent-hi); }
/* ---------- chat ---------- */
.chat-rooms { margin-bottom: 14px; }
.chat-box { display: grid; grid-template-rows: minmax(0, 1fr) auto; height: min(70vh, 760px); padding: 0; overflow: hidden; }
.chat-list { display: grid; align-content: start; gap: 4px; padding: 16px 18px; overflow-y: auto; }
.chat-msg { display: flex; gap: 12px; padding: 8px 6px; border-radius: 10px; }
.chat-msg:hover { background: rgba(255, 255, 255, 0.03); }
.chat-msg .avatar-initial { width: 34px; height: 34px; font-size: 14px; background: color-mix(in srgb, var(--accent) 22%, var(--surface-3)); color: var(--accent-hi); }
.chat-msg.mine .avatar-initial { background: color-mix(in srgb, var(--vip) 22%, var(--surface-3)); color: var(--vip); }
.chat-body { flex: 1; min-width: 0; }
.chat-head { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.chat-head time { color: var(--muted); font-size: 12px; }
.chat-tools { margin-left: auto; display: flex; gap: 2px; }
.chat-delete { display: grid; place-items: center; width: 26px; height: 26px; border: 0; border-radius: 6px; background: none; color: var(--muted); cursor: pointer; opacity: 0; }
.chat-msg:hover .chat-delete, .chat-delete:focus-visible { opacity: 1; }
.chat-delete:hover { color: var(--red); background: rgba(248, 113, 113, 0.1); }
.chat-delete .icon { width: 14px; height: 14px; }
.chat-text { margin-top: 2px; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 15px; line-height: 1.45; }
.chat-picture { display: block; margin-top: 6px; padding: 0; border: 1px solid var(--border-2); border-radius: 10px; overflow: hidden; background: var(--bg-2); cursor: zoom-in; }
.chat-picture img { display: block; max-width: min(360px, 100%); max-height: 260px; object-fit: cover; }
.chat-composer { position: relative; display: grid; gap: 8px; padding: 12px 14px; border-top: 1px solid var(--border); background: var(--surface-2, rgba(255, 255, 255, 0.02)); }
.chat-row { display: flex; align-items: flex-end; gap: 8px; }
.chat-input { flex: 1; min-height: 42px; max-height: 140px; padding: 10px 12px; border: 1px solid var(--border-2); border-radius: 10px; background: var(--bg-2); color: var(--text); font: inherit; resize: vertical; }
.chat-input:focus { outline: none; border-color: var(--accent); }
.emoji-picker { position: absolute; bottom: calc(100% - 4px); left: 14px; display: grid; grid-template-columns: repeat(8, 36px); gap: 2px; padding: 8px; border: 1px solid var(--border-2); border-radius: 12px; background: var(--surface-3); box-shadow: var(--shadow-lg); z-index: 5; }
.emoji-picker[hidden] { display: none; }
.emoji-picker button { width: 36px; height: 36px; border: 0; border-radius: 8px; background: none; font-size: 20px; cursor: pointer; }
.emoji-picker button:hover { background: rgba(255, 255, 255, 0.08); }
.chat-attach { position: relative; justify-self: start; }
.chat-attach[hidden] { display: none; }
.chat-attach img { display: block; max-height: 120px; border-radius: 8px; border: 1px solid var(--border-2); }
.chat-attach .tile-btn { position: absolute; top: 6px; right: 6px; }
@media (max-width: 640px) {
  .chat-box { height: calc(100vh - 230px); }
  .emoji-picker { grid-template-columns: repeat(6, 36px); }
}.timeout-choices { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-top: 12px; }
.chat-input:disabled { opacity: 0.7; cursor: not-allowed; }
.chat-edited { color: var(--muted); font-size: 12px; }
.chat-editor { display: grid; gap: 6px; margin-top: 4px; }
.chat-edit-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.chat-edit-actions .hint { margin-right: auto; }
.chat-tools { flex-wrap: wrap; gap: 6px; }
.chat-tool { display: inline-flex; align-items: center; gap: 5px; height: 30px; padding: 0 10px; border: 1px solid var(--border-2); border-radius: 8px; background: none; color: var(--text-2); font: 600 13px/1 inherit; cursor: pointer; }
.chat-tool:hover { color: var(--text); border-color: var(--accent); }
.chat-tool .icon { width: 14px; height: 14px; }
/* ---------- profile pictures (people only, never next to mods) ---------- */
.avatar { display: block; flex: none; width: 38px; height: 38px; border-radius: 50%; object-fit: cover; background: var(--surface-3); box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08); }
span.avatar { display: grid; place-items: center; }
.avatar.sm { width: 24px; height: 24px; font-size: 11px; }
.avatar.lg { width: 44px; height: 44px; font-size: 18px; }
.avatar.xl { width: 128px; height: 128px; font-size: 48px; }
.list-row > .avatar { align-self: center; }
.account-btn { gap: 8px; }
.menu-head-avatar { display: flex; align-items: center; gap: 12px; }
.menu-head-avatar > div { display: grid; }
.avatar-dialog { text-align: center; }
.avatar-dialog .actions { justify-content: center; }
.avatar-preview { display: grid; place-items: center; margin: 8px 0 10px; }
.chat-msg .avatar { width: 36px; height: 36px; }
/* ---------- chat replies ---------- */
.chat-reply-ref { display: flex; align-items: center; gap: 6px; max-width: 100%; margin: 0 0 4px; padding: 3px 8px; border: 0; border-left: 2px solid var(--accent); border-radius: 0 6px 6px 0; background: rgba(255, 255, 255, 0.04); color: var(--muted); font: 13px/1.3 inherit; text-align: left; cursor: pointer; }
.chat-reply-ref span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-reply-ref b { color: var(--text-2); }
.chat-reply-ref .icon { width: 13px; height: 13px; flex: none; transform: scaleX(-1) rotate(-30deg); }
.chat-replying { display: flex; align-items: center; gap: 8px; padding: 6px 10px; border-left: 2px solid var(--accent); border-radius: 0 8px 8px 0; background: rgba(255, 255, 255, 0.04); font-size: 13px; }
.chat-replying[hidden] { display: none; }
.chat-replying > span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-replying .tile-btn { position: static; }
.chat-msg.flash { background: color-mix(in srgb, var(--accent) 18%, transparent); transition: background 0.4s; }/* ---------- chat: simple layout (room tabs on top, messages, message bar) ---------- */
.chat-page { padding-top: 24px; }
.chat-box { height: calc(100vh - 150px); min-height: 420px; border-radius: 16px; }
.chat-box { grid-template-rows: auto minmax(0, 1fr) auto; }
.chat-top { display: flex; align-items: center; gap: 14px; padding: 10px 14px; border-bottom: 1px solid var(--border); }
.chat-rooms { display: flex; gap: 4px; margin: 0; padding: 3px; border-radius: 10px; background: rgba(255, 255, 255, 0.04); }
.chat-room { display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 14px; border: 0; border-radius: 8px; background: none; color: var(--muted); font: 600 14px/1 inherit; cursor: pointer; }
.chat-room .icon { width: 15px; height: 15px; }
.chat-room:hover { color: var(--text); }
.chat-room[aria-pressed='true'] { background: var(--surface-3); color: var(--text); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3); }
.chat-about { color: var(--muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-list { gap: 0; padding: 12px 8px 16px; }
.chat-msg { position: relative; gap: 12px; padding: 6px 12px; margin-top: 10px; border-radius: 8px; }
.chat-msg.grouped { margin-top: 0; padding-top: 2px; padding-bottom: 2px; }
.chat-msg:hover { background: rgba(255, 255, 255, 0.035); }
.chat-msg.mine .avatar-initial { color: var(--accent-hi); }
.chat-gutter { flex: none; width: 36px; padding-top: 3px; color: transparent; font-size: 10px; text-align: center; }
.chat-msg.grouped:hover .chat-gutter { color: var(--muted); }
.chat-head { gap: 10px; }
.chat-head b { font-size: 15px; }
.chat-text { margin-top: 1px; }
/* The message buttons float at the top right when you point at a message. */
.chat-msg .chat-tools { position: absolute; top: -14px; right: 12px; display: none; gap: 2px; margin: 0; padding: 3px; border: 1px solid var(--border-2); border-radius: 10px; background: var(--surface-3); box-shadow: var(--shadow-lg); z-index: 2; }
.chat-msg:hover .chat-tools, .chat-msg:focus-within .chat-tools { display: flex; }
.chat-tool { height: 30px; padding: 0 10px; border: 0; border-radius: 7px; }
.chat-tool:hover { background: rgba(255, 255, 255, 0.08); border-color: transparent; }
.chat-tool.danger { color: var(--red); }
.chat-tool.danger:hover { background: rgba(248, 113, 113, 0.14); }
@media (hover: none) {
  .chat-msg .chat-tools { position: static; display: flex; flex-wrap: wrap; margin-top: 6px; border: 0; padding: 0; background: none; box-shadow: none; }
  .chat-gutter { color: var(--muted); }
}
.chat-picture img { max-width: min(460px, 100%); max-height: 340px; }
/* The message bar: one rounded field with the emoji and picture buttons inside. */
.chat-composer { padding: 10px 14px 14px; border-top: 0; background: none; }
.chat-row { align-items: center; gap: 4px; padding: 4px 4px 4px 6px; border: 1px solid var(--border-2); border-radius: 14px; background: var(--bg-2); }
.chat-row:focus-within { border-color: var(--accent); }
.chat-row .chat-input { min-height: 38px; padding: 9px 6px; border: 0; background: none; resize: none; }
.chat-row .chat-input:focus { border: 0; }
.chat-row .btn-primary { height: 36px; border-radius: 10px; }
@media (max-width: 640px) {
  .chat-page { padding-top: 12px; }
  .chat-box { height: calc(100vh - 120px); }
  .chat-about { display: none; }
}@media (hover: none) {
  .chat-msg .chat-tools { gap: 4px; margin-top: 4px; }
  .chat-msg .chat-tool { height: 26px; padding: 0 8px; font-size: 12px; color: var(--muted); }
  .chat-msg .chat-tool .icon { width: 12px; height: 12px; }
}
.vip-log-title { margin: 28px 0 10px; }
