:root {
  --bg: #0d0d10; --fg: #e8e8ec; --muted: #9a9aa5; --card: #18181d;
  --accent: #ffb84d;
  color-scheme: dark;
}
* { box-sizing: border-box; }
/* always keep room for the scrollbar, so short and long pages line up the same */
html { scrollbar-gutter: stable; }
body { margin: 0; background: var(--bg); color: var(--fg);
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", sans-serif; }
a { color: var(--accent); }
main { max-width: 1200px; margin: 0 auto; padding: 0 16px 48px; }
.top { display: flex; flex-wrap: wrap; gap: 8px 24px; align-items: center;
  padding: 16px; border-bottom: 1px solid #26262d; }
.top .brand { font-weight: 700; color: var(--fg); text-decoration: none; }
.top nav { display: flex; flex-wrap: wrap; gap: 16px; }
.top nav a { color: var(--muted); text-decoration: none; }
.top nav a:hover { color: var(--fg); }
.intro { padding: 32px 0 8px; }
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.card { position: relative; display: block; background: var(--card); border-radius: 10px;
  overflow: hidden; color: var(--fg); text-decoration: none; }
.card img, .card .placeholder { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.card .title { display: block; padding: 10px 12px; }

.meta { color: var(--muted); }
.pick { background: var(--card); border-left: 3px solid var(--accent); border-radius: 6px; padding: 4px 14px; margin: 0 0 16px; }
.pick p { margin: 8px 0; }
.card .placeholder, .placeholder { display: grid; place-items: center; color: var(--muted);
  background: linear-gradient(135deg, #1e1e26, #2a2a36); }
.badge { font-size: 12px; padding: 2px 8px; border-radius: 99px; text-transform: uppercase;
  background: #000a; vertical-align: middle; }
.detail .hero { width: 100%; max-height: 70vh; object-fit: contain; border-radius: 10px; margin-top: 24px; }
.detail .hero.placeholder { aspect-ratio: 16 / 9; }
table.files { border-collapse: collapse; width: 100%; }
table.files th, table.files td { text-align: left; padding: 8px; border-bottom: 1px solid #26262d; }
.button { display: inline-block; padding: 6px 14px; border-radius: 6px; background: var(--accent);
  color: #000; text-decoration: none; font-weight: 600; }
.button.big { padding: 12px 22px; margin: 8px 0 24px; }
.button.disabled { background: #33333b; color: var(--muted); }
footer { color: var(--muted); font-size: 14px; text-align: center; padding: 24px 16px; }
.guide { max-width: 720px; }
.badges { position: absolute; top: 8px; left: 8px; right: 8px; display: flex; justify-content: space-between; gap: 6px; }
.badges-inline { display: flex; flex-wrap: wrap; gap: 8px; }
.badge.origin { text-transform: none; font-weight: 600; }
.badge.origin.native-hdr { color: #000; background: #ffd66b; }
.badge.origin.ai-upscaled { color: #fff; background: #3b6cff; }
.badge.origin.ai-generated { color: #fff; background: #9b3bff; }
.badge.cat { color: var(--fg); background: #26262d; text-decoration: none; text-transform: none; }
.legend { color: var(--muted); font-size: 14px; }
.cats { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 8px; }
.cats a { padding: 4px 12px; border-radius: 99px; background: var(--card); color: var(--fg); text-decoration: none; }
.cats a.active, .cats a:hover { background: var(--accent); color: #000; }
a.plain { color: inherit; text-decoration: none; }
h2 .more { font-size: 14px; font-weight: 400; margin-left: 12px; }
/* category bar, breadcrumbs */
.catbar { border-bottom: 1px solid #26262d; }
.catbar .cats { max-width: 1200px; margin: 0 auto; padding: 10px 16px; overflow-x: auto; flex-wrap: nowrap; }
.cats a { white-space: nowrap; }
.cats .count { color: var(--muted); font-size: 12px; margin-left: 4px; }
.cats a.active .count, .cats a:hover .count { color: #0008; }
.crumbs { color: var(--muted); font-size: 14px; margin: 16px 0 8px; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--fg); }
h1 .meta { font-size: 16px; font-weight: 400; }
/* wallpaper page */
.detail { display: grid; gap: 0 32px; grid-template-columns: minmax(0, 1fr) 340px; align-items: start;
  grid-template-areas: "hero side" "dl side"; }
.detail-hero { grid-area: hero; } .detail-dl { grid-area: dl; } .detail-side { grid-area: side; }
@media (max-width: 900px) { .detail { grid-template-columns: minmax(0, 1fr); grid-template-areas: "hero" "side" "dl"; }
  .detail-side h1 { margin-top: 16px; } }
.detail .hero { margin-top: 0; width: 100%; }
.detail-side h1 { margin: 0 0 8px; font-size: 26px; line-height: 1.2; }
.hint { color: var(--muted); font-size: 13px; margin: 6px 0 0; }
.credit, .facts, .buy { background: var(--card); border-radius: 10px; padding: 14px 16px; margin: 16px 0; }
.credit h2 { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 0 0 8px; }
.credit dl, dl.facts { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin: 0; }
dt { color: var(--muted); font-size: 14px; }
dd { margin: 0; font-size: 14px; }
a.quiet { color: var(--muted); }
.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tags a { color: var(--fg); background: var(--card); padding: 3px 10px; border-radius: 99px; text-decoration: none; font-size: 14px; }
.tags a:hover { background: #26262d; }
.detail-side .button.big { display: block; text-align: center; margin: 0 0 8px; }
.buy .meta { font-size: 14px; }
.device h3 { font-size: 15px; margin: 18px 0 6px; color: var(--muted); }
ul.sizes { list-style: none; margin: 0; padding: 0; }
ul.sizes li { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px;
  padding: 8px 0; border-bottom: 1px solid #26262d; }
.fmts { display: flex; flex-wrap: wrap; gap: 6px; }
.button.small { padding: 4px 10px; font-size: 13px; }
.related { margin-top: 40px; }
.related h2 a { color: inherit; }

/* PayPal's own Donate button image (hosted by PayPal) */
.donate { display: inline-flex; align-items: center; }
.donate img { display: block; }

/* type filter above the grids (static/filter.js): each checkbox is the origin badge itself, as on the cards;
   unticked it turns grey and struck through. The label's padding makes a bigger tap target than the badge. */
.card[hidden], .filter-section[hidden], .type-filter[hidden], [data-more][hidden] { display: none; }
.type-filter { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 4px; border: 0; padding: 0; margin: 8px 0 16px; }
.type-filter legend { float: left; color: var(--muted); font-size: 14px; margin-right: 4px; padding: 0; }
.type-filter label { position: relative; display: inline-flex; padding: 6px 2px; cursor: pointer; user-select: none; }
.type-filter input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; pointer-events: none; }
.type-filter .badge { transition: background-color .15s, color .15s; }
.type-filter .badge::before { content: "✓ "; }
.type-filter input:not(:checked) + .badge { color: var(--muted); background: #26262d; text-decoration: line-through; }
.type-filter input:not(:checked) + .badge::before { content: ""; }
.type-filter label:hover .badge { filter: brightness(1.12); }
.type-filter input:focus-visible + .badge { outline: 2px solid var(--accent); outline-offset: 2px; }
.filter-empty { margin: 8px 0 24px; }

/* "HDR wallpaper" under a wallpaper's title, and the text about the formats at the bottom of the gallery */
.h1-sub { display: block; font-size: 14px; font-weight: 400; color: var(--muted); text-transform: uppercase;
  letter-spacing: .06em; margin-top: 4px; }
.about { max-width: 760px; margin: 48px 0 16px; padding-top: 8px; border-top: 1px solid #26262d; }
.about h2 { font-size: 18px; margin: 24px 0 6px; }
.about p { color: var(--muted); line-height: 1.6; margin: 0; }
