/* Nomad Drive Mods — styled like Nomad Mod Downloader: the game's art behind everything with a dark
   left-to-right shade, a sidebar with the logo, big menu and a status card, and every page in one
   rounded see-through navy panel with its title and a line under it. Colors are the app's Theme. */
:root {
  --bg: #161924; --panel: #1e2230; --field: #232734; --row: #262b3a; --card: #2c3241;
  --line: #3c4154; --edge: #545c73; --text: #fff9df; --muted: #b9b4a3;
  --accent: #fac16e; --accent-hi: #ffd08a; --accent-dark: #f2b240; --ink: #1e2230;
  --good: #34b524; --warn: #f2b240; --bad: #f06a5a;
  --glass: rgba(30, 34, 48, .925);
  --font: 'Noto Sans', 'Segoe UI', system-ui, sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; color: var(--text); font: 15px/1.5 var(--font); min-height: 100vh;
  background-color: var(--bg);
  background-image:
    linear-gradient(90deg, rgba(18,20,30,.94) 0%, rgba(18,20,30,.63) 30%, rgba(18,20,30,.37) 65%, rgba(18,20,30,.59) 100%),
    url(img/hero.webp);
  background-size: cover; background-position: center; background-attachment: fixed;
}
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hi); text-decoration: underline; }
img { max-width: 100%; display: block; }
h1, h2, h3 { font-weight: 700; line-height: 1.2; margin: 0 0 .4em; }
h1 { font-size: 2rem; }
h2 { font-size: 1.3rem; }
h3 { font-size: 1.08rem; }
code { background: var(--field); border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; font: .86em Consolas, 'Cascadia Mono', monospace; word-break: break-all; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.inline { display: inline; margin: 0; }
.right { float: right; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.glass { background: var(--glass); border-radius: 16px; }

/* ---------- shell: sidebar + page ---------- */
.shell { display: flex; min-height: 100vh; }
.side { position: sticky; top: 0; align-self: flex-start; height: 100vh; width: 320px; flex-shrink: 0; padding: 18px 16px 16px 28px; display: flex; flex-direction: column; overflow-y: auto; }
.side-top { text-align: center; }
.logo { display: block; }
.logo img { width: 100%; max-width: 250px; height: auto; margin: 0 auto; filter: drop-shadow(0 4px 14px rgba(0,0,0,.6)); }
.logo-sub { color: var(--muted); font-weight: 700; letter-spacing: .02em; margin: 2px 0 10px; }
.menu-btn { display: none; }
.side-menu { display: flex; flex-direction: column; flex: 1; }
.side-search { margin: 4px 0 10px; }
.nav { display: flex; flex-direction: column; align-items: flex-start; }
.nav a { color: var(--text); font-size: 1.68rem; font-weight: 700; line-height: 1.25; padding: 2px 0 5px; text-shadow: 0 2px 10px rgba(0,0,0,.55); }
.nav a:hover { color: var(--accent); text-decoration: none; }
.nav a.on { color: var(--accent); }
.count { font-style: normal; font-size: .8rem; vertical-align: middle; background: var(--bad); color: #fff; border-radius: 10px; padding: 1px 8px; }
.status-card { margin-top: auto; padding: 14px 16px; font-size: .85rem; }
.status-card dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; margin: 0 0 12px; }
.status-card dt { color: var(--muted); }
.status-card dd { margin: 0; overflow-wrap: anywhere; }
.status-btns { display: flex; flex-wrap: wrap; gap: 8px; }

.main { flex: 1; min-width: 0; padding: 22px 22px 8px 4px; display: flex; flex-direction: column; }
.page { flex: 1; padding: 20px 26px 26px; }
.page.narrow > *:not(.page-head) { max-width: 860px; }
.page.tiny > *:not(.page-head) { max-width: 460px; }
.page-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 16px; }
.page-head h1 { font-size: 2.05rem; margin: 0; overflow-wrap: anywhere; }
.page-head p { color: var(--muted); font-size: .88rem; margin: 2px 0 0 2px; }
.page-tools { display: flex; gap: 8px; flex-wrap: wrap; }
.status-line { display: flex; justify-content: space-between; gap: 16px; padding: 7px 4px 0; color: var(--muted); font-size: .8rem; }
.status-line a { white-space: nowrap; }

/* ---------- buttons and inputs: amber primary, slate secondary ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; background: var(--accent); color: var(--ink); border: 0; border-radius: 11px; padding: 9px 18px; font: 700 .93rem var(--font); cursor: pointer; text-decoration: none; white-space: nowrap; transition: background .12s; }
.btn:hover { background: var(--accent-hi); color: var(--ink); text-decoration: none; }
.btn:active { background: var(--accent-dark); }
.btn:disabled { background: rgba(60, 65, 84, .6); color: rgba(185, 180, 163, .6); cursor: default; }
.btn.ghost { background: var(--line); color: var(--text); }
.btn.ghost:hover { background: var(--edge); }
.btn.ghost.on { background: rgba(250, 193, 110, .16); color: var(--accent); box-shadow: inset 0 0 0 1.5px var(--accent); }
.btn.small { padding: 7px 14px; font-size: .85rem; border-radius: 9px; }
.btn.big { padding: 12px 22px; font-size: 1rem; }
.btn.big span { font-weight: 500; opacity: .75; font-size: .88rem; }
.btn.danger { color: var(--bad); }
.btn.danger:hover { background: rgba(240, 106, 90, .18); }
.link { background: none; border: 0; color: var(--accent); cursor: pointer; font: inherit; padding: 0; }
input, select, textarea { width: 100%; background: var(--field); color: var(--text); border: 1px solid var(--line); border-radius: 9px; padding: 9px 12px; font: inherit; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); }
input::placeholder, textarea::placeholder { color: #8d8a7e; }
input[type=file] { padding: 7px; cursor: pointer; }
input[type=file]::file-selector-button { background: var(--line); color: var(--text); border: 0; border-radius: 8px; padding: 6px 12px; margin-right: 10px; font-weight: 700; cursor: pointer; }
input[type=checkbox] { width: auto; accent-color: var(--accent); }
textarea { resize: vertical; }

/* ---------- cards inside a page: a thin edge, like the cards inside the app's pages ---------- */
.panel { border: 1px solid var(--line); border-radius: 14px; padding: 18px 20px; margin-bottom: 16px; background: rgba(22, 25, 36, .35); }
.panel h2 { margin-bottom: 12px; }
.page > form.form.panel, .page > .panel.rich { border: 0; padding: 0; background: none; }
.empty { text-align: center; padding: 48px 16px; }
.empty .btn { margin-top: 8px; }
.flash { border-radius: 11px; padding: 10px 14px; margin: 0 0 14px; border: 1px solid; font-weight: 500; background: var(--glass); }
.main > .flash { margin-bottom: 12px; }
.flash.good { border-color: rgba(52, 181, 36, .6); }
.flash.good::before { content: '● '; color: var(--good); }
.flash.warn { border-color: rgba(242, 178, 64, .6); }
.flash.bad { border-color: rgba(240, 106, 90, .65); color: #ffd9d3; }
.tag { display: inline-block; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; padding: 2px 8px; border-radius: 6px; background: var(--line); color: var(--text); vertical-align: middle; }
.tag.good { background: rgba(52, 181, 36, .2); color: #5fd04f; }
.tag.warn { background: rgba(242, 178, 64, .2); color: var(--warn); }
.tag.bad { background: rgba(240, 106, 90, .2); color: var(--bad); }

/* ---------- browse: find box, sort pills, category chips ---------- */
.toolbar { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 10px; }
.find { flex: 1; min-width: 220px; max-width: 380px; margin-bottom: 12px; }
.toolbar .find { margin: 0; }
.pills { display: flex; gap: 6px; flex-wrap: wrap; }
.pill { padding: 6px 14px; border-radius: 999px; background: var(--line); color: var(--text); font-weight: 700; font-size: .85rem; }
.pill:hover { background: var(--edge); color: var(--text); text-decoration: none; }
.pill.on { background: var(--accent); color: var(--ink); }
.tabs { margin-bottom: 14px; }
.chips-row { display: flex; gap: 6px; flex-wrap: wrap; margin: 4px 0 16px; }
.chip { padding: 5px 12px; border-radius: 8px; background: var(--row); color: var(--text); font-size: .84rem; font-weight: 500; border: 1px solid transparent; }
.chip i { font-style: normal; color: var(--muted); margin-left: 3px; }
.chip:hover { background: var(--card); color: var(--text); text-decoration: none; }
.chip.on { background: rgba(250, 193, 110, .14); border-color: var(--accent); color: var(--accent); }
.crumbs { margin: 0 0 12px; color: var(--muted); font-size: .88rem; }
.pager { display: flex; justify-content: center; align-items: center; gap: 14px; margin: 22px 0 4px; color: var(--muted); }

/* ---------- mod cards: the downloader's Browse grid ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 400px), 1fr)); gap: 12px; }
.card { position: relative; display: flex; gap: 16px; background: var(--row); border-radius: 12px; padding: 10px; min-height: 180px; border: 1.5px solid transparent; transition: background .12s, border-color .12s; }
.card:hover { background: var(--card); }
.card:focus-within { border-color: var(--accent); background: var(--line); }
.card-img { position: relative; flex: 0 0 38%; max-width: 190px; border-radius: 9px; overflow: hidden; background: var(--field); }
.card-img img { width: 100%; height: 100%; object-fit: cover; }
.card-img .tag { position: absolute; top: 6px; left: 6px; }
.card-body { flex: 1; min-width: 0; display: flex; flex-direction: column; padding: 0 2px 0 0; }
.card h3 { font-size: 1.22rem; margin: 0 0 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-link { color: var(--text); }
.card-link:hover { color: var(--text); text-decoration: none; }
.card-link::after { content: ''; position: absolute; inset: 0; border-radius: 12px; } /* the whole card opens the mod */
.card .meta { color: var(--muted); font-size: .8rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card p { color: var(--muted); font-size: .84rem; margin: 8px 0; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; flex: 1; }
.card-foot { display: flex; align-items: center; gap: 10px; }
.card-foot .btn { position: relative; z-index: 1; }
.card-foot .btn.ghost { margin-left: auto; }
.stats { display: flex; gap: 12px; font-size: .8rem; color: var(--muted); }
.cat { color: var(--accent); font-weight: 700; }

/* ---------- mod page: the downloader's Details panel ---------- */
.mod-top { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 24px; padding: 14px; }
.mod-img { border-radius: 10px; overflow: hidden; background: var(--field); aspect-ratio: 16 / 9; }
.mod-img img { width: 100%; height: 100%; object-fit: cover; }
.mod-info { padding: 4px 4px 4px 0; display: flex; flex-direction: column; }
.mod-info h1 { margin: 2px 0; overflow-wrap: anywhere; }
.by { color: var(--muted); margin: 0 0 10px; }
.summary { margin: 0 0 14px; }
.facts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 0 0 16px; }
.facts div { background: var(--row); border-radius: 9px; padding: 8px 11px; }
.facts dt { color: var(--muted); font-size: .76rem; }
.facts dd { margin: 0; font-weight: 700; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: auto; }
.actions form.inline { display: contents; }
.mod-cols { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 16px; }
.rich { overflow-wrap: anywhere; }
.rich p { margin: 0 0 .8em; }
.rich h3 { margin: 1.1em 0 .4em; color: var(--accent); }
.rich h3:first-child { margin-top: 0; }
.rich ul, .rich ol { padding-left: 1.3em; margin: 0 0 .8em; }
.rich li { margin-bottom: .3em; }
.rich > :last-child { margin-bottom: 0; }
.file { border-radius: 10px; padding: 12px 14px; margin-bottom: 8px; background: var(--row); border: 1.5px solid transparent; }
.file.latest { border-color: rgba(250, 193, 110, .5); }
.file-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.file-btns { display: flex; gap: 6px; flex-shrink: 0; }
.changelog { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); font-size: .9rem; }
.hash { margin-top: 8px; font-size: .8rem; color: var(--muted); }
.hash summary { cursor: pointer; }
.comment { border-bottom: 1px solid var(--line); padding: 12px 0; }
.comment-head { margin-bottom: 4px; }
.comment-form { margin-top: 14px; }
.steps { padding-left: 1.2em; margin: 0 0 10px; }
.steps li { margin-bottom: 6px; }
.mini { display: flex; gap: 10px; align-items: center; color: var(--text); padding: 6px; border-radius: 10px; margin: 0 -6px; }
.mini:hover { background: var(--row); text-decoration: none; color: var(--text); }
.mini img { width: 84px; height: 48px; object-fit: cover; border-radius: 7px; flex-shrink: 0; }
.mini span { display: flex; flex-direction: column; min-width: 0; }
.mini b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini small { color: var(--muted); }
details summary { cursor: pointer; font-weight: 700; }
details[open] summary { margin-bottom: 10px; }

/* ---------- forms ---------- */
.form { display: flex; flex-direction: column; gap: 14px; }
.form label { display: flex; flex-direction: column; gap: 6px; font-weight: 700; font-size: .92rem; }
.form label small { font-weight: 400; color: var(--muted); }
.form label.check { flex-direction: row; align-items: flex-start; gap: 10px; font-weight: 400; }
.form label.check input { margin-top: 4px; }
.form .btn { align-self: flex-start; }
fieldset { border: 0; padding: 0; margin: 0 0 6px; display: flex; flex-direction: column; gap: 14px; }
legend { font-weight: 700; font-size: 1.15rem; color: var(--accent); margin-bottom: 12px; padding: 0; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.img-preview { border-radius: 10px; overflow: hidden; max-width: 380px; aspect-ratio: 16 / 9; background: var(--field); border: 1px solid var(--line); }
.img-preview img { width: 100%; height: 100%; object-fit: cover; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.progress { position: relative; height: 32px; background: var(--field); border-radius: 9px; overflow: hidden; border: 1px solid var(--line); }
.progress div { position: absolute; inset: 0 auto 0 0; width: 0; background: var(--accent); transition: width .2s; }
.progress span { position: relative; display: grid; place-items: center; height: 100%; font-weight: 700; font-size: .86rem; mix-blend-mode: difference; }
.danger-zone { display: flex; justify-content: space-between; align-items: center; gap: 14px; border-color: rgba(240, 106, 90, .4); margin-top: 18px; }
.danger-zone h2 { margin: 0 0 4px; font-size: 1.1rem; }
.danger-zone p { margin: 0; }

/* ---------- lists (My mods, Admin): the Installed page's rows ---------- */
.table { padding: 4px 14px; }
.trow { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.trow:last-child { border-bottom: 0; }
.trow img { width: 92px; height: 52px; object-fit: cover; border-radius: 8px; flex-shrink: 0; }
.trow .grow { flex: 1; min-width: 0; }
.trow.done { opacity: .55; }
.two-panels { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 16px; }
.two-panels .panel { margin: 0; }
.author { display: flex; gap: 18px; align-items: center; margin-bottom: 18px; }
.author h1 { margin: 0; }
.author p { color: var(--muted); margin: 0; }
.avatar { width: 76px; height: 76px; border-radius: 18px; background: var(--accent); color: var(--ink); display: grid; place-items: center; font-weight: 800; font-size: 2.3rem; flex-shrink: 0; }

/* ---------- smaller screens: the sidebar becomes a top bar with a menu button ---------- */
@media (max-width: 1100px) {
  .side { width: 260px; padding-left: 18px; }
  .nav a { font-size: 1.35rem; }
  .mod-top, .mod-cols { grid-template-columns: 1fr; }
}
@media (max-width: 820px) {
  body { background-attachment: scroll; background-image: linear-gradient(180deg, rgba(18,20,30,.75), rgba(18,20,30,.94) 340px), url(img/hero.webp); background-size: auto, 100% auto; background-repeat: no-repeat; background-position: top; }
  .shell { flex-direction: column; }
  .side { position: sticky; z-index: 20; width: auto; align-self: stretch; height: auto; padding: 10px 16px; background: rgba(22, 25, 36, .94); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); overflow: visible; }
  .side-top { display: flex; align-items: center; gap: 10px; text-align: left; }
  .logo img { width: 92px; margin: 0; }
  .logo-sub { margin: 0; font-size: .8rem; flex: 1; }
  .menu-btn { display: block; background: var(--line); color: var(--text); border: 0; border-radius: 10px; font-size: 1.2rem; width: 44px; height: 40px; cursor: pointer; }
  .side-menu { display: none; padding: 10px 0 4px; }
  .side.open .side-menu { display: flex; }
  .nav a { font-size: 1.3rem; }
  .status-card { margin-top: 12px; }
  .main { padding: 12px 10px 8px; }
  .page { padding: 16px; }
  .page-head { flex-direction: column; }
  .page-head h1 { font-size: 1.6rem; }
  .two, .two-panels { grid-template-columns: 1fr; }
  .facts { grid-template-columns: repeat(2, 1fr); }
  .file-head { flex-direction: column; }
  .trow { flex-wrap: wrap; }
  .trow img { width: 72px; height: 42px; }
  .danger-zone { flex-direction: column; align-items: flex-start; }
  .status-line { flex-direction: column; gap: 4px; }
}
@media (max-width: 460px) {
  .card { flex-direction: column; min-height: 0; }
  .card-img { max-width: none; aspect-ratio: 16 / 9; flex: none; }
}

.scan-tag { margin-left: 4px; text-transform: none; letter-spacing: 0; font-size: .74rem; }
.scan-tag:hover { text-decoration: none; filter: brightness(1.15); }
.scan-wait::before { content: '⏳ '; }

/* ---------- BBCode descriptions (like Nexus Mods) ---------- */
.bb { overflow-wrap: anywhere; line-height: 1.6; }
.bb strong { font-weight: 700; }
.bb-size1 { font-size: .72em; } .bb-size2 { font-size: .85em; } .bb-size3 { font-size: 1em; } .bb-size4 { font-size: 1.2em; }
.bb-size5 { font-size: 1.5em; line-height: 1.3; } .bb-size6 { font-size: 1.9em; line-height: 1.2; } .bb-size7 { font-size: 2.4em; line-height: 1.15; }
.bb-center { text-align: center; } .bb-right { text-align: right; } .bb-left { text-align: left; }
.bb-heading { color: var(--accent); font-size: 1.25rem; margin: 1em 0 .4em; }
.bb-list { padding-left: 1.4em; margin: .4em 0 .8em; }
.bb-list li { margin-bottom: .25em; }
.bb-line { border: 0; border-top: 1px solid var(--line); margin: 1.1em 0; }
.bb-quote { margin: .6em 0; padding: 10px 14px; border-left: 3px solid var(--accent); background: rgba(22, 25, 36, .45); border-radius: 0 9px 9px 0; }
.bb-quote cite { display: block; font-style: normal; font-weight: 700; color: var(--muted); font-size: .85em; margin-bottom: 4px; }
.bb-spoiler { margin: .6em 0; border: 1px solid var(--line); border-radius: 9px; background: rgba(22, 25, 36, .35); }
.bb-spoiler summary { padding: 8px 12px; margin: 0; }
.bb-spoiler > div { padding: 4px 12px 10px; }
.bb-code { background: var(--field); border: 1px solid var(--line); border-radius: 9px; padding: 10px 12px; overflow-x: auto; font: .85rem/1.5 Consolas, 'Cascadia Mono', monospace; white-space: pre; margin: .6em 0; }
.bb-img { max-width: 100%; height: auto; border-radius: 9px; margin: .4em 0; display: inline-block; vertical-align: middle; }
.bb-video { position: relative; aspect-ratio: 16 / 9; max-width: 720px; margin: .6em auto; border-radius: 10px; overflow: hidden; background: #000; }
.bb-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* editor */
.bb-editor { display: flex; flex-direction: column; }
.bb-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; padding: 6px; background: var(--row); border: 1px solid var(--line); border-bottom: 0; border-radius: 9px 9px 0 0; }
.bb-editor textarea { border-radius: 0 0 9px 9px; font: .9rem/1.5 Consolas, 'Cascadia Mono', monospace; }
.bb-btn { background: var(--line); color: var(--text); border: 0; border-radius: 7px; min-width: 32px; height: 30px; padding: 0 9px; font: 600 .85rem var(--font); cursor: pointer; }
.bb-btn:hover { background: var(--edge); }
.bb-bar select.bb-size { width: auto; height: 30px; padding: 0 8px; border-radius: 7px; font-size: .85rem; }
.bb-color { position: relative; display: inline-grid; place-items: center; width: 32px; height: 30px; border-radius: 7px; background: var(--line); cursor: pointer; overflow: hidden; }
.bb-color input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; padding: 0; border: 0; }
.bb-color span { font-weight: 800; color: var(--accent); text-decoration: underline 3px; pointer-events: none; }
.bb-sep { width: 1px; height: 20px; background: var(--edge); margin: 0 4px; }
.bb-tabs { margin-left: auto; display: flex; gap: 2px; background: var(--field); border-radius: 8px; padding: 2px; }
.bb-tab { background: none; border: 0; color: var(--muted); font: 700 .82rem var(--font); padding: 5px 12px; border-radius: 6px; cursor: pointer; }
.bb-tab.on { background: var(--accent); color: var(--ink); }
.bb-preview { margin: 0; border-radius: 0 0 9px 9px; min-height: 200px; background: rgba(22, 25, 36, .5); }

/* choosing pictures */
.drop { position: relative; display: flex !important; align-items: center; justify-content: center; min-height: 92px; border: 2px dashed var(--edge); border-radius: 12px; background: rgba(22, 25, 36, .3); cursor: pointer; text-align: center; padding: 14px; }
.drop.over { border-color: var(--accent); background: rgba(250, 193, 110, .08); }
.drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.drop span { color: var(--muted); font-weight: 600; pointer-events: none; }
.pick-preview { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
.pick-preview figure { margin: 0; }
.pick-preview img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 8px; }
.pick-preview figcaption { font-size: .75rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 3px; }
.gallery-edit { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.gallery-item { position: relative; background: var(--row); border-radius: 11px; padding: 8px; border: 1.5px solid transparent; margin: 0; }
.gallery-item.main { border-color: var(--accent); }
.gallery-item img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 8px; }
.gallery-item .tag { position: absolute; top: 14px; left: 14px; }
.gallery-btns { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.gallery-btns .btn.small { padding: 5px 9px; font-size: .78rem; }

/* ---------- mod page, Nexus style ---------- */
.mod-gallery { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.mod-gallery .mod-img { position: relative; padding: 0; border: 0; cursor: zoom-in; display: block; width: 100%; }
.img-count { position: absolute; right: 10px; bottom: 10px; background: rgba(18, 20, 30, .8); color: var(--text); font-size: .8rem; font-weight: 700; padding: 3px 9px; border-radius: 7px; }
.thumbs { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 2px; }
.thumb { flex: 0 0 auto; width: 92px; aspect-ratio: 16 / 9; padding: 0; border: 2px solid transparent; border-radius: 7px; overflow: hidden; background: var(--field); cursor: pointer; opacity: .7; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb:hover, .thumb.on { opacity: 1; }
.thumb.on { border-color: var(--accent); }
.facts { grid-template-columns: repeat(3, 1fr); }
.scan-ok { color: #5fd04f; }
.mod-tabs { display: flex; gap: 4px; border-bottom: 2px solid var(--line); margin: 6px 0 16px; overflow-x: auto; }
.mod-tabs a { padding: 10px 18px; color: var(--muted); font-weight: 700; border-bottom: 3px solid transparent; margin-bottom: -2px; white-space: nowrap; }
.mod-tabs a:hover { color: var(--text); text-decoration: none; }
.mod-tabs a.on { color: var(--text); border-bottom-color: var(--accent); }
.mod-tabs i { font-style: normal; font-size: .78rem; background: var(--line); color: var(--text); border-radius: 9px; padding: 1px 7px; margin-left: 4px; }
.fold { border: 1px solid var(--line); border-radius: 12px; margin-bottom: 12px; background: rgba(22, 25, 36, .35); }
.fold summary { padding: 12px 18px; margin: 0; font-size: 1.02rem; }
.fold[open] summary { border-bottom: 1px solid var(--line); }
.fold-body { padding: 12px 18px 14px; }
.description { min-height: 160px; }
.file-facts { display: flex; flex-wrap: wrap; gap: 4px 22px; margin: 8px 0 0; font-size: .84rem; }
.file-facts dt { color: var(--muted); font-size: .74rem; }
.file-facts dd { margin: 0; }
.log { border-bottom: 1px solid var(--line); padding: 10px 0 12px; }
.log:last-child { border-bottom: 0; }
.log h3 { font-size: 1.05rem; }
.image-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.image-tile { padding: 0; border: 0; border-radius: 10px; overflow: hidden; aspect-ratio: 16 / 9; background: var(--field); cursor: zoom-in; }
.image-tile img { width: 100%; height: 100%; object-fit: cover; transition: transform .2s; }
.image-tile:hover img { transform: scale(1.04); }

/* picture viewer */
.lightbox { position: fixed; inset: 0; z-index: 100; background: rgba(8, 9, 14, .93); display: flex; align-items: center; justify-content: center; padding: 50px 70px; }
.lightbox[hidden] { display: none; }
.lightbox img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 8px; box-shadow: 0 10px 40px rgba(0,0,0,.6); }
.lb-close, .lb-nav { position: absolute; background: rgba(60, 65, 84, .8); color: var(--text); border: 0; border-radius: 50%; width: 48px; height: 48px; font-size: 1.8rem; line-height: 1; cursor: pointer; display: grid; place-items: center; }
.lb-close:hover, .lb-nav:hover { background: var(--accent); color: var(--ink); }
.lb-close { top: 14px; right: 14px; }
.lb-nav.prev { left: 14px; top: 50%; transform: translateY(-50%); }
.lb-nav.next { right: 14px; top: 50%; transform: translateY(-50%); }
.lb-count { position: absolute; bottom: 16px; left: 0; right: 0; text-align: center; color: var(--muted); font-weight: 700; }
@media (max-width: 820px) {
  .facts { grid-template-columns: repeat(2, 1fr); }
  .lightbox { padding: 60px 10px; }
  .lb-nav { width: 40px; height: 40px; }
  .bb-tabs { margin-left: 0; }
}
.gallery-item .tag { background: var(--accent); color: var(--ink); box-shadow: 0 2px 8px rgba(0,0,0,.4); }
.form label input, .form label textarea, .form label select { font-weight: 400; }

/* header image (banner) on the mod page, like Nexus Mods */
.mod-banner { position: relative; height: clamp(170px, 24vw, 320px); border-radius: 14px; margin-bottom: 14px; background: var(--field) center / cover no-repeat; overflow: hidden; display: flex; align-items: flex-end; }
.mod-banner::after { content: ''; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(18,20,30,.92) 0%, rgba(18,20,30,.45) 45%, rgba(18,20,30,0) 75%); }
.mod-banner-text { position: relative; z-index: 1; padding: 18px 24px; }
.mod-banner-text h1 { margin: 2px 0; font-size: clamp(1.7rem, 3.4vw, 2.6rem); text-shadow: 0 2px 14px rgba(0,0,0,.7); }
.mod-banner-text p { margin: 0; color: #e8e2c9; text-shadow: 0 1px 8px rgba(0,0,0,.7); }
.mod-banner-text .cat { text-shadow: 0 1px 8px rgba(0,0,0,.7); }
.mod-top.under-banner .mod-info > .cat, .mod-top.under-banner .mod-info > h1, .mod-top.under-banner .mod-info > .by { display: none; }
.header-preview { border-radius: 10px; overflow: hidden; aspect-ratio: 24 / 5; background: var(--field) center / cover; border: 1px solid var(--line); }
.header-preview img { width: 100%; height: 100%; object-fit: cover; }
.drop.slim { min-height: 64px; }

/* requirements (form + mod page) */
.reqs h4 { margin: 4px 0 0; font-size: .92rem; color: var(--text); }
.req-search { position: relative; }
.req-results { position: absolute; z-index: 10; left: 0; right: 0; top: calc(100% + 4px); background: var(--panel); border: 1px solid var(--edge); border-radius: 11px; padding: 6px; box-shadow: 0 12px 30px rgba(0,0,0,.45); max-height: 340px; overflow-y: auto; }
.req-hit { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; background: none; border: 0; color: var(--text); padding: 6px 8px; border-radius: 8px; cursor: pointer; font: inherit; }
.req-hit:hover, .req-hit:focus { background: var(--row); }
.req-hit[disabled] { opacity: .5; cursor: default; }
.req-hit img { width: 64px; height: 36px; object-fit: cover; border-radius: 6px; flex-shrink: 0; }
.req-hit span { display: flex; flex-direction: column; min-width: 0; }
.req-hit small { color: var(--muted); }
.req-hit em { margin-left: auto; font-style: normal; color: var(--good); font-size: .8rem; }
.req-empty { padding: 8px; }
.req-list { display: flex; flex-direction: column; gap: 6px; }
.req-list:empty { display: none; }
.req-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr) auto; gap: 8px; align-items: center; background: var(--row); border-radius: 10px; padding: 6px 6px 6px 12px; }
.req-row.ext { grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr) minmax(0, 1fr) auto; padding-left: 6px; }
.req-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.req-quick { display: flex; flex-wrap: wrap; gap: 6px; }
.req-h { margin: 4px 0 6px; font-size: .9rem; color: var(--muted); }
.req-table { width: 100%; border-collapse: collapse; margin-bottom: 10px; font-size: .92rem; }
.req-table th { text-align: left; color: var(--muted); font-weight: 600; font-size: .78rem; padding: 4px 10px; border-bottom: 1px solid var(--line); }
.req-table td { padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.req-table tr:last-child td { border-bottom: 0; }
.req-table td:first-child { width: 50%; }
.req-notes { margin-top: 6px; }
@media (max-width: 820px) { .req-row, .req-row.ext { grid-template-columns: 1fr auto; } .req-row > input:not([type=hidden]) { grid-column: 1; } }

/* donate */
.btn.donate { display: flex; width: 100%; margin-top: 12px; background: #e0566b; color: #fff; }
.btn.donate:hover { background: #ef6b7f; color: #fff; }
.donate-note { margin: 6px 2px 0; font-size: .76rem; color: var(--muted); text-align: center; }
.status-line .foot-links { text-align: right; }
@media (max-width: 900px) { .status-line .foot-links { text-align: left; } }
.donate-ways { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 360px)); justify-content: center; gap: 14px; margin: 4px 0 14px; }
.donate-way { background: var(--row); border-radius: 14px; padding: 22px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 4px; border: 1.5px solid transparent; }
.donate-way h2 { margin: 8px 0 0; }
.donate-way .btn { margin-top: 12px; }
.donate-logo { width: 64px; height: 64px; border-radius: 18px; display: grid; place-items: center; font-size: 2.2rem; font-weight: 800; }
.donate-way.cashapp { border-color: rgba(0, 214, 50, .35); }
.donate-way.cashapp .donate-logo { background: #00d632; color: #fff; }
.donate-way.cashapp .btn { background: #00d632; color: #fff; }
.donate-way.cashapp .btn:hover { background: #22e152; }
.donate-way.stripe { border-color: rgba(99, 91, 255, .4); }
.donate-way.stripe .donate-logo { background: #635bff; }
.donate-way.stripe .btn { background: #635bff; color: #fff; }
.donate-way.stripe .btn:hover { background: #7a73ff; }
.cashtag { font-size: 1.15rem; font-weight: 700; margin: 0; }
.donate-fine { text-align: center; }

.qr-box { margin: 14px 0 0; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.qr { position: relative; width: 200px; height: 200px; padding: 14px; background: #fff; border-radius: 16px; box-shadow: 0 6px 20px rgba(0,0,0,.35); box-sizing: content-box; }
.qr svg { display: block; width: 100%; height: 100%; }
.qr svg path, .qr svg rect[fill="black"] { fill: #111; }
.qr-badge { position: absolute; left: 50%; top: 50%; width: 46px; height: 46px; margin: -23px 0 0 -23px; border-radius: 12px; background: #00d632; color: #fff; font: 800 28px/46px var(--font); text-align: center; border: 4px solid #fff; }
.qr-box figcaption { margin: 0; }

.tag.role-owner { background: linear-gradient(90deg, #f7b733, #fc4a1a); color: #fff; }
.tag.role-admin { background: linear-gradient(90deg, #11998e, #38c172); color: #fff; }
.tag.role-leaddev { background: linear-gradient(90deg, #c13cff, #ff4fa3); color: #fff; }
.tag.role-gamedev { background: linear-gradient(90deg, #7c4dff, #c13cff); color: #fff; }
.tag.role-moderator { background: linear-gradient(90deg, #2f80ed, #56ccf2); color: #fff; }

/* 1.9: several files per mod, and mod teams */
.files-tools { display: flex; justify-content: flex-end; margin-bottom: 4px; }
h2.files-group { margin: 18px 0 10px; }
h2.files-group:first-of-type { margin-top: 0; }
.old-files { margin-top: 18px; }
.files-up { border: 1.5px solid var(--line); border-radius: 10px; padding: 10px 14px 14px; margin: 0; display: grid; gap: 8px; }
.files-up legend { font-weight: 700; padding: 0 6px; }
.file-up { display: flex; gap: 10px; align-items: center; background: var(--row); border-radius: 8px; padding: 10px 12px; border: 1.5px solid transparent; }
.file-up.picked { border-color: rgba(250, 193, 110, .6); }
.file-up.new input[name^=newlabel] { flex: 1; min-width: 0; }
.file-up.new select { width: auto; }
.file-up input[type=file] { max-width: 260px; }
.files-up [data-add-file] { justify-self: start; }
.team-list { display: grid; gap: 6px; margin: 10px 0; }
.team-add { display: flex; gap: 8px; margin-top: 10px; }
.team-add input { flex: 1; max-width: 320px; }
@media (max-width: 700px) {
  .file-up { flex-direction: column; align-items: stretch; }
  .file-up input[type=file] { max-width: none; }
}

.file-about { margin: 8px 0 0; color: var(--text); opacity: .9; }
.file-up { flex-wrap: wrap; }
.file-up .file-up-name { flex: 1; min-width: 180px; }
.file-up textarea { flex-basis: 100%; min-height: 0; }
.file-up .check { flex-basis: 100%; display: flex; gap: 6px; align-items: center; margin: 0; }
.file-up.archived { cursor: pointer; }
.file-up.archived input { width: auto; }

/* replies and notifications */
.thread { margin-bottom: 10px; }
.thread > .comment { margin-bottom: 4px; }
.replies { margin-left: 28px; border-left: 2px solid var(--line); padding-left: 12px; }
.replies .comment { margin-bottom: 4px; }
.reply-box { margin: 2px 0 8px 28px; }
.reply-box summary { cursor: pointer; list-style: none; color: var(--accent, #fac16e); display: inline-block; }
.reply-box summary::-webkit-details-marker { display: none; }
.reply-box[open] summary { margin-bottom: 6px; }
.notes { display: grid; gap: 6px; }
.note { display: flex; gap: 12px; align-items: center; padding: 10px 12px; border-radius: 10px; background: var(--row); border: 1.5px solid transparent; color: inherit; text-decoration: none; }
.note.new { border-color: rgba(250, 193, 110, .5); }
.note .icon { font-size: 1.2rem; width: 26px; text-align: center; }
.note .grow { flex: 1; min-width: 0; }
.note img { width: 72px; height: 40px; object-fit: cover; border-radius: 6px; }
.dl-mark { display: inline-block; margin-top: 6px; font-size: .85rem; }

/* Steam sign-in */
.btn.steam { display: inline-flex; align-items: center; justify-content: center; gap: 8px; background: #1b2838; color: #c7d5e0; border: 1.5px solid #2a475e; }
.btn.steam:hover { background: #2a475e; color: #fff; }
.btn.google { display: inline-flex; align-items: center; justify-content: center; gap: 10px; background: #fff; color: #1f1f1f; border: 1.5px solid #dadce0; font-weight: 600; }
.btn.google:hover { background: #f1f3f4; color: #1f1f1f; }
.form .btn.google { width: 100%; padding: 12px 18px; font-size: 1rem; }
.alt-logins { display: grid; gap: 10px; }
.form .btn.steam { width: 100%; padding: 12px 18px; font-size: 1rem; }
.or { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: .85rem; margin: 2px 0; }
.or::before, .or::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.status-btns .btn.steam { flex-basis: 100%; padding: 8px 12px; font-size: .9rem; }

/* Support the site + Discord, side by side */
.side-links { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.side-links .btn.donate { margin: 0; }
.discord-btn { display: flex; align-items: center; justify-content: center; background: #fff; border-radius: 10px; padding: 9px 12px; transition: transform .12s, box-shadow .12s; }
.discord-btn:hover { transform: translateY(-1px); box-shadow: 0 4px 14px rgba(88, 101, 242, .45); }
.discord-btn img { width: 100%; height: auto; max-height: 30px; object-fit: contain; display: block; }

/* BepInEx page */
.bep-packs { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 14px; margin-bottom: 14px; }
.bep-pack { display: flex; flex-direction: column; gap: 10px; margin: 0; }
.bep-pack .btn.big { align-self: flex-start; margin-top: auto; }
.bep-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.bep-head h2 { margin: 0; }
.bep-list { margin: 0; padding-left: 20px; display: grid; gap: 4px; }
ol.steps { padding-left: 22px; display: grid; gap: 8px; }

/* Generative AI usage, laid out like Nexus Mods */
.ai-usage .ai-done { color: var(--good); }
.ai-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 12px; border: 1.5px solid var(--line); border-radius: 10px; padding: 12px; }
.ai-group h4 { margin: 0 0 8px; }
.ai-pair { display: flex; align-items: stretch; gap: 8px; }
.ai-or { align-self: center; color: var(--muted); font-weight: 700; }
.form label.ai-opt, label.ai-opt { display: flex; flex-direction: row; gap: 10px; align-items: flex-start; background: var(--row); border: 1.5px solid transparent; border-radius: 8px; padding: 12px; cursor: pointer; font-weight: 400; flex: 1; }
label.ai-opt.on { border-color: var(--accent); background: rgba(250, 193, 110, .08); }
label.ai-opt input { width: auto; margin-top: 3px; accent-color: var(--accent); }
label.ai-opt span { display: grid; gap: 4px; }
label.ai-opt small { color: var(--muted); font-size: .82rem; line-height: 1.35; }
label.ai-none { margin-top: 10px; }
.ai-tags { margin: 6px 0 0; display: flex; gap: 6px; flex-wrap: wrap; }
.tag.ai { background: rgba(122, 162, 255, .18); color: #9fb8ff; }
.card-ai { margin: -2px 0 8px; display: flex; gap: 4px; flex-wrap: wrap; }
.card-ai .tag { font-size: .62rem; }
@media (max-width: 700px) {
  .ai-grid { grid-template-columns: 1fr; }
  .ai-pair { flex-direction: column; }
  .ai-or { align-self: flex-start; }
}

/* Upload/edit steps, like Nexus Mods */
.steps { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; padding: 4px 0 14px; margin-bottom: 6px; border-bottom: 1px solid var(--line); }
.steps .step { display: flex; align-items: center; gap: 8px; padding: 6px 12px 6px 8px; border: 0; border-radius: 8px; background: transparent; color: var(--text); font: inherit; cursor: pointer; text-align: left; }
.steps .step:hover { background: var(--row); }
.steps .step.on { background: var(--edge); }
.step-num { width: 22px; height: 22px; border-radius: 50%; background: var(--muted); color: var(--ink); display: grid; place-items: center; font-size: .78rem; font-weight: 800; flex-shrink: 0; }
.step.done .step-num { background: #5fd04f; color: transparent; position: relative; }
.step.done .step-num::after { content: '✓'; color: #10240d; position: absolute; inset: 0; display: grid; place-items: center; font-size: .85rem; }
.step-text { display: grid; line-height: 1.15; }
.step-text b { font-weight: 600; }
.step-text small { color: var(--muted); font-size: .72rem; }
.step-line { flex: 1 1 18px; min-width: 14px; max-width: 70px; height: 1px; background: var(--edge); }
.step-btns { display: flex; justify-content: space-between; gap: 10px; margin-top: 4px; }
form.stepped fieldset[hidden], [data-step-outside][hidden] { display: none !important; }
.ai-usage.need .ai-grid, .ai-usage.need .ai-none { border-color: var(--bad); box-shadow: 0 0 0 2px rgba(240, 106, 90, .25); }
.ai-usage.need legend::after { content: '  Pick one'; color: var(--bad); font-size: .85rem; }
@media (max-width: 700px) { .step-line { display: none; } .steps .step { padding: 6px 8px; } }

/* Mod settings (Permissions step), Forum, Bugs, tags, mirrors, donate */
fieldset.settings label.check { align-items: flex-start; }
fieldset.settings label.check span { display: grid; gap: 2px; }
fieldset.settings label.check small { color: var(--muted); font-size: .8rem; }
fieldset.settings label.check input[type=radio] { width: auto; accent-color: var(--accent); margin-top: 4px; }
.mirror-list { display: grid; gap: 8px; margin-bottom: 8px; }
.mirrors { display: flex; flex-wrap: wrap; gap: 8px; }
.mod-tags { margin: 6px 0 0; display: flex; flex-wrap: wrap; gap: 6px; }
.tag.mod-tag { text-transform: none; letter-spacing: 0; font-weight: 600; text-decoration: none; }
.tag.mod-tag:hover { background: var(--edge); }
.tag-votes { display: grid; gap: 6px; margin-bottom: 10px; }
.tag-vote { display: flex; align-items: center; gap: 8px; padding: 4px 8px; border-radius: 8px; background: var(--row); opacity: .75; }
.tag-vote.shown { opacity: 1; }
.tag-vote a { flex: 1; font-weight: 600; text-decoration: none; }
.tag-add { display: flex; gap: 6px; }
.tag-add input { flex: 1; min-width: 0; }
.topic-list { display: grid; margin-bottom: 12px; }
a.topic-row { color: inherit; text-decoration: none; border-radius: 8px; padding: 10px 8px; }
a.topic-row:hover { background: var(--row); }
.new-topic { margin-top: 6px; }
.tag.bug-new, .tag.bug-needinfo { background: rgba(242, 178, 64, .2); color: var(--warn); }
.tag.bug-confirmed { background: rgba(122, 162, 255, .18); color: #9fb8ff; }
.tag.bug-fixed { background: rgba(52, 181, 36, .2); color: #5fd04f; }
.tag.bug-wontfix, .tag.bug-duplicate { background: var(--line); color: var(--muted); }
.bug-facts { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 8px; }
.bug-status { display: flex; gap: 8px; align-items: flex-end; margin: 12px 0; }
.bug-status label { display: grid; gap: 4px; }
.btn.donate-mod { color: #ff8fa0; }
.donate-note-mod { margin: 10px 0 0; padding: 8px 12px; border-radius: 8px; background: rgba(224, 86, 107, .12); font-size: .9rem; }
.mirror-list .req-row.ext { grid-template-columns: 1fr 2fr auto; }

.pair-code { font: 800 2rem/1.2 ui-monospace, Consolas, monospace; letter-spacing: .12em; text-align: center; padding: 14px; margin: 8px 0 14px; border-radius: 12px; background: var(--row); color: var(--accent); }
.pair form { display: flex; gap: 10px; align-items: center; margin-top: 12px; }

.rich .tip { padding: 10px 14px; border-radius: 10px; background: rgba(250, 193, 110, .1); }
.dl-card { margin-bottom: 14px; }
.dl-card .btn.big { align-self: flex-start; }
.panel.official { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 14px; }
.panel.official h2 { margin: 0 0 4px; }

/* ---------- 1.16: Scan before posting ---------- */
.scan-card { text-align: center; padding: 30px 26px 24px; }
.scanner { position: relative; width: 170px; height: 170px; margin: 0 auto 14px; display: grid; place-items: center; }
.scan-rings { position: absolute; inset: 0; }
.scan-rings i { position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--accent); opacity: 0; }
.is-scanning .scan-rings i { animation: scan-ring 2.4s ease-out infinite; }
.is-scanning .scan-rings i:nth-child(2) { animation-delay: .8s; }
.is-scanning .scan-rings i:nth-child(3) { animation-delay: 1.6s; }
@keyframes scan-ring { 0% { transform: scale(.45); opacity: .7; } 100% { transform: scale(1.05); opacity: 0; } }
.scan-file { position: relative; width: 74px; height: 92px; overflow: hidden; border-radius: 6px; transition: transform .4s, opacity .4s; }
.scan-doc { width: 100%; height: 100%; }
.scan-doc path { fill: var(--card); stroke: var(--edge); stroke-width: 2.5; stroke-linejoin: round; }
.scan-doc .fold { fill: var(--row); }
.scan-doc .ln { fill: var(--line); }
.scan-beam { position: absolute; left: -10%; right: -10%; height: 26px; top: -30px; opacity: 0;
  background: linear-gradient(180deg, rgba(250,193,110,0) 0%, rgba(250,193,110,.55) 70%, var(--accent-hi) 100%); box-shadow: 0 4px 14px rgba(250,193,110,.6); }
.is-scanning .scan-beam { opacity: 1; animation: scan-beam 1.6s ease-in-out infinite alternate; }
@keyframes scan-beam { from { top: -26px; } to { top: 92px; } }
.is-scanning .scan-doc .ln { animation: scan-lines 1.6s ease-in-out infinite alternate; }
@keyframes scan-lines { 50% { fill: var(--accent-dark); } }
.scan-shield { position: absolute; width: 96px; height: 108px; opacity: 0; transform: scale(.4) rotate(-12deg); transition: transform .55s cubic-bezier(.2, 1.6, .4, 1), opacity .3s; }
.scan-shield path { fill: none; stroke-width: 5; stroke-linecap: round; stroke-linejoin: round; }
.scan-shield > path:first-child { fill: rgba(52,181,36,.16); stroke: var(--good); }
.scan-shield .mark { stroke: var(--good); stroke-dasharray: 60; stroke-dashoffset: 60; display: none; }
.is-posted .scan-file, .is-flagged .scan-file { opacity: 0; transform: scale(.6); }
.is-posted .scan-shield, .is-flagged .scan-shield { opacity: 1; transform: none; }
.is-posted .scan-shield .ok { display: block; animation: scan-draw .5s .35s ease-out forwards; }
.is-flagged .scan-shield > path:first-child { fill: rgba(240,106,90,.16); stroke: var(--bad); }
.is-flagged .scan-shield .no { display: block; stroke: var(--bad); animation: scan-draw .5s .35s ease-out forwards; }
@keyframes scan-draw { to { stroke-dashoffset: 0; } }
.is-posted .scan-rings i { border-color: var(--good); animation: scan-ring 1.2s ease-out 2; }
.is-review .scan-doc path:first-child { stroke: var(--warn); }
.scan-title { font-size: 1.45rem; margin-bottom: 6px; }
.is-posted .scan-title { color: #7fe06f; }
.is-flagged .scan-title { color: var(--bad); }
.scan-sub { max-width: 520px; margin: 0 auto 18px; }
.scan-steps { list-style: none; margin: 0 auto 16px; padding: 0; max-width: 460px; text-align: left; display: grid; gap: 4px; }
.scan-steps li { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 10px; background: var(--row); opacity: .5; transition: opacity .3s, background .3s; }
.scan-steps li b { display: block; }
.scan-steps li small { display: block; color: var(--muted); font-size: .8rem; min-height: 1.2em; }
.scan-steps li > div { flex: 1; min-width: 0; }
.scan-steps .dot { flex: none; width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--edge); display: grid; place-items: center; font-size: .75rem; font-weight: 800; }
.scan-steps li.on, .scan-steps li.done, .scan-steps li.stop { opacity: 1; }
.scan-steps li.on { background: rgba(250,193,110,.1); }
.scan-steps li.on .dot { border-color: var(--accent); border-top-color: transparent; animation: spin .8s linear infinite; }
.scan-steps li.done .dot { border-color: var(--good); background: var(--good); color: #fff; animation: pop .35s ease-out; }
.scan-steps li.done .dot::after { content: '✓'; }
.scan-steps li.stop .dot { border-color: var(--warn); color: var(--warn); }
.scan-steps li.stop .dot::after { content: '!'; }
.is-flagged .scan-steps li.stop .dot { border-color: var(--bad); color: var(--bad); }
.scan-steps .timer { font: 700 .8rem Consolas, monospace; color: var(--muted); }
.scan-steps li:not(.on) .timer { visibility: hidden; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pop { 0% { transform: scale(.5); } 70% { transform: scale(1.18); } 100% { transform: scale(1); } }
.scan-files { max-width: 460px; margin: 0 auto 12px; display: grid; gap: 6px; text-align: left; }
.scan-file-row { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 9px; }
.scan-file-row .grow { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.scan-notes { max-width: 460px; margin: 0 auto; text-align: left; }
.scan-actions { display: flex; flex-direction: column; align-items: center; gap: 8px; margin-top: 8px; }
@media (prefers-reduced-motion: reduce) { .scan-card *, .scan-card *::after { animation-duration: .01s !important; animation-iteration-count: 1 !important; } }

/* Picture labels */
.pick-preview input { width: 100%; margin-top: 4px; padding: 5px 8px; font-size: .8rem; }
.label-row { display: flex; gap: 6px; margin: 6px 0; }
.label-row input { flex: 1; min-width: 0; padding: 5px 8px; font-size: .82rem; }
.mod-img .img-cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 18px 12px 8px; text-align: left; font-size: .86rem; font-weight: 600;
  background: linear-gradient(180deg, rgba(18,20,30,0), rgba(18,20,30,.85)); color: var(--text); pointer-events: none; }
.image-fig { margin: 0; }
.image-fig .image-tile { width: 100%; display: block; }
.image-fig figcaption { font-size: .82rem; color: var(--muted); margin-top: 4px; }
.lb-foot { position: absolute; bottom: 14px; left: 0; right: 0; text-align: center; }
.lb-foot .lb-count { position: static; }
.lb-cap { color: var(--text); font-weight: 600; margin-bottom: 4px; padding: 0 60px; }
.step-note { margin: 0 0 10px; }
.gallery-item .pic-label { width: 100%; margin-top: 8px; padding: 6px 9px; font-size: .84rem; }
#pictures .gallery-edit { margin-bottom: 12px; }
.gallery-item.just-added { animation: pic-in .5s ease-out; border-color: var(--good); }
@keyframes pic-in { from { opacity: 0; transform: translateY(8px) scale(.96); } }

/* ---------- 1.17: Tags box like Nexus Mods ---------- */
.tags-box .tag-field { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; min-height: 56px; padding: 12px; border: 1.5px solid var(--line); border-radius: 10px; background: rgba(22, 25, 36, .35); cursor: text; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 6px 4px 10px; border-radius: 6px; background: var(--card); border: 1px solid var(--edge); font-size: .88rem; font-weight: 600; }
.pill button { border: 0; background: none; color: var(--muted); font-size: 1.05rem; line-height: 1; padding: 0 3px; cursor: pointer; border-radius: 4px; }
.pill button:hover { color: var(--text); background: var(--line); }
.pill.ai { padding-right: 10px; background: rgba(250, 193, 110, .12); border-color: rgba(250, 193, 110, .45); color: var(--accent); }
.tag-add { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 12px 0 4px; }
.tag-add .tag-input { max-width: 300px; }
.tag-add .tag-input:disabled { opacity: .6; }
.ai-usage.nested { border: 0; border-left: 3px solid var(--edge); border-radius: 0; margin: 16px 0 0; padding: 4px 0 0 16px; background: none; }
.ai-usage.nested legend { font-size: 1rem; padding: 0; margin-bottom: 4px; }
.tag-add[hidden] { display: none; }

/* ---------- 1.17: picture resizer ---------- */
.resizer { position: fixed; inset: 0; z-index: 90; background: rgba(10, 12, 18, .82); display: grid; place-items: center; padding: 16px; }
.resizer[hidden] { display: none; }
.rz-panel { width: min(920px, 100%); max-height: 100%; overflow: auto; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 18px 20px; box-shadow: 0 20px 60px rgba(0,0,0,.5); }
.rz-panel h3 { margin-bottom: 4px; }
.rz-modes { display: flex; gap: 8px; margin: 10px 0 12px; flex-wrap: wrap; }
.rz-mode { border: 1.5px solid var(--line); background: var(--row); color: var(--text); border-radius: 8px; padding: 7px 12px; font: 600 .86rem var(--font); cursor: pointer; }
.rz-mode.on { border-color: var(--accent); background: rgba(250, 193, 110, .12); color: var(--accent); }
.rz-frame { position: relative; width: 100%; border-radius: 10px; overflow: hidden; background: var(--field); cursor: grab; touch-action: none; outline: 2px solid var(--accent); outline-offset: -2px; }
.rz-frame:active { cursor: grabbing; }
.rz-frame canvas { display: block; width: 100%; height: 100%; }
.rz-grid { position: absolute; inset: 0; pointer-events: none; background:
  linear-gradient(90deg, transparent calc(33.33% - .5px), rgba(255,255,255,.25) 33.33%, transparent calc(33.33% + .5px), transparent calc(66.66% - .5px), rgba(255,255,255,.25) 66.66%, transparent calc(66.66% + .5px)),
  linear-gradient(180deg, transparent calc(33.33% - .5px), rgba(255,255,255,.25) 33.33%, transparent calc(33.33% + .5px), transparent calc(66.66% - .5px), rgba(255,255,255,.25) 66.66%, transparent calc(66.66% + .5px)); }
.rz-zoom { display: flex !important; flex-direction: row !important; align-items: center; gap: 12px; margin: 12px 0 4px; font-weight: 600; }
.rz-zoom input { flex: 1; accent-color: var(--accent); padding: 0; }
.rz-btns { display: flex; justify-content: flex-end; gap: 8px; margin-top: 10px; }
.pick-preview figure .rz-open { margin-top: 4px; width: 100%; }
.pick-preview figure.resized img { outline: 2px solid var(--good); }
.header-preview { position: relative; }
.header-preview .rz-open { position: absolute; right: 8px; bottom: 8px; }

/* ---------- 1.20: language menu ---------- */
.lang-menu { position: relative; margin: 10px 0 0; }
.lang-menu summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 8px; border: 1px solid var(--line); background: var(--row); font-weight: 600; font-size: .86rem; }
.lang-menu summary::-webkit-details-marker { display: none; }
.lang-menu summary::after { content: '▾'; color: var(--muted); }
.lang-list { position: absolute; bottom: calc(100% + 6px); left: 0; z-index: 30; display: grid; grid-template-columns: 1fr 1fr; gap: 2px; min-width: 240px; padding: 6px; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 10px 30px rgba(0,0,0,.45); }
.lang-list a { padding: 6px 10px; border-radius: 6px; color: var(--text); font-size: .9rem; }
.lang-list a:hover { background: var(--row); text-decoration: none; }
.lang-list a.on { background: rgba(250, 193, 110, .14); color: var(--accent); font-weight: 700; }

.mt-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 4px 0 8px; }

/* @mentions */
a.mention { font-weight: 600; text-decoration: none; background: color-mix(in srgb, currentColor 10%, transparent); padding: 0 .25em; border-radius: 4px; }
a.mention:hover { text-decoration: underline; }
.mention-box { position: absolute; z-index: 60; display: flex; flex-direction: column; background: var(--panel, #1c1f24); border: 1px solid var(--line, #333); border-radius: 8px; padding: 4px; box-shadow: 0 8px 24px rgba(0,0,0,.35); max-width: 280px; }
.mention-box button { all: unset; cursor: pointer; padding: 6px 10px; border-radius: 6px; font-size: .95em; }
.mention-box button.on, .mention-box button:hover { background: color-mix(in srgb, currentColor 14%, transparent); }

/* staff badges: all styled like Game Dev */
.tag[class*="role-"] { font-weight: 700; letter-spacing: .02em; text-shadow: 0 1px 1px rgba(0,0,0,.25); }
h1 .tag[class*="role-"] { font-size: .45em; vertical-align: middle; margin-left: .4em; }

/* A–Z tabs (Admin › Accounts) */
.az { display: flex; flex-wrap: wrap; gap: 4px; margin: 0 0 12px; }
.az a, .az span.off { min-width: 30px; padding: 5px 8px; border-radius: 8px; text-align: center; font-weight: 600; background: var(--field); border: 1px solid var(--line); text-decoration: none; color: var(--text); }
.az a:hover { border-color: var(--edge); }
.az a.on { background: var(--accent); border-color: var(--accent); color: #1a1a1a; }
.az a.on .muted { color: inherit; opacity: .7; }
.az span.off { opacity: .3; }

/* Messages */
.dm-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.dm-top h1 { margin: 0; font-size: 1.5rem; }
.dm-top h1 a { color: inherit; text-decoration: none; }
.dm-top .grow { flex: 1; }
.dm-thread { display: flex; flex-direction: column; gap: 10px; max-height: 62vh; overflow-y: auto; }
.dm { max-width: 78%; display: flex; flex-direction: column; gap: 3px; }
.dm.me { align-self: flex-end; align-items: flex-end; }
.dm-body { padding: 9px 13px; border-radius: 14px; background: var(--row); border: 1px solid var(--line); overflow-wrap: anywhere; }
.dm-body p { margin: 0; }
.dm-body p + p { margin-top: .5em; }
.dm.me .dm-body { background: color-mix(in srgb, var(--accent) 22%, var(--panel)); border-color: color-mix(in srgb, var(--accent) 45%, transparent); }
.dm-form { margin-top: 12px; }
.dm-form .row { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
.dm-form .grow, .dm-new .grow { flex: 1; }
.dm-new { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.dm-new input[name=to] { flex: 1; min-width: 160px; }
.dm-avatar { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; background: var(--card); flex: none; }
.page-title.author .dm-btn { margin-left: auto; align-self: center; }
@media (max-width: 600px) { .dm { max-width: 92%; } .page-title.author .dm-btn { margin-left: 0; } }

/* Subscribe */
.btn.sub-btn { background: linear-gradient(90deg, #2f80ed, #56ccf2); border-color: transparent; color: #fff; }
.btn.sub-btn.on { background: var(--field); border: 1px solid #56ccf2; color: #8fdcff; }
.btn.sub-btn:hover { filter: brightness(1.08); }

.log h4.log-fixes { font-size: .95rem; margin: 10px 0 4px; color: var(--muted); }

/* Staff tools */
.site-banner { display: flex; align-items: flex-start; gap: 12px; margin: 0 0 12px; padding: 12px 16px; border-radius: 12px; border: 1px solid; }
.site-banner[hidden] { display: none; }
.site-banner .rich { flex: 1; }
.site-banner .rich p { margin: 0; }
.site-banner.info { background: rgba(47, 128, 237, .16); border-color: rgba(86, 204, 242, .5); }
.site-banner.good { background: rgba(52, 181, 36, .16); border-color: rgba(95, 208, 79, .5); }
.site-banner.warn { background: rgba(250, 193, 110, .16); border-color: rgba(250, 193, 110, .55); }
.site-banner [data-banner-close] { font-size: 1.1rem; line-height: 1; opacity: .8; }
.tag.staff-pick { background: linear-gradient(90deg, #f7b733, #fac16e); color: #1e2230; font-weight: 700; }
.card-img .tag.staff-pick { position: absolute; top: 8px; left: 8px; }
.featured-row { margin-bottom: 18px; }
.featured-row h2, .all-mods-head { margin: 4px 0 10px; }
.posts-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.comment.pinned { background: color-mix(in srgb, var(--accent) 7%, transparent); border-radius: 10px; padding-left: 10px; padding-right: 10px; }
.tag.pin-tag { background: rgba(250, 193, 110, .2); color: var(--accent); }
.staff-pop { display: inline-block; position: relative; }
.staff-pop > summary { list-style: none; cursor: pointer; }
.staff-pop > summary::-webkit-details-marker { display: none; }
.staff-pop[open] > form { position: absolute; right: 0; z-index: 20; width: 260px; margin-top: 6px; padding: 12px; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 10px 30px rgba(0,0,0,.4); }
.staff-notes { border-color: rgba(250, 193, 110, .35); }
.staff-note { padding: 8px 0; border-bottom: 1px solid var(--line); }
.staff-note:last-of-type { border-bottom: 0; }
.dm-report { margin-top: 2px; }
.dm-report form { display: flex; gap: 6px; margin-top: 4px; }
.dm-reported { padding: 8px 12px; margin: 6px 0; border-left: 3px solid var(--line); background: var(--row); border-radius: 6px; }
.stat-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-bottom: 12px; }
.stat-tiles .stat { display: flex; flex-direction: column; gap: 2px; padding: 14px; }
.stat-tiles .stat b { font-size: 1.6rem; }
.stat-chart { margin-bottom: 12px; }
.stat-chart h2 { font-size: 1.05rem; }
.bars { display: flex; align-items: flex-end; gap: 3px; height: 120px; padding-top: 16px; }
.bars .bar { flex: 1; min-height: 2px; background: linear-gradient(180deg, var(--accent), var(--accent-dark)); border-radius: 3px 3px 0 0; position: relative; }
.bars .bar i { position: absolute; top: -15px; left: 50%; transform: translateX(-50%); font-size: .65rem; font-style: normal; color: var(--muted); }
.bars-axis { display: flex; justify-content: space-between; margin-top: 4px; }
@media (max-width: 600px) { .bars .bar i { display: none; } .staff-pop[open] > form { position: static; width: auto; } }

.verify-note { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin: 0 0 12px; padding: 10px 14px; border-radius: 12px; background: rgba(250, 193, 110, .14); border: 1px solid rgba(250, 193, 110, .5); }

.code-input { font-size: 1.6rem; letter-spacing: .4em; text-align: center; font-variant-numeric: tabular-nums; }
.verify-more { margin-top: 10px; }

/* Admin › Email */
.mailboxes { display: grid; gap: 8px; }
.mailbox { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line, #2c3142); border-radius: 10px; }
.mailbox > div:first-child { flex: 1 1 220px; min-width: 0; overflow-wrap: anywhere; }
.mailbox details[open] { flex-basis: 100%; }
.mailbox .mail-pass { display: flex; gap: 8px; margin-top: 8px; }
.mailbox .mail-pass input { flex: 1; min-width: 0; }
.mail-addr { display: flex; align-items: center; gap: 6px; }
.mail-addr input { flex: 1; min-width: 0; }
.mail-addr span { white-space: nowrap; }

/* Scan a file */
.scan-verdict { border-radius: 12px; padding: 14px 16px; border: 1.5px solid var(--line); }
.scan-verdict b { font-size: 1.25rem; display: block; }
.scan-verdict p { margin: 6px 0 0; }
.scan-verdict.good { border-color: #3fae6a; background: rgba(63, 174, 106, .12); }
.scan-verdict.warn { border-color: #e0a63a; background: rgba(224, 166, 58, .12); }
.scan-verdict.bad { border-color: #e05555; background: rgba(224, 85, 85, .14); }
.scan-verdict.info { border-color: #5a8fd8; background: rgba(90, 143, 216, .12); }
.scan-facts { display: grid; grid-template-columns: max-content 1fr; gap: 6px 14px; margin: 14px 0 0; }
.scan-facts dt { color: var(--muted); }
.scan-facts dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.scan-files, .scan-recent { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.scan-files > li { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.scan-file-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.scan-path { font-family: Consolas, 'Cascadia Mono', monospace; font-size: .9rem; flex: 1 1 200px; min-width: 0; overflow-wrap: anywhere; }
.scan-state { font-weight: 700; font-size: .85rem; padding: 2px 8px; border-radius: 99px; }
.scan-state.good { color: #7be0a1; background: rgba(63, 174, 106, .15); }
.scan-state.warn { color: #f3c46b; background: rgba(224, 166, 58, .15); }
.scan-state.bad { color: #ff8a8a; background: rgba(224, 85, 85, .18); }
.scan-state.info, .scan-state.muted { color: var(--muted); background: rgba(255, 255, 255, .06); }
.scan-findings summary { cursor: pointer; margin: 6px 0; }
.finding { display: flex; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); }
.finding > div { min-width: 0; flex: 1; }
.finding pre { white-space: pre-wrap; overflow-wrap: anywhere; font-size: .8rem; background: var(--field); border-radius: 8px; padding: 8px; margin: 6px 0 0; }
.sev { font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; padding: 2px 6px; border-radius: 6px; height: fit-content; white-space: nowrap; }
.sev.bad { color: #ff8a8a; background: rgba(224, 85, 85, .18); }
.sev.warn { color: #f3c46b; background: rgba(224, 166, 58, .15); }
.sev.info { color: #9cc0f0; background: rgba(90, 143, 216, .15); }
.scan-recent li { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.scan-recent a { overflow-wrap: anywhere; }
.scan-files, .scan-recent { width: 100%; max-width: none; columns: auto; }
.scan-files > li { width: 100%; box-sizing: border-box; }

.scan-ai { margin-top: 8px; }
.scan-ai ul { margin: 4px 0 0; padding-left: 1.2em; display: grid; gap: 4px; }
