/* HoH Tools — sibling of HydraTool (hydratool.eu): same layout system, gold accent. */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root,
html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #060a0e;
  --surface: #0b1017;
  --panel: #0f1620;
  --raised: #141e2a;
  --border: #1e2f42;
  --border-2: #2d4459;
  --text: #edf2f7;
  --text-2: #a8bfd4;
  --text-3: #6b8aaa;
  --gold: #f5c842;
  --amber: #f59e0b;
  --cyan: #2dd4e8;
  --blue: #60a5fa;
  --green: #4ade80;
  --red: #f87171;
  --accent: var(--gold);
  --accent-text: var(--gold);
  --accent-dim: rgba(245, 200, 66, 0.10);
  --accent-line: rgba(245, 200, 66, 0.40);
  --accent-fg: #1a1302;
  --header-bg: rgba(11, 16, 23, 0.82);
  --glow-1: rgba(245, 200, 66, 0.09);
  --glow-2: rgba(245, 158, 11, 0.06);
  --checker-a: #0d141d;
  --checker-b: #0a1017;
  --overlay: rgba(3, 6, 10, 0.88);
  --shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
  --mono: 'JetBrains Mono', 'Fira Code', ui-monospace, monospace;
  --sans: 'Inter', system-ui, -apple-system, sans-serif;
  --radius: 10px;
  --radius-sm: 8px;
  --header-h: 56px;
}

html[data-theme="light"] {
  color-scheme: light;
  --bg: #f5f6f8;
  --surface: #ffffff;
  --panel: #fbfbfc;
  --raised: #eef1f5;
  --border: #dde3ea;
  --border-2: #c3ccd7;
  --text: #0f1720;
  --text-2: #3d4c5c;
  --text-3: #6a7a8c;
  --gold: #e0a91c;
  --amber: #d97706;
  --cyan: #0e8fa0;
  --blue: #2563eb;
  --green: #15803d;
  --red: #c2410c;
  --accent-text: #8a6100;
  --accent-dim: rgba(224, 169, 28, 0.14);
  --accent-line: rgba(176, 125, 0, 0.45);
  --accent-fg: #1a1302;
  --header-bg: rgba(255, 255, 255, 0.85);
  --glow-1: rgba(224, 169, 28, 0.12);
  --glow-2: rgba(217, 119, 6, 0.06);
  --checker-a: #eceff3;
  --checker-b: #f7f8fa;
  --overlay: rgba(15, 23, 32, 0.82);
  --shadow: 0 12px 32px rgba(15, 23, 32, 0.12);
}

html { font-size: 15px; -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  font-family: var(--sans);
  background:
    radial-gradient(900px 420px at 12% -8%, var(--glow-1), transparent 60%),
    radial-gradient(760px 380px at 92% -4%, var(--glow-2), transparent 60%),
    var(--bg);
  background-attachment: fixed;
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
  display: flex;
  flex-direction: column;
}
a { color: var(--accent-text); text-decoration: none; }
a:hover { text-decoration: underline; }
code { font-family: var(--mono); font-size: 0.88em; }
img { max-width: 100%; }
.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.site-main { flex: 1 0 auto; padding-bottom: 8px; }
.is-hidden, [hidden] { display: none !important; }

/* ── Header ──────────────────────────────────────────────────────────────── */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: var(--header-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.site-header::before {
  content: ''; display: block; height: 2px;
  background: linear-gradient(90deg, var(--gold), var(--amber) 50%, var(--cyan));
}
.site-header .wrap { display: flex; align-items: center; gap: 22px; min-height: 54px; }
.brand { font-family: var(--mono); font-weight: 600; font-size: 13px; letter-spacing: 0.06em; color: var(--accent-text); white-space: nowrap; }
.brand em { color: var(--text-3); font-style: normal; margin: 0 2px; }
.brand:hover { text-decoration: none; }
.site-nav { display: flex; gap: 4px; }
.site-nav a {
  padding: 6px 12px; border-radius: 6px; color: var(--text-2); font-weight: 500; font-size: 13.5px;
}
.site-nav a:hover { color: var(--text); background: var(--raised); text-decoration: none; }
.site-nav a.active { color: var(--accent-text); background: var(--accent-dim); }
.site-header-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.user-badge {
  font-family: var(--mono); font-size: 12px; color: var(--text-2);
  max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.icon-btn {
  width: 32px; height: 32px; border-radius: 8px; cursor: pointer;
  border: 1px solid var(--border-2); background: var(--panel); color: var(--text-2);
  line-height: 1; display: inline-flex; align-items: center; justify-content: center;
}
.icon-btn svg { width: 16px; height: 16px; }
.icon-btn:hover { color: var(--accent-text); border-color: var(--accent); }

/* ── Buttons & badges ────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 18px; border-radius: 8px; cursor: pointer;
  font: inherit; font-weight: 600; font-size: 14px; line-height: 1.3;
  border: 1px solid var(--border-2); color: var(--text); background: var(--panel);
}
.btn:hover { text-decoration: none; border-color: var(--accent); }
.btn.primary, .btn-primary { background: var(--gold); border-color: var(--gold); color: var(--accent-fg); }
.btn.primary:hover, .btn-primary:hover { filter: brightness(1.08); border-color: var(--gold); }
.btn-ghost { background: transparent; }
.btn.small, .btn-sm { padding: 6px 12px; font-size: 12.5px; }
.btn-block { display: flex; width: 100%; }
.btn-discord { background: #5865f2; border-color: #5865f2; color: #fff; }
.btn-discord:hover { filter: brightness(1.08); border-color: #5865f2; }

.badge, .count-badge {
  display: inline-flex; align-items: center;
  font-family: var(--mono); font-size: 10.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
  padding: 2px 8px; border-radius: 999px; border: 1px solid var(--border-2); color: var(--text-3);
  line-height: 1.5; vertical-align: middle;
}
.count-badge { text-transform: none; letter-spacing: 0; }
.badge.latest { color: var(--green); border-color: rgba(74,222,128,.35); background: rgba(74,222,128,.08); }
.badge.private { color: var(--accent-text); border-color: var(--accent-line); background: var(--accent-dim); }
.badge-client { color: var(--accent-text); border-color: var(--accent-line); background: var(--accent-dim); }
.badge-server { color: var(--cyan); border-color: rgba(45,212,232,.35); background: rgba(45,212,232,.08); }
.badge-version { color: var(--green); border-color: rgba(74,222,128,.35); background: rgba(74,222,128,.08); }
.badge-oneoff, .badge-one-off { color: var(--blue); border-color: rgba(96,165,250,.35); background: rgba(96,165,250,.08); }

.text-action { font-size: 13px; font-weight: 600; }

/* ── Hero (home) ─────────────────────────────────────────────────────────── */
.hero { padding: 64px 0 28px; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px; font-family: var(--mono); font-size: 11.5px;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-3);
  border: 1px solid var(--border); border-radius: 999px; padding: 4px 12px; background: var(--surface);
}
.eyebrow i { width: 6px; height: 6px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 3px rgba(74,222,128,.15); }
.hero h1 { font-size: clamp(30px, 5.4vw, 48px); line-height: 1.12; letter-spacing: -0.02em; font-weight: 700; margin-top: 20px; }
.hero h1 span { color: var(--accent-text); }
.hero .lead { margin-top: 16px; max-width: 620px; color: var(--text-2); font-size: 16.5px; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }

/* ── Sections & cards ────────────────────────────────────────────────────── */
.section, .section-block { padding: 28px 0 8px; }
.section h2, .section-block h2, .section-block > summary {
  display: flex; align-items: center; gap: 10px;
  font-size: 13px; font-family: var(--mono); letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--text-3); font-weight: 600; margin-bottom: 14px;
}
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.section-head h2 { margin-bottom: 0; }
.section-lede { color: var(--text-2); font-size: 14px; }
.section-highlight {
  margin-top: 20px; padding: 18px; border-radius: var(--radius);
  border: 1px solid var(--accent-line); background: var(--accent-dim);
}
.section-highlight h2 { color: var(--accent-text); }

.grid { display: grid; gap: 14px; grid-template-columns: repeat(3, 1fr); }
.card, .panel, .stat-card, .pin-card {
  background: linear-gradient(180deg, var(--panel), var(--surface));
  border: 1px solid var(--border); border-radius: var(--radius); padding: 20px;
}
.card {
  display: flex; flex-direction: column; gap: 8px; color: inherit;
  transition: border-color .15s, transform .15s;
}
a.card:hover { border-color: var(--border-2); transform: translateY(-2px); text-decoration: none; }
.card h3 { font-size: 16px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.card p { color: var(--text-2); font-size: 14px; }
.card .meta { margin-top: auto; padding-top: 10px; font-family: var(--mono); font-size: 12px; color: var(--text-3); }
.panel { padding: 16px 18px; }

/* ── Page heads ──────────────────────────────────────────────────────────── */
.page-head { padding: 44px 0 12px; }
.page-head-compact { padding-top: 8px; }
.page-head h1 { font-size: clamp(26px, 4vw, 34px); line-height: 1.2; letter-spacing: -0.02em; font-weight: 700; margin-top: 14px; }
.page-head-compact h1 { margin-top: 10px; }
.page-lede { color: var(--text-2); margin-top: 8px; max-width: 660px; }
.page-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.back-link { padding-top: 24px; font-size: 13px; }
.back-link a { color: var(--text-3); }
.back-link a:hover { color: var(--accent-text); }
.back-link + .page-head { padding-top: 16px; }

.empty-state { text-align: center; color: var(--text-3); padding: 40px 0; }
.empty-inline { color: var(--text-3); font-size: 13px; }
.form-error {
  color: var(--red); background: rgba(248,113,113,.08); border: 1px solid rgba(248,113,113,.3);
  border-radius: var(--radius-sm); padding: 10px 12px; font-size: 14px; margin: 14px 0;
}

/* ── Toolbar / inputs ────────────────────────────────────────────────────── */
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin: 20px 0 12px; }
.search-input, .compare-form select {
  background: var(--panel); color: var(--text); border: 1px solid var(--border-2);
  border-radius: 8px; padding: 9px 12px; font: inherit; font-size: 14px;
}
.toolbar .search-input { flex: 1; min-width: 200px; }
.search-input:focus, .compare-form select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-dim); }
.search-input-lg { flex: 1; font-size: 16px; padding: 12px 14px; }
.search-hero { display: flex; gap: 10px; margin: 20px 0 8px; }
.toolbar-jumps { display: flex; gap: 6px; margin-left: auto; }
.toolbar-jumps a {
  font-size: 13px; color: var(--text-2); padding: 6px 12px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--surface);
}
.toolbar-jumps a:hover { color: var(--text); border-color: var(--border-2); text-decoration: none; }
.toolbar-jumps b { font-family: var(--mono); font-size: 11px; color: var(--text-3); margin-left: 4px; font-weight: 600; }

/* ── Releases ────────────────────────────────────────────────────────────── */
.pin-row { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); margin-top: 16px; }
.pin-card { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; border-color: var(--accent-line); }
.pin-label { font-family: var(--mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); }
.pin-card h3 { font-family: var(--mono); font-size: 17px; font-weight: 600; margin-bottom: 6px; }

.release-disclosure { padding: 0; margin-top: 14px; }
.release-disclosure > summary {
  list-style: none; cursor: pointer; margin: 0; padding: 14px 18px;
  border: 1px solid var(--border); border-radius: var(--radius);
  background: linear-gradient(180deg, var(--panel), var(--surface));
  color: var(--text); font-family: var(--sans); text-transform: none; letter-spacing: 0; font-size: 15px;
}
.release-disclosure > summary::-webkit-details-marker { display: none; }
.release-disclosure > summary::after { content: '▸'; margin-left: auto; color: var(--text-3); transition: transform .15s; }
.release-disclosure[open] > summary::after { transform: rotate(90deg); }
.release-disclosure[open] > summary { border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
.release-disclosure > .release-stack {
  border: 1px solid var(--border); border-top: 0; border-radius: 0 0 var(--radius) var(--radius);
  overflow: hidden; gap: 0;
}
.release-disclosure .release-row { border: 0; border-radius: 0; border-bottom: 1px solid var(--border); background: var(--surface); }
.release-disclosure .release-row:last-child { border-bottom: 0; }

.release-stack { display: flex; flex-direction: column; gap: 10px; }
.release-row {
  display: grid; grid-template-columns: 1fr auto; gap: 14px; align-items: center;
  padding: 14px 18px; border: 1px solid var(--border); border-radius: var(--radius);
  background: linear-gradient(180deg, var(--panel), var(--surface));
}
.release-row:hover { background: var(--raised); }
.release-row-title { font-family: var(--mono); font-weight: 600; font-size: 15px; word-break: break-word; }
.release-row-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin-top: 4px; color: var(--text-3); font-size: 12.5px; font-family: var(--mono); }

/* ── Catalog diff ────────────────────────────────────────────────────────── */
.code-list { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.code-list code {
  display: inline-block; padding: 3px 8px; border-radius: 6px; font-size: 12px;
  background: var(--raised); border: 1px solid var(--border); color: var(--text-2);
}

/* ── Gallery layout ──────────────────────────────────────────────────────── */
.gallery-layout { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 24px; padding-top: 24px; align-items: start; }
.version-rail {
  position: sticky; top: calc(var(--header-h) + 16px); max-height: calc(100vh - var(--header-h) - 32px); overflow: auto;
  border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); padding: 12px 8px;
}
.rail-title { font-family: var(--mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); padding: 0 8px 8px; }
.version-list { list-style: none; display: flex; flex-direction: column; gap: 2px; }
.version-link { display: flex; flex-direction: column; min-width: 0; padding: 6px 10px; border-radius: 6px; color: var(--text-2); }
.version-link-label, .version-link-meta { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.version-link:hover { background: var(--raised); color: var(--text); text-decoration: none; }
.version-link.is-active, .version-link.is-latest { background: var(--accent-dim); color: var(--accent-text); }
.version-link-label { font-family: var(--mono); font-size: 12.5px; font-weight: 600; }
.version-link-meta { font-size: 11.5px; color: var(--text-3); }

.version-cards { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.version-card, .category-card {
  display: flex; flex-direction: column; gap: 4px; padding: 18px; color: inherit;
  background: linear-gradient(180deg, var(--panel), var(--surface));
  border: 1px solid var(--border); border-radius: var(--radius);
  transition: border-color .15s, transform .15s;
}
.version-card:hover, .category-card:hover { border-color: var(--border-2); transform: translateY(-2px); text-decoration: none; }
.version-card { min-width: 0; }
.version-card strong { font-family: var(--mono); font-size: 20px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.version-card span:last-child { font-size: 13px; color: var(--text-2); }
.version-card-tag { font-family: var(--mono); font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); }
.version-card:first-child { border-color: var(--accent-line); }
.version-card:first-child .version-card-tag { color: var(--accent-text); }

.category-grid { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); margin: 18px 0 8px; }
.category-card { flex-direction: row; align-items: center; justify-content: space-between; padding: 12px 16px; }
.category-card-label { font-weight: 600; font-size: 14px; }
.category-card-count { font-family: var(--mono); font-size: 12px; color: var(--text-3); }

.gallery-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 16px 0 4px; }
.gallery-tabs.is-sticky {
  position: sticky; top: var(--header-h); z-index: 20; padding: 10px 0;
  background: linear-gradient(180deg, var(--bg) 70%, transparent);
}
.gallery-tab {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--surface); color: var(--text-2); font-size: 13px;
}
.gallery-tab em { font-style: normal; font-family: var(--mono); font-size: 11px; color: var(--text-3); }
.gallery-tab:hover { border-color: var(--border-2); color: var(--text); text-decoration: none; }
.gallery-tab.is-current { color: var(--text); border-color: var(--border-2); font-family: var(--mono); }
.gallery-tab.is-active { color: var(--accent-text); border-color: var(--accent-line); background: var(--accent-dim); }

/* ── Tiles ───────────────────────────────────────────────────────────────── */
.tile-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
.tile-grid-featured { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.tile-grid-portrait { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
.tile {
  position: relative; display: flex; flex-direction: column; gap: 6px; padding: 8px; color: var(--text-2);
  background: linear-gradient(180deg, var(--panel), var(--surface)); border: 1px solid var(--border);
  border-radius: var(--radius); transition: border-color .12s, transform .12s;
}
.tile:hover { border-color: var(--accent); transform: translateY(-2px); text-decoration: none; }
.tile-frame {
  display: flex; align-items: center; justify-content: center; aspect-ratio: 1; overflow: hidden; border-radius: 6px;
  background: repeating-conic-gradient(var(--checker-a) 0% 25%, var(--checker-b) 0% 50%) 50% / 16px 16px;
}
.tile-portrait .tile-frame { aspect-ratio: 3 / 4; }
.tile-frame img { width: 100%; height: 100%; object-fit: contain; display: block; }
.tile-label { font-size: 11.5px; font-family: var(--mono); color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tile-cat { font-size: 10.5px; color: var(--text-3); margin-top: -4px; }
.tile-new::after {
  content: 'NEW'; position: absolute; top: 12px; left: 12px;
  font-family: var(--mono); font-size: 9.5px; font-weight: 600; letter-spacing: .08em;
  padding: 1px 6px; border-radius: 999px; background: var(--gold); color: var(--accent-fg);
}

/* ── Asset page ──────────────────────────────────────────────────────────── */
.asset-stage {
  display: flex; align-items: center; justify-content: center; padding: 24px; margin-top: 16px; min-height: 280px;
  border: 1px solid var(--border); border-radius: var(--radius);
  background: repeating-conic-gradient(var(--checker-a) 0% 25%, var(--checker-b) 0% 50%) 50% / 20px 20px;
}
.asset-stage img { max-height: 60vh; object-fit: contain; }
.asset-stage-portrait img { max-height: 72vh; }
.meta-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1px; margin-top: 16px; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: var(--border); }
.meta-grid > div { background: var(--surface); padding: 12px 16px; }
.meta-grid dt { font-family: var(--mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); }
.meta-grid dd { margin-top: 2px; font-size: 14px; word-break: break-word; }

/* ── Compare ─────────────────────────────────────────────────────────────── */
.compare-form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; margin-top: 16px; }
.compare-form label { display: flex; flex-direction: column; gap: 4px; font-family: var(--mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); }
.compare-form select { min-width: 150px; font-family: var(--mono); text-transform: none; letter-spacing: 0; }
.compare-summary { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.compare-stat {
  display: flex; align-items: baseline; gap: 6px; padding: 10px 14px; font-size: 13px; color: var(--text-2);
  border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface);
}
.compare-stat span { font-family: var(--mono); color: var(--text-3); }
.compare-stat strong { font-family: var(--mono); font-size: 16px; color: var(--text); }
.compare-stat-arrow { border: 0; background: none; color: var(--text-3); }
.compare-stat-added strong { color: var(--green); }
.compare-stat-removed strong { color: var(--red); }

/* ── Dumps ───────────────────────────────────────────────────────────────── */
.dump-stack { display: flex; flex-direction: column; gap: 10px; }
.dump-row {
  display: block; padding: 14px 18px; color: inherit; border: 1px solid var(--border); border-radius: var(--radius);
  background: linear-gradient(180deg, var(--panel), var(--surface)); transition: border-color .15s;
}
.dump-row:hover { border-color: var(--border-2); background: var(--raised); text-decoration: none; }
.dump-row-title { font-weight: 600; font-size: 15px; }
.dump-row-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin-top: 4px; color: var(--text-3); font-size: 12.5px; font-family: var(--mono); }

.dump-toc ul { list-style: none; display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.dump-toc a {
  display: flex; align-items: center; gap: 10px; padding: 12px 16px; color: var(--text);
  border: 1px solid var(--border); border-radius: var(--radius); background: linear-gradient(180deg, var(--panel), var(--surface));
}
.dump-toc a:hover { border-color: var(--accent); text-decoration: none; }
.dump-toc-emoji { font-size: 18px; }
.dump-toc-label { font-weight: 600; font-size: 14px; }
.dump-topic-emoji { margin-right: 4px; }

.dump-prose-wrap .dump-prose {
  padding: 18px 22px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface);
}
.dump-prose { color: var(--text); font-size: 15px; line-height: 1.65; }
.dump-prose > * { max-width: 78ch; }
.dump-prose h1, .dump-prose h2, .dump-prose h3 {
  font-family: var(--sans); text-transform: none; letter-spacing: -0.01em; color: var(--text);
  margin: 1.2em 0 0.45em; display: block;
}
.dump-prose > :first-child { margin-top: 0; }
.dump-prose h1 { font-size: 1.35rem; }
.dump-prose h2 { font-size: 1.15rem; }
.dump-prose h3 { font-size: 1rem; }
.dump-prose p, .dump-prose ul, .dump-prose ol { margin: 0 0 0.85em; }
.dump-prose ul, .dump-prose ol { padding-left: 1.3em; }
.dump-prose code { background: var(--raised); padding: 0.1em 0.35em; border-radius: 4px; }
.dump-prose pre {
  font-family: var(--mono); font-size: 12px; background: var(--panel); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 12px 14px; overflow-x: auto; margin: 0 0 1em; max-width: none;
}
.dump-prose pre code { background: transparent; padding: 0; }
.dump-prose table { width: 100%; max-width: none; border-collapse: collapse; margin: 0 0 1em; font-size: 14px; display: block; overflow-x: auto; }
.dump-prose th, .dump-prose td { border: 1px solid var(--border); padding: 6px 10px; text-align: left; }
.dump-prose th { background: var(--raised); font-weight: 600; }
.dump-prose img { max-width: 100%; height: auto; border-radius: 6px; }
.dump-prose blockquote { border-left: 3px solid var(--accent-line); padding-left: 12px; color: var(--text-2); margin: 0 0 1em; }

.dump-images { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.dump-image {
  display: flex; flex-direction: column; gap: 6px; padding: 8px;
  border: 1px solid var(--border); border-radius: var(--radius); background: linear-gradient(180deg, var(--panel), var(--surface));
}
.dump-image img {
  width: 100%; aspect-ratio: 1; object-fit: contain; border-radius: 6px;
  background: repeating-conic-gradient(var(--checker-a) 0% 25%, var(--checker-b) 0% 50%) 50% / 16px 16px;
}
.dump-image-meta { display: flex; flex-direction: column; gap: 2px; font-size: 12px; }
.dump-image-name { font-family: var(--mono); font-size: 11.5px; color: var(--text-2); word-break: break-all; }
.dump-image-missing { color: var(--text-3); }

/* ── Login ───────────────────────────────────────────────────────────────── */
.body-login { align-items: center; justify-content: center; }
.login-shell { width: 100%; padding: 24px 16px; display: flex; justify-content: center; }
.login-panel {
  position: relative; width: min(420px, 100%); padding: 32px 28px 28px; overflow: hidden;
  background: linear-gradient(180deg, var(--panel), var(--surface));
  border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow);
}
.login-panel::before {
  content: ''; position: absolute; inset: 0 0 auto; height: 2px;
  background: linear-gradient(90deg, var(--gold), var(--amber) 50%, var(--cyan));
}
.login-panel h1 { font-size: 24px; letter-spacing: -0.02em; margin-top: 18px; }
.login-lede { color: var(--text-2); font-size: 14.5px; margin-top: 6px; }
.login-oauth { margin-top: 24px; }
.login-oauth-hint { margin-top: 10px; font-size: 12.5px; color: var(--text-3); text-align: center; }

/* ── Lightbox ────────────────────────────────────────────────────────────── */
.lightbox {
  position: fixed; inset: 0; z-index: 200; background: var(--overlay);
  display: flex; align-items: center; justify-content: center; padding: 48px 64px 72px;
}
.lightbox[hidden] { display: none; }
.lightbox figure { margin: 0; text-align: center; max-width: min(92vw, 900px); }
.lightbox img {
  max-width: 100%; max-height: 76vh; object-fit: contain; border-radius: var(--radius);
  background: repeating-conic-gradient(#0d141d 0% 25%, #0a1017 0% 50%) 50% / 20px 20px;
}
.lightbox figcaption { margin-top: 12px; font-family: var(--mono); font-size: 13px; color: #edf2f7; }
.lightbox-close, .lightbox-prev, .lightbox-next {
  position: absolute; cursor: pointer; border-radius: 8px;
  border: 1px solid #2d4459; background: rgba(11, 16, 23, .85); color: #edf2f7;
}
.lightbox-close:hover, .lightbox-prev:hover, .lightbox-next:hover { border-color: #f5c842; color: #f5c842; }
.lightbox-close { top: 16px; right: 16px; width: 40px; height: 40px; font-size: 22px; }
.lightbox-prev, .lightbox-next { top: 50%; width: 44px; height: 44px; font-size: 28px; transform: translateY(-50%); }
.lightbox-prev { left: 16px; }
.lightbox-next { right: 16px; }
.lightbox a.lightbox-open { position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%); color: #f5c842; font-size: 13px; }
body.lightbox-open { overflow: hidden; }

/* ── Footer ──────────────────────────────────────────────────────────────── */
.site-footer { margin-top: auto; padding-top: 56px; }
.site-footer .wrap { border-top: 1px solid var(--border); padding: 20px; color: var(--text-3); font-size: 12.5px; display: flex; gap: 16px; flex-wrap: wrap; }
.footer-links { display: flex; gap: 14px; }
.footer-links a { color: var(--text-3); }
.footer-links a:hover { color: var(--accent-text); }
.site-footer .spacer { margin-left: auto; }

/* ── Mobile dock ─────────────────────────────────────────────────────────── */
.mobile-dock {
  display: none; position: fixed; left: 0; right: 0; bottom: 0; z-index: 90;
  height: calc(58px + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
  background: var(--header-bg); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-top: 1px solid var(--border);
}
.mobile-dock a {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  font-size: 11px; font-weight: 600; color: var(--text-3);
}
.mobile-dock a:hover { text-decoration: none; color: var(--text); }
.mobile-dock a.is-active { color: var(--accent-text); }
.dock-icon { font-size: 16px; line-height: 1; }

.hide-mobile { display: initial; }

@media (max-width: 900px) {
  .grid { grid-template-columns: repeat(2, 1fr); }
  .gallery-layout { grid-template-columns: minmax(0, 1fr); }
  .version-rail { position: static; max-height: 220px; }
}

@media (max-width: 720px) {
  body { padding-bottom: 64px; }
  .wrap { padding: 0 16px; }
  .site-header .wrap { gap: 12px; }
  .site-nav { display: none; }
  .user-badge { display: none; }
  .hide-mobile { display: none !important; }
  .mobile-dock { display: flex; }
  .grid { grid-template-columns: 1fr; }
  .hero { padding: 40px 0 16px; }
  .page-head { padding-top: 28px; }
  .release-row { grid-template-columns: 1fr; }
  .gallery-tabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-left: -16px; margin-right: -16px; padding-left: 16px; padding-right: 16px; }
  .gallery-tabs::-webkit-scrollbar { display: none; }
  .gallery-tab { flex-shrink: 0; }
  .toolbar-jumps { margin-left: 0; }
  .search-input, .search-input-lg { font-size: 16px; }
  .search-hero { flex-direction: column; }
  .tile-grid, .tile-grid-featured { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 10px; }
  .lightbox { padding: 56px 12px 72px; }
  .lightbox-prev, .lightbox-next { top: auto; bottom: 12px; transform: none; }
  .site-footer { padding-top: 32px; }
  .site-footer .spacer { margin-left: 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}
