/* ---------- Theme tokens ---------- */
:root,
:root[data-theme='dark'] {
  --bg: #0b0d12;
  --surface: #13161d;
  --surface-2: #1b1f29;
  --surface-3: #242a36;
  --border: #252a36;
  --text: #e9ecf2;
  --muted: #98a1b3;
  --faint: #626b7d;
  --accent: #5b8cff;
  --accent-2: #a46bff;
  --accent-soft: rgba(91, 140, 255, 0.14);
  --on-accent: #fff;
  --shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
  --header-bg: rgba(11, 13, 18, 0.82);
  color-scheme: dark;
}
:root[data-theme='light'] {
  --bg: #f4f5f8;
  --surface: #ffffff;
  --surface-2: #eef0f4;
  --surface-3: #e2e6ed;
  --border: #e1e4ea;
  --text: #151821;
  --muted: #5b6375;
  --faint: #98a0ae;
  --accent: #3a6ff7;
  --accent-2: #8b4cf7;
  --accent-soft: rgba(58, 111, 247, 0.1);
  --on-accent: #fff;
  --shadow: 0 12px 32px rgba(20, 25, 40, 0.12);
  --header-bg: rgba(255, 255, 255, 0.85);
  color-scheme: light;
}
:root {
  --radius: 12px;
  --radius-sm: 8px;
  --header-h: 64px;
  --font: ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* ---------- Base ---------- */
*,
*::before,
*::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.55 var(--font);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1; }
[hidden] { display: none !important; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
svg { display: block; }
h1, h2, h3 { line-height: 1.2; margin: 0; letter-spacing: -0.01em; }
button { font: inherit; color: inherit; }
.container { width: 100%; max-width: 1560px; margin: 0 auto; padding: 0 24px; }
.muted { color: var(--muted); }
.skip-link { position: absolute; left: -999px; top: 8px; background: var(--accent); color: #fff; padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip-link:focus { left: 8px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- Buttons & chips ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 18px; border-radius: 10px; border: 1px solid transparent;
  font-weight: 600; font-size: 14px; cursor: pointer; transition: transform .15s, background .15s, border-color .15s, box-shadow .15s;
  white-space: nowrap;
}
.btn svg { width: 18px; height: 18px; flex: none; }
.btn small { font-weight: 500; opacity: .8; font-size: 12px; }
.btn-primary { background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: var(--on-accent); box-shadow: 0 6px 18px rgba(91, 140, 255, .28); }
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 10px 24px rgba(91, 140, 255, .38); }
.btn-ghost { background: var(--surface-2); border-color: var(--border); }
.btn-ghost:hover { background: var(--surface-3); }
.btn-lg { padding: 14px 20px; font-size: 15px; }
.btn-block { width: 100%; }
.btn.loading { pointer-events: none; opacity: .75; }
.btn.loading svg { animation: bob 1s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(3px); } }

.chip {
  display: inline-flex; align-items: center; padding: 7px 14px; border-radius: 999px;
  background: var(--surface-2); border: 1px solid var(--border); color: var(--muted);
  font-size: 13.5px; font-weight: 500; white-space: nowrap; transition: color .15s, background .15s, border-color .15s;
}
.chip:hover { color: var(--text); background: var(--surface-3); }
.chip.active { background: var(--accent-soft); color: var(--accent); border-color: transparent; }
.chip.small { padding: 4px 11px; font-size: 12.5px; }
.pill { display: inline-flex; align-items: center; padding: 4px 10px; border-radius: 6px; background: var(--surface-2); border: 1px solid var(--border); font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.src-swatch { display: inline-block; width: 10px; height: 10px; border-radius: 3px; background: var(--c); flex: none; }
.src-swatch.lg { width: 14px; height: 14px; border-radius: 4px; }
.icon-btn { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 10px; border: 1px solid var(--border); background: var(--surface-2); cursor: pointer; color: var(--muted); }
.icon-btn:hover { color: var(--text); background: var(--surface-3); }
.icon-btn svg { width: 20px; height: 20px; }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 50; border-bottom: 1px solid var(--border); }
/* The blur lives on a pseudo-element: backdrop-filter on the header itself would trap the
   fixed-position mobile menu inside the header box. */
.site-header::before {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background: var(--header-bg); backdrop-filter: saturate(160%) blur(14px); -webkit-backdrop-filter: saturate(160%) blur(14px);
}
.header-row { height: var(--header-h); display: flex; align-items: center; gap: 20px; }
.logo { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 19px; letter-spacing: -0.02em; flex: none; }
.logo svg { width: 32px; height: 32px; }
.logo-text { background: linear-gradient(135deg, var(--text) 30%, var(--accent-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.search { position: relative; flex: 1; max-width: 460px; }
.search input {
  width: 100%; height: 42px; padding: 0 40px 0 40px; border-radius: 11px;
  border: 1px solid var(--border); background: var(--surface-2); color: var(--text); font: inherit; font-size: 14.5px;
  transition: border-color .15s, background .15s, box-shadow .15s;
}
.search input::placeholder { color: var(--faint); }
.search input:focus { outline: none; border-color: var(--accent); background: var(--surface); box-shadow: 0 0 0 4px var(--accent-soft); }
.search-icon { position: absolute; left: 13px; top: 50%; width: 18px; height: 18px; transform: translateY(-50%); color: var(--faint); pointer-events: none; }
.search-kbd { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); font: 600 11px/1 var(--font); color: var(--faint); border: 1px solid var(--border); border-radius: 5px; padding: 3px 6px; }
.search input:focus ~ .search-kbd { display: none; }
.search input::-webkit-search-cancel-button { display: none; }

.main-nav { display: flex; align-items: center; gap: 2px; margin-left: auto; }
.main-nav > a, .dropdown-btn {
  display: inline-flex; align-items: center; gap: 4px; padding: 8px 12px; border-radius: 9px;
  color: var(--muted); font-weight: 600; font-size: 14px; background: none; border: 0; cursor: pointer;
}
.main-nav > a:hover, .dropdown-btn:hover, .dropdown.open .dropdown-btn { color: var(--text); background: var(--surface-2); }
.main-nav > a.active, .dropdown-btn.active { color: var(--text); }
.main-nav > a.active::after { content: ''; display: block; }
.dropdown-btn svg { width: 16px; height: 16px; transition: transform .15s; }
.dropdown { position: relative; }
.dropdown-menu {
  position: absolute; top: calc(100% + 8px); right: 0; min-width: 220px; padding: 8px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow);
  display: none; flex-direction: column; gap: 1px;
}
.dropdown-menu::before { content: ''; position: absolute; inset: -10px 0 auto; height: 10px; }
.dropdown-menu a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 7px; color: var(--muted); font-size: 14px; }
.dropdown-menu a:hover { background: var(--surface-2); color: var(--text); }
.dropdown-menu .all-link { color: var(--accent); font-weight: 600; }
.dropdown-menu.mega { display: none; grid-template-columns: repeat(3, minmax(140px, 1fr)); width: 520px; }
.dropdown-menu.mega .all-link { grid-column: 1 / -1; border-top: 1px solid var(--border); border-radius: 0 0 7px 7px; margin-top: 4px; padding-top: 10px; }
.res-pill { display: inline-block; min-width: 54px; text-align: center; font-size: 11px; font-weight: 800; padding: 3px 6px; border-radius: 5px; background: var(--accent-soft); color: var(--accent); }
@media (hover: hover) {
  .dropdown:hover .dropdown-menu { display: flex; }
  .dropdown:hover .dropdown-menu.mega { display: grid; }
  .dropdown:hover .dropdown-btn svg { transform: rotate(180deg); }
}
.dropdown.open .dropdown-menu { display: flex; }
.dropdown.open .dropdown-menu.mega { display: grid; }
.header-actions { display: flex; gap: 8px; flex: none; }
.menu-toggle { display: none; }
:root[data-theme='dark'] .i-sun, :root:not([data-theme='dark']) .i-moon { display: none; }

/* ---------- Category chip bar ---------- */
.chip-bar { border-bottom: 1px solid var(--border); background: var(--surface); }
.chip-scroll { display: flex; gap: 8px; overflow-x: auto; padding-top: 12px; padding-bottom: 12px; scrollbar-width: none; mask-image: linear-gradient(90deg, #000 92%, transparent); }
.chip-scroll::-webkit-scrollbar { display: none; }

/* ---------- Listing ---------- */
.list-page { padding-top: 28px; padding-bottom: 56px; }
.list-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 18px; }
.list-head h1 { font-size: 30px; font-weight: 800; }
.lead { color: var(--muted); margin: 6px 0 0; max-width: 720px; }
.tabs { display: inline-flex; padding: 4px; gap: 2px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 11px; }
.tab { padding: 7px 14px; border-radius: 8px; font-size: 14px; font-weight: 600; color: var(--muted); }
.tab:hover { color: var(--text); }
.tab.active { background: var(--surface); color: var(--text); box-shadow: 0 1px 3px rgba(0,0,0,.2); }
:root[data-theme='dark'] .tab.active { background: var(--surface-3); }
.res-filter { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 22px; }
.res-chip { padding: 6px 13px; border-radius: 8px; font-size: 13px; font-weight: 700; color: var(--muted); border: 1px solid var(--border); background: var(--surface); }
.res-chip:hover { color: var(--text); border-color: var(--surface-3); }
.res-chip.active { color: var(--on-accent); background: var(--accent); border-color: var(--accent); }
.sources-note { margin-left: auto; display: inline-flex; align-items: center; gap: 5px; color: var(--faint); font-size: 13px; }
.notice { padding: 10px 14px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--border); color: var(--muted); font-size: 13.5px; margin: 0 0 18px; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 16px; }
.grid.portrait { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }

.card {
  position: relative; display: block; overflow: hidden; border-radius: var(--radius);
  aspect-ratio: 16 / 10; background: var(--ph, var(--surface-2));
  box-shadow: 0 1px 2px rgba(0,0,0,.15); isolation: isolate;
}
.grid.portrait .card { aspect-ratio: 9 / 16; }
.card img { width: 100%; height: 100%; object-fit: cover; opacity: 0; transform: scale(1.02); transition: opacity .35s ease, transform .5s cubic-bezier(.2,.7,.2,1); }
.card img.loaded { opacity: 1; transform: none; }
.card:hover img { transform: scale(1.06); }
.card::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.35) 0%, transparent 28%, transparent 55%, rgba(0,0,0,.75) 100%); opacity: .55; transition: opacity .25s; z-index: 1; }
.card:hover::after { opacity: 1; }
.card:focus-visible { outline-offset: 3px; }
.q-badge {
  position: absolute; top: 10px; left: 10px; z-index: 2;
  font-size: 11px; font-weight: 800; letter-spacing: .03em; padding: 3px 7px; border-radius: 6px;
  color: #fff; background: rgba(0,0,0,.55); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.q-badge.static { position: static; }
.q-badge.q-8k { background: linear-gradient(135deg, #f43f5e, #f97316); }
.q-badge.q-5k { background: linear-gradient(135deg, #a855f7, #ec4899); }
.q-badge.q-4k { background: linear-gradient(135deg, #3b82f6, #8b5cf6); }
.q-badge.q-qhd { background: rgba(16, 185, 129, .85); }
.src-tag {
  position: absolute; top: 10px; right: 10px; z-index: 2;
  display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 600; color: #fff;
  padding: 3px 8px 3px 7px; border-radius: 6px; background: rgba(0,0,0,.5); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  opacity: 0; transform: translateY(-4px); transition: opacity .2s, transform .2s;
}
.src-tag::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--c); }
.card:hover .src-tag, .card:focus-visible .src-tag { opacity: 1; transform: none; }
.card-info {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; padding: 12px 14px;
  display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; color: #fff;
}
.card-title { font-size: 14px; font-weight: 600; line-height: 1.3; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; text-shadow: 0 1px 6px rgba(0,0,0,.5); opacity: 0; transform: translateY(6px); transition: opacity .25s, transform .25s; }
.card:hover .card-title, .card:focus-visible .card-title { opacity: 1; transform: none; }
.card-res { flex: none; font-size: 11.5px; font-weight: 600; opacity: .9; font-variant-numeric: tabular-nums; text-shadow: 0 1px 4px rgba(0,0,0,.6); }
@media (hover: none) {
  .card-title, .src-tag { opacity: 1; transform: none; }
}

.pager { display: flex; justify-content: center; gap: 12px; margin-top: 32px; }
.grid-end { text-align: center; color: var(--faint); margin-top: 32px; font-size: 14px; }
.skeleton { aspect-ratio: 16 / 10; border-radius: var(--radius); background: linear-gradient(100deg, var(--surface-2) 40%, var(--surface-3) 50%, var(--surface-2) 60%) 0 0 / 200% 100%; animation: shimmer 1.2s linear infinite; }
.grid.portrait .skeleton { aspect-ratio: 9 / 16; }
@keyframes shimmer { to { background-position: -200% 0; } }

.empty { text-align: center; padding: 80px 20px; color: var(--muted); max-width: 520px; margin: 0 auto; }
.empty svg { width: 56px; height: 56px; margin: 0 auto 16px; color: var(--faint); }
.empty h1, .empty h2 { color: var(--text); font-size: 22px; margin-bottom: 8px; }
.empty p { margin: 0 0 22px; }
.error-code { font-size: 88px; font-weight: 900; line-height: 1; letter-spacing: -0.04em; background: linear-gradient(135deg, var(--accent), var(--accent-2)); -webkit-background-clip: text; background-clip: text; color: transparent; margin-bottom: 12px; }

/* ---------- Wallpaper page ---------- */
.wp-page { padding-top: 20px; padding-bottom: 56px; }
.breadcrumb { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--faint); margin-bottom: 16px; min-width: 0; }
.breadcrumb a:hover { color: var(--text); }
.breadcrumb span[aria-current] { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wp-layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 28px; align-items: start; }
.wp-stage { display: flex; justify-content: center; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 14px; }
.wp-preview {
  position: relative; margin: 0; overflow: hidden; border-radius: 10px;
  width: min(100%, calc(76vh * var(--ar))); aspect-ratio: var(--ar);
  background: var(--ph, var(--surface-2));
}
.wp-preview img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.wp-preview .ph { filter: blur(14px); transform: scale(1.06); }
.wp-preview .main { opacity: 0; transition: opacity .5s ease; }
.wp-preview .main.loaded { opacity: 1; }
.view-full {
  position: absolute; right: 12px; bottom: 12px; display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 11px; border-radius: 8px; font-size: 12.5px; font-weight: 600; color: #fff;
  background: rgba(0,0,0,.55); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  opacity: 0; transition: opacity .2s;
}
.view-full svg { width: 15px; height: 15px; }
.wp-preview:hover .view-full, .view-full:focus-visible { opacity: 1; }
@media (hover: none) { .view-full { opacity: 1; } }

.wp-side { position: sticky; top: calc(var(--header-h) + 20px); display: flex; flex-direction: column; gap: 20px; }
.wp-title { font-size: 24px; font-weight: 800; word-break: break-word; }
.wp-badges { display: flex; flex-wrap: wrap; gap: 6px; margin-top: -8px; }
.download-box { display: flex; flex-direction: column; gap: 10px; }
.wp-info { margin: 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 4px 16px; }
.wp-info > div { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--border); font-size: 14px; }
.wp-info > div:last-child { border-bottom: 0; }
.wp-info dt { color: var(--muted); }
.wp-info dd { margin: 0; display: inline-flex; align-items: center; gap: 8px; font-weight: 600; text-align: right; min-width: 0; overflow-wrap: anywhere; }
.wp-info dd a { color: var(--accent); }
.wp-info dd a:hover { text-decoration: underline; }
.wp-colors h2, .wp-tags h2 { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--faint); margin-bottom: 10px; }
.swatches { display: flex; gap: 8px; }
.swatch { width: 36px; height: 36px; border-radius: 9px; background: var(--c); border: 1px solid var(--border); }
.tag-list { display: flex; flex-wrap: wrap; gap: 6px; }

.sizes { margin-top: 44px; }
.sizes h2, .related h2, .section-title { font-size: 21px; font-weight: 800; }
.sizes > p { margin: 6px 0 18px; font-size: 14px; }
.size-groups { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.size-group { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; }
.size-group h3 { font-size: 14px; margin-bottom: 12px; color: var(--muted); }
.size-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; }
.size-btn { display: flex; flex-direction: column; gap: 1px; padding: 8px 11px; border-radius: 8px; background: var(--surface-2); border: 1px solid var(--border); font-size: 13.5px; transition: border-color .15s, background .15s; }
.size-btn b { font-variant-numeric: tabular-nums; font-weight: 700; }
.size-btn span { font-size: 11.5px; color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.size-btn:hover { border-color: var(--accent); background: var(--accent-soft); }
.size-btn.loading { opacity: .6; pointer-events: none; }
.about-wp { margin-top: 36px; color: var(--muted); font-size: 14.5px; max-width: 900px; }
.about-wp a { color: var(--accent); }
.related { margin-top: 40px; }
.related .grid { margin-top: 16px; }

/* ---------- Categories ---------- */
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; margin-bottom: 40px; }
.cat-tile {
  position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end; gap: 2px;
  height: 120px; padding: 16px 18px; border-radius: var(--radius); color: #fff;
  background:
    radial-gradient(120% 140% at 100% 0%, hsl(calc(var(--h) + 40) 85% 62% / .9), transparent 55%),
    linear-gradient(135deg, hsl(var(--h) 70% 38%), hsl(calc(var(--h) + 60) 70% 22%));
  transition: transform .2s, box-shadow .2s;
}
.cat-tile:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.cat-tile.res { background: linear-gradient(135deg, var(--surface-2), var(--surface-3)); color: var(--text); border: 1px solid var(--border); }
.cat-name { font-size: 20px; font-weight: 800; }
.cat-go { font-size: 13px; opacity: .8; }
.section-title { margin-bottom: 14px; }

/* ---------- About ---------- */
.prose-page { max-width: 820px; padding-top: 36px; padding-bottom: 56px; }
.prose-page h1 { font-size: 32px; font-weight: 800; }
.prose-page h2 { font-size: 20px; margin: 34px 0 10px; }
.prose-page p { color: var(--muted); }
.prose-page a { color: var(--accent); }
.source-table { display: flex; flex-direction: column; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
.source-row { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-bottom: 1px solid var(--border); }
.source-row:last-child { border-bottom: 0; }
.source-main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.source-main .muted { font-size: 13px; }
.status { font-size: 12px; font-weight: 700; padding: 4px 9px; border-radius: 999px; white-space: nowrap; }
.status.ok { background: rgba(16, 185, 129, .15); color: #10b981; }
.status.off { background: var(--surface-2); color: var(--faint); border: 1px solid var(--border); }

/* ---------- Ads ---------- */
.ad-slot { display: flex; justify-content: center; align-items: center; margin: 0 auto 22px; overflow: hidden; }
.ad-slot iframe { display: block; border: 0; max-width: 100%; }
.ad-leader { min-height: 90px; }
.wp-page .ad-leader { margin-top: 36px; margin-bottom: 0; }
.ad-box { min-height: 250px; margin: 0; }
.ad-rail { display: none; }
@media (min-width: 1930px) {
  .ad-rail { display: block; position: fixed; top: calc(var(--header-h) + 24px); right: 16px; width: 160px; margin: 0; z-index: 5; }
}
.ad-native { margin-top: 28px; min-height: 1px; }
.ad-native:has(> div:empty) .ad-label { display: none; }
.ad-label { display: block; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--faint); margin-bottom: 8px; }
.sponsored-link { align-self: center; font-size: 12.5px; color: var(--faint); }
.sponsored-link:hover { color: var(--text); text-decoration: underline; }
@media (max-width: 760px) { .ad-leader { min-height: 60px; } }
@media (max-width: 500px) { .ad-leader { min-height: 50px; } }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--border); background: var(--surface); margin-top: auto; }
.footer-grid { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: 32px; padding-top: 40px; padding-bottom: 28px; }
.footer-brand p { color: var(--muted); font-size: 14px; max-width: 320px; }
.site-footer h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--faint); margin-bottom: 12px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 7px; }
.site-footer li a { color: var(--muted); font-size: 14px; }
.site-footer li a:hover { color: var(--text); }
.footer-note { border-top: 1px solid var(--border); padding-top: 18px; padding-bottom: 26px; display: flex; justify-content: space-between; gap: 24px; color: var(--faint); font-size: 12.5px; }
.footer-note p { margin: 0; max-width: 820px; }

/* ---------- Responsive ---------- */
@media (max-width: 1180px) {
  .main-nav > a, .dropdown-btn { padding: 8px 9px; }
  .search { max-width: 340px; }
}
@media (max-width: 1024px) {
  .wp-layout { grid-template-columns: 1fr; }
  .wp-side { position: static; }
  .wp-preview { width: min(100%, calc(70vh * var(--ar))); }
}
@media (max-width: 960px) {
  .menu-toggle { display: grid; }
  .header-row { gap: 12px; }
  .search { max-width: none; }
  .main-nav {
    position: fixed; top: var(--header-h); left: 0; right: 0; bottom: 0; margin: 0;
    flex-direction: column; align-items: stretch; gap: 2px; padding: 12px 16px 32px;
    background: var(--bg); overflow-y: auto; display: none;
  }
  .main-nav.open { display: flex; }
  .main-nav > a, .dropdown-btn { padding: 12px 12px; font-size: 16px; width: 100%; justify-content: space-between; }
  .dropdown-menu, .dropdown-menu.mega { position: static; box-shadow: none; width: auto; min-width: 0; border: 0; background: var(--surface); }
  .dropdown-menu.mega { grid-template-columns: repeat(2, 1fr); }
  .dropdown:hover .dropdown-menu, .dropdown:hover .dropdown-menu.mega { display: none; }
  .dropdown.open .dropdown-menu { display: flex; }
  .dropdown.open .dropdown-menu.mega { display: grid; }
  body.nav-open { overflow: hidden; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  .container { padding: 0 16px; }
  .logo-text, .search-kbd { display: none; }
  .header-row { gap: 10px; }
  .list-page { padding-top: 20px; }
  .list-head h1 { font-size: 24px; }
  .list-head { align-items: stretch; }
  .tabs { width: 100%; }
  .tab { flex: 1; text-align: center; padding: 7px 6px; }
  .sources-note { display: none; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; }
  .grid.portrait { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
  .card { border-radius: 10px; }
  .card-info { padding: 9px 10px; }
  .card-title { font-size: 12.5px; }
  .card-res { display: none; }
  .wp-stage { padding: 8px; border-radius: 12px; }
  .wp-title { font-size: 21px; }
  .size-groups { grid-template-columns: 1fr; }
  .cat-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .cat-tile { height: 96px; padding: 12px 14px; }
  .cat-name { font-size: 17px; }
  .footer-note { flex-direction: column; gap: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
