/* egor's wallpapers — gallery-quiet, dark only. The images are the color. */

/* Fonts are self-hosted (latin subset): no request to Google. */
@font-face { font-family: 'Geist'; font-style: normal; font-weight: 100 900; font-display: swap; src: url(/fonts/geist.woff2) format('woff2'); }
@font-face { font-family: 'Geist Mono'; font-style: normal; font-weight: 100 900; font-display: swap; src: url(/fonts/geist-mono.woff2) format('woff2'); }
@font-face { font-family: 'Instrument Serif'; font-style: normal; font-weight: 400; font-display: swap; src: url(/fonts/instrument-serif.woff2) format('woff2'); }
@font-face { font-family: 'Instrument Serif'; font-style: italic; font-weight: 400; font-display: swap; src: url(/fonts/instrument-serif-italic.woff2) format('woff2'); }

:root {
  --bg: #0a0a0b;
  --bg-2: #111113;
  --fg: #ecebe8;
  --mute: #8b8a86;
  --dim: #55544f;
  --line: rgba(255, 255, 255, 0.07);
  --line-2: rgba(255, 255, 255, 0.12);

  --sans: 'Geist', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'Geist Mono', ui-monospace, 'SF Mono', Menlo, monospace;
  --serif: 'Instrument Serif', 'Iowan Old Style', Georgia, serif;

  --gutter: clamp(16px, 3vw, 40px);
  --radius: 4px;

  /* motion */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);      /* expo-ish: fast in, long settle */
  --ease-io: cubic-bezier(0.65, 0, 0.35, 1);
  --ease-soft: cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html {
  background: var(--bg);
  color: var(--fg);
  font: 400 14px/1.5 var(--sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  scrollbar-color: #2a2a2d var(--bg);
}
body { margin: 0; min-height: 100vh; background: var(--bg); overflow-x: hidden; }
html.locked { overflow: hidden; }

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.mono { font-family: var(--mono); font-size: 11px; letter-spacing: 0.02em; font-variant-numeric: tabular-nums; }
.dim { color: var(--mute); }
:focus-visible { outline: 1px solid var(--fg); outline-offset: 3px; border-radius: 2px; }
::selection { background: rgba(255, 255, 255, 0.18); }

/* ---------- header ---------- */
.bar {
  position: sticky; top: 0; z-index: 20;
  padding: 18px var(--gutter) 0;
  transition: transform 0.6s var(--ease-out), background-color 0.4s, backdrop-filter 0.4s;
}
.bar::after {
  content: ''; position: absolute; inset: auto 0 0; height: 1px; background: var(--line);
  opacity: 0; transition: opacity 0.4s;
}
.bar.scrolled {
  background: rgba(10, 10, 11, 0.72);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
  backdrop-filter: blur(18px) saturate(1.4);
}
.bar.scrolled::after { opacity: 1; }
.bar.hide { transform: translateY(-100%); }
/* Logo | tabs (centered) | actions. Equal side columns keep the tabs centered; on narrow phones they give way. */
.bar-row { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px; }
.mark { justify-self: start; }

.mark {
  font-family: var(--serif); font-size: 30px; line-height: 1; letter-spacing: -0.01em; white-space: nowrap;
  transition: font-size 0.5s var(--ease-out);
}
.mark em { font-style: italic; color: var(--mute); }
.bar.scrolled .mark { font-size: 24px; }
.actions { justify-self: end; display: flex; gap: 8px; }

.btn {
  display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 14px;
  border-radius: 999px; font-size: 13px; white-space: nowrap;
  transition: background-color 0.25s, color 0.25s, border-color 0.25s, transform 0.4s var(--ease-out);
}
.btn:active { transform: scale(0.96); }
.btn.ghost { border: 1px solid var(--line-2); color: var(--fg); }
.btn.ghost:hover { background: rgba(255, 255, 255, 0.06); border-color: rgba(255, 255, 255, 0.2); }
.btn.solid { background: var(--fg); color: #0a0a0b; font-weight: 500; }
.btn.solid:hover { background: #fff; }
.btn.solid .dim { color: rgba(10, 10, 11, 0.55); }
#shuffle svg { transition: transform 0.6s var(--ease-out); }
#shuffle:hover svg { transform: rotate(180deg); }

.btn.icon.active { background: var(--fg); color: #0a0a0b; border-color: var(--fg); }
#searchBtn svg { transition: transform 0.35s var(--ease-out); }
#searchBtn:hover svg { transform: scale(1.12) rotate(-8deg); }

.banner .mono a { color: var(--fg); text-decoration: underline; text-underline-offset: 3px; }

/* ---------- search: a floating command bar, like Spotlight ---------- */
.spot { position: fixed; inset: 0; z-index: 40; display: grid; justify-items: center; align-items: start; padding: 13vh 16px 16px; }
.spot-back {
  position: absolute; inset: 0; background: rgba(6, 6, 7, 0.5);
  -webkit-backdrop-filter: blur(16px) saturate(1.2); backdrop-filter: blur(16px) saturate(1.2);
  opacity: 0; transition: opacity 0.24s ease-out;
}
.spot-box {
  position: relative; width: min(660px, 100%); max-height: 78vh; overflow: auto; overscroll-behavior: contain;
  display: grid; gap: 14px; padding: 6px 8px 10px; border-radius: 22px;
  background: rgba(24, 24, 27, 0.78); border: 1px solid var(--line-2);
  -webkit-backdrop-filter: blur(34px) saturate(1.6); backdrop-filter: blur(34px) saturate(1.6);
  box-shadow: 0 50px 140px -30px rgba(0, 0, 0, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.07);
  opacity: 0; transform: translateY(-14px) scale(0.96); transform-origin: 50% 0;
  transition: opacity 0.22s var(--ease-out), transform 0.34s var(--ease-out);
}
.spot.open .spot-back, .spot.open .spot-box { opacity: 1; }
.spot.open .spot-box { transform: none; }
/* Leaving is quicker than arriving. */
.spot.closing .spot-back { transition-duration: 0.15s; }
.spot.closing .spot-box { transform: translateY(-6px) scale(0.98); transition: opacity 0.14s ease-in, transform 0.16s ease-in; }
.spot-q { display: flex; align-items: center; gap: 12px; height: 58px; padding: 0 8px 0 12px; border-bottom: 1px solid var(--line); cursor: text; }
.spot-q svg { width: 20px; height: 20px; color: var(--mute); transition: color 0.2s; }
.spot-q:focus-within svg { color: var(--fg); }
.spot-q input { flex: 1; min-width: 0; height: 100%; border: 0; background: none; color: var(--fg); font: 400 21px var(--sans); letter-spacing: -0.01em; outline: none; }
.spot-q input::placeholder { color: var(--dim); }
.spot-q input::-webkit-search-cancel-button { display: none; }
kbd { display: inline-block; min-width: 20px; padding: 1px 6px; margin: 0 2px; border-radius: 6px; border: 1px solid var(--line-2); font: 10px/1.6 var(--mono); color: var(--mute); text-align: center; }
.spot-hits { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 0 4px; }
.spot-hits:empty { display: none; }
.hit {
  position: relative; aspect-ratio: 16 / 10; border-radius: 10px; overflow: hidden; background: var(--c, #111);
  outline: 2px solid transparent; outline-offset: 2px;
  transition: outline-color 0.15s, transform 0.3s var(--ease-out);
  animation: hit-in 0.36s var(--ease-out) both; animation-delay: var(--d, 0ms);
}
.hit img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hit span {
  position: absolute; inset: auto 0 0; padding: 20px 10px 7px; text-align: left;
  font: italic 400 17px/1.1 var(--serif); background: linear-gradient(transparent, rgba(0, 0, 0, 0.72));
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.hit.sel { outline-color: var(--fg); }
@media (any-hover: hover) and (any-pointer: fine) { .hit:hover { transform: translateY(-2px); outline-color: rgba(255, 255, 255, 0.5); } }
@keyframes hit-in { from { opacity: 0; transform: translateY(8px) scale(0.97); } }
.spot-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 0 8px; }
.spot-row > .mono { width: 40px; color: var(--mute); }
.spot-foot { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 10px 8px 0; border-top: 1px solid var(--line); color: var(--dim); }
.filters { margin-left: auto; color: var(--mute); animation: swap 0.4s var(--ease-out); }
.filters b { font-weight: 400; color: var(--fg); }
.filters button { margin-left: 8px; color: var(--mute); text-decoration: underline; text-underline-offset: 3px; transition: color 0.2s; }
.filters button:hover { color: var(--fg); }
.wall-head.coll:not(.filtered) { display: none; }
.wall-head.coll h2, .wall-head.coll #count { display: none; }
.sorts { display: flex; gap: 2px; flex-wrap: wrap; }
.sorts button {
  height: 30px; padding: 0 12px; border-radius: 999px; color: var(--mute); font-size: 13px;
  transition: color 0.25s, background-color 0.25s;
}
.sorts button:hover { color: var(--fg); }
.sorts button[aria-pressed='true'] { color: var(--fg); background: rgba(255, 255, 255, 0.08); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06); }

/* ---------- top-bar tabs: wallpapers · collections ---------- */
.tabs { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--dim); }
.tabs a { color: var(--mute); transition: color 0.25s; }
.tabs a:hover, .tabs a[aria-current] { color: var(--fg); }

/* ---------- /collections/: big covers, then "Made by" ---------- */
[data-page='collections'] :is(#wallHead, #grid, #loadMore, #none) { display: none; }
.colls { padding: 8px 0 48px; }
.colls h1 { margin: 0; font: 400 30px/1 var(--serif); letter-spacing: -0.01em; }
.colls .wall-head:not(:first-child) { margin-top: 56px; }
.by-note { margin: -8px 0 16px; }
.cgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 360px), 1fr)); gap: 16px; }
.cgrid.by { grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); }
.cover {
  position: relative; aspect-ratio: 16 / 10; border-radius: 6px; overflow: hidden;
  background: var(--c, #111); isolation: isolate;
  transition: transform 0.6s var(--ease-out), box-shadow 0.6s var(--ease-out);
}
.cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 1s var(--ease-out); }
.cover::after { content: ''; position: absolute; inset: 0; background: linear-gradient(to top, rgba(0, 0, 0, 0.66), transparent 58%); }
.cover b { position: absolute; z-index: 1; left: 14px; right: 40px; bottom: 11px; font: 400 24px/1 var(--serif); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cover .mono { position: absolute; z-index: 1; right: 12px; bottom: 13px; color: rgba(255, 255, 255, 0.75); }
@media (any-hover: hover) and (any-pointer: fine) {
  .cover:hover { transform: translateY(-3px); box-shadow: 0 24px 50px -24px color-mix(in srgb, var(--c) 80%, transparent); }
  .cover:hover img { transform: scale(1.05); }
}
.wall-head { display: flex; align-items: baseline; gap: 12px; padding: 0 0 16px; }
.wall-head h2 { margin: 0; font: 400 30px/1 var(--serif); letter-spacing: -0.01em; }

/* ---------- collection banner ---------- */
.banner { position: relative; height: clamp(240px, 38vw, 460px); margin: -10px calc(-1 * var(--gutter)) 28px; overflow: hidden; background: var(--c, #111); }
.banner img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 40%; }
.banner::after { content: ''; position: absolute; inset: 0; background: linear-gradient(to bottom, rgba(10, 10, 11, 0.6), transparent 28%, rgba(10, 10, 11, 0.55) 70%, var(--bg)); }
.banner-text { position: absolute; z-index: 1; left: var(--gutter); right: var(--gutter); bottom: 6px; }
.banner h1 { margin: 0 0 8px; font: italic 400 clamp(52px, 9vw, 120px)/0.92 var(--serif); letter-spacing: -0.02em; }
.banner .mono { color: rgba(255, 255, 255, 0.7); }
body[data-page='collection'] .bar, body[data-page='creator'] .bar { position: fixed; left: 0; right: 0; }

/* ---------- color swatches ---------- */
.swatches { display: flex; align-items: center; gap: 7px; padding: 0 4px 14px 8px; flex: none; }
.swatch {
  width: 14px; height: 14px; border-radius: 50%; background: var(--sw);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14);
  transition: transform 0.4s var(--ease-out), opacity 0.3s, box-shadow 0.3s;
}
.swatch:hover { transform: scale(1.3); }
.swatches.picking .swatch { opacity: 0.35; }
.swatches.picking .swatch[aria-pressed='true'] { opacity: 1; transform: scale(1.25); box-shadow: 0 0 0 2px var(--bg), 0 0 0 3.5px var(--fg); }

.btn.icon { width: 34px; padding: 0; justify-content: center; }

/* ---------- masonry grid ---------- */
main { padding: 10px var(--gutter) 0; }
.grid { position: relative; min-height: 60vh; }
.tile {
  position: absolute; left: 0; top: 0; display: block;
  will-change: transform;
}
.grid.animating .tile { transition: transform 0.9s var(--ease-out); }
.tile.gone { display: none; }
/* Parallax moves the picture (.par), not the link box: only the picture takes the pointer, so a box left
   behind can't steal the hover or click from the tile below it. Clicks still bubble to the link. */
.tile { pointer-events: none; }
.par { width: 100%; height: 100%; transform: translate3d(0, var(--py, 0px), 0); pointer-events: auto; }
.card {
  width: 100%; height: 100%;
  opacity: 0; transform: translate3d(0, 56px, 0) scale(0.96);
}
.card.in {
  opacity: 1; transform: none;
  transition: opacity 0.9s var(--ease-soft), transform 1.3s var(--ease-out);
  transition-delay: var(--d, 0ms);
}
.card.out {
  opacity: 0; transform: scale(0.92); transition: opacity 0.35s, transform 0.5s var(--ease-out);
  transition-delay: 0ms;
}
.tilt {
  position: relative; width: 100%; height: 100%; border-radius: var(--radius); overflow: hidden;
  background: var(--bg-2);
  transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) scale(var(--s, 1));
  transition: transform 0.7s var(--ease-out), box-shadow 0.7s var(--ease-out);
  box-shadow: 0 0 0 0 transparent;
}
.lq { position: absolute; inset: 0; background-size: cover; background-position: center; }
.tile picture, .tile img { position: absolute; inset: 0; width: 100%; height: 100%; }
.tile img {
  object-fit: cover; opacity: 0;
  transition: opacity 0.8s var(--ease-soft);
}
.tile img.ok { opacity: 1; }
.meta {
  position: absolute; inset: auto 0 0; padding: 36px 12px 10px; display: flex; align-items: flex-end; gap: 8px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.62), transparent);
  opacity: 0; transform: translateY(6px); transition: opacity 0.4s, transform 0.6s var(--ease-out);
}
.meta b { font: italic 400 19px/1.1 var(--serif); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.meta .mono { margin-left: auto; color: rgba(255, 255, 255, 0.7); white-space: nowrap; }
.new {
  position: absolute; top: 10px; left: 10px; display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 8px 3px 7px; border-radius: 999px; font: 500 10px/1.4 var(--mono); letter-spacing: 0.06em; text-transform: lowercase;
  background: rgba(10, 10, 11, 0.55); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); color: var(--fg);
}
.new::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: #fff; box-shadow: 0 0 8px #fff; animation: pulse 2.4s var(--ease-io) infinite; }
@keyframes pulse { 50% { opacity: 0.35; } }
/* Recolor dots: one per variant; each dot has a 16px hover target around a 9px swatch. */
.vars {
  position: absolute; top: 8px; right: 8px; display: flex; align-items: center; padding: 1px 3px; border-radius: 999px;
  background: rgba(10, 10, 11, 0.55); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); color: var(--fg);
}
.vars i { display: grid; place-items: center; width: 16px; height: 16px; }
.vars i::before {
  content: ''; width: 9px; height: 9px; border-radius: 50%; background: linear-gradient(135deg, var(--c) 50%, var(--c2, var(--c)) 50%);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.3); transition: transform 0.2s var(--ease-out), box-shadow 0.2s;
}
.vars i.on::before { box-shadow: 0 0 0 1.5px rgba(10, 10, 11, 0.9), 0 0 0 2.5px var(--fg); }
@media (any-hover: hover) and (any-pointer: fine) { .vars i:hover::before { transform: scale(1.3); } }
.vars b { font-weight: 400; font-size: 10px; padding: 0 4px 0 2px; color: rgba(255, 255, 255, 0.75); }
.lb-vars { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.lb-vars button {
  width: 46px; height: 30px; padding: 0; border-radius: 6px; overflow: hidden; background: var(--c);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.14); opacity: 0.6; transition: opacity 0.2s, transform 0.2s var(--ease-out), box-shadow 0.2s;
}
.lb-vars button:hover { opacity: 1; transform: translateY(-2px); }
.lb-vars button[aria-pressed='true'] { opacity: 1; box-shadow: 0 0 0 2px var(--bg), 0 0 0 3.5px var(--fg); }
.lb-vars img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ---------- hue shift ---------- */
/* Tile: a rainbow dot in the same pill as the recolor dots says "pick your color"; hovering that dot sweeps the hue. */
.vars .hue-dot::before { background: conic-gradient(hsl(0 85% 60%), hsl(60 85% 60%), hsl(120 85% 55%), hsl(180 85% 55%), hsl(240 85% 65%), hsl(300 85% 60%), hsl(360 85% 60%)); }
.vars .hue-dot:not(:last-child) { width: 20px; margin-right: 3px; border-right: 1px solid rgba(255, 255, 255, 0.18); }
@media (any-hover: hover) and (any-pointer: fine) and (prefers-reduced-motion: no-preference) {
  .tile.hue:has(.hue-dot:hover) img { animation: hue-sweep 5s linear infinite; }
}
@keyframes hue-sweep { from { filter: hue-rotate(0deg); } to { filter: hue-rotate(360deg); } }
/* Viewer: the slider recolors the picture and its glow; the download is recolored to match. */
.lb.hued .zm, .lb.hued .amb { filter: hue-rotate(var(--hue)); }
.lb-hue { display: flex; align-items: center; gap: 10px; margin-top: 12px; max-width: 360px; }
.lb-hue .hue-ring { position: static; flex: none; width: 16px; height: 16px; border-radius: 50%; background: conic-gradient(red, yellow, lime, cyan, blue, magenta, red); -webkit-mask: radial-gradient(circle, transparent 4px, #000 4.5px); mask: radial-gradient(circle, transparent 4px, #000 4.5px); }
.lb-hue input {
  flex: 1; min-width: 0; height: 6px; border-radius: 999px; appearance: none; -webkit-appearance: none; cursor: pointer;
  background: linear-gradient(90deg, hsl(0 70% 55%), hsl(60 70% 55%), hsl(120 70% 55%), hsl(180 70% 55%), hsl(240 70% 55%), hsl(300 70% 55%), hsl(360 70% 55%));
}
.lb-hue input::-webkit-slider-thumb { -webkit-appearance: none; width: 16px; height: 16px; border-radius: 50%; background: var(--fg); box-shadow: 0 0 0 3px rgba(10, 10, 11, 0.6); }
.lb-hue input::-moz-range-thumb { width: 16px; height: 16px; border: 0; border-radius: 50%; background: var(--fg); box-shadow: 0 0 0 3px rgba(10, 10, 11, 0.6); }
.lb-hue .mono { min-width: 34px; color: rgba(255, 255, 255, 0.7); }
.lb-hue button { color: rgba(255, 255, 255, 0.55); text-decoration: underline; text-underline-offset: 3px; }
.lb-hue button:hover { color: var(--fg); }

@media (any-hover: hover) and (any-pointer: fine) {
  .tile:hover .tilt {
    --s: 1.025;
    box-shadow: 0 30px 70px -22px color-mix(in srgb, var(--c) 75%, transparent), 0 0 0 1px rgba(255, 255, 255, 0.06);
    transition: transform 0.25s var(--ease-out), box-shadow 0.7s var(--ease-out);
  }
  .tile:hover .meta { opacity: 1; transform: none; }
}
.tile:focus-visible { outline: none; }
.tile:focus-visible .tilt { outline: 1px solid var(--fg); outline-offset: 3px; }
.tile.held .card { visibility: hidden; }

.empty[hidden] { display: none; }
.empty { display: grid; place-items: center; gap: 12px; text-align: center; padding: 18vh 0; color: var(--mute); }
.empty em { font: italic 44px/1 var(--serif); color: var(--fg); }

.foot {
  display: flex; flex-wrap: wrap; gap: 6px 18px; justify-content: space-between;
  padding: 80px var(--gutter) 36px; color: var(--dim);
}
.foot a { color: var(--mute); transition: color 0.3s; }
.foot a:hover { color: var(--fg); }

/* ---------- lightbox ---------- */
.lb { position: fixed; inset: 0; z-index: 50; overflow: hidden; touch-action: none; }
.lb[hidden] { display: none; }
.lb-amb { position: absolute; inset: 0; background: #070708; opacity: 0; }
.amb {
  position: absolute; inset: -20%; opacity: 0;
  background:
    radial-gradient(45% 50% at 18% 22%, var(--a0, #222), transparent 70%),
    radial-gradient(45% 50% at 82% 20%, var(--a1, #222), transparent 70%),
    radial-gradient(50% 55% at 20% 82%, var(--a2, #222), transparent 70%),
    radial-gradient(50% 55% at 80% 84%, var(--a3, #222), transparent 70%),
    var(--a4, #111);
  filter: blur(70px) saturate(1.35);
  transition: opacity 1.1s var(--ease-soft);
  animation: drift 26s var(--ease-io) infinite alternate;
}
.amb.on { opacity: 1; }
@keyframes drift {
  from { transform: rotate(0deg) scale(1); }
  to { transform: rotate(8deg) scale(1.12); }
}
.lb-shade { position: absolute; inset: 0; background: radial-gradient(120% 90% at 50% 45%, rgba(8, 8, 9, 0.35), rgba(8, 8, 9, 0.82)); }

.lb-stage { position: absolute; inset: 0; }
.fig {
  position: absolute; margin: 0; transform-origin: 0 0; will-change: transform, opacity;
  box-shadow: 0 40px 120px -30px rgba(0, 0, 0, 0.8);
  border-radius: 2px; overflow: hidden; background: #000;
}
.fig img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; user-select: none; -webkit-user-drag: none; }
.fig .hi { opacity: 0; transition: opacity 0.6s var(--ease-soft); }
.fig .hi.ok { opacity: 1; }
.fig .spin {
  position: absolute; right: 12px; bottom: 12px; width: 14px; height: 14px; border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.25); border-top-color: #fff; animation: spin 0.8s linear infinite;
  transition: opacity 0.3s;
}
.fig .spin { opacity: 0; }
.fig:not(.sharp) .spin, .fig.loading .spin { opacity: 1; }
.zm { position: absolute; inset: 0; transform-origin: 0 0; will-change: transform; }
.fig .full { opacity: 0; transition: opacity 0.5s var(--ease-soft); }
.fig .full.ok { opacity: 1; }
@media (any-hover: hover) and (any-pointer: fine) { .fig { cursor: zoom-in; } .lb.zoomed .fig { cursor: zoom-out; } }
.lb.zoomed .fig { overflow: visible; box-shadow: none; background: transparent !important; }
.lb.zoomed .lb-info, .lb.zoomed .lb-nav { opacity: 0 !important; pointer-events: none; transition: opacity 0.3s; }
@keyframes spin { to { transform: rotate(360deg); } }

.lb-close, .lb-nav {
  position: absolute; z-index: 2; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
  color: var(--fg); background: rgba(10, 10, 11, 0.35); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: background-color 0.25s, transform 0.5s var(--ease-out), opacity 0.4s;
}
.lb-close:hover, .lb-nav:hover { background: rgba(255, 255, 255, 0.12); }
.lb-close { top: 16px; right: 16px; }
.lb-nav { top: 50%; margin-top: -22px; }
.lb-nav.prev { left: 16px; } .lb-nav.next { right: 16px; }
.lb-nav.prev:hover { transform: translateX(-3px); } .lb-nav.next:hover { transform: translateX(3px); }
.lb-close svg, .lb-nav svg { width: 18px; height: 18px; }

.lb-info {
  position: absolute; z-index: 2; left: 0; right: 0; bottom: 0;
  display: flex; align-items: flex-end; gap: 20px; flex-wrap: wrap;
  padding: 18px 24px calc(20px + env(safe-area-inset-bottom));
}
.lb-text { min-width: 0; flex: 1; }
.lb-idx { color: rgba(255, 255, 255, 0.5); }
.lb-title { margin: 2px 0 2px; font: 400 32px/1.05 var(--serif); letter-spacing: -0.01em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-spec { margin: 0; color: rgba(255, 255, 255, 0.62); }
.lb-spec i { font-style: normal; color: rgba(255, 255, 255, 0.28); margin: 0 6px; }
.lb-actions { display: flex; gap: 8px; }
.lb-actions .btn.ghost { background: rgba(10, 10, 11, 0.3); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
.lb-chrome { opacity: 0; }
.lb.ready .lb-chrome { opacity: 1; transform: none; transition: opacity 0.6s var(--ease-soft) 0.15s, transform 0.8s var(--ease-out) 0.15s; }
.lb-info.lb-chrome { transform: translateY(14px); }
.lb.ready .lb-info.lb-chrome { transform: none; }
.lb.leaving .lb-chrome { opacity: 0; transition: opacity 0.25s; }
.lb.idle .lb-chrome { opacity: 0; transition: opacity 0.8s; }
.lb.idle { cursor: none; }
.swapin { animation: swap 0.6s var(--ease-out); }

/* ---------- first-visit tour: a spotlight that glides between four things, and a small card ---------- */
.tour { position: fixed; inset: 0; z-index: 45; pointer-events: none; animation: tour-in 0.35s ease-out; transition: opacity 0.22s ease-in; }
.tour.out { opacity: 0; }
@keyframes tour-in { from { opacity: 0; } }
.tour-hole {
  position: fixed; border-radius: 10px; pointer-events: auto; cursor: pointer;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.55), 0 0 0 200vmax rgba(6, 6, 7, 0.62);
  transition: left 0.45s var(--ease-out), top 0.45s var(--ease-out), width 0.45s var(--ease-out), height 0.45s var(--ease-out);
}
.tour-card {
  position: fixed; width: min(300px, calc(100vw - 24px)); padding: 14px 16px 12px; border-radius: 16px; pointer-events: auto;
  background: rgba(24, 24, 27, 0.92); border: 1px solid var(--line-2); box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.8);
  -webkit-backdrop-filter: blur(24px); backdrop-filter: blur(24px);
  transition: left 0.45s var(--ease-out), top 0.45s var(--ease-out);
}
.tour-card h3 { margin: 4px 0 4px; font: italic 400 24px/1.1 var(--serif); }
.tour-card p { margin: 0 0 12px; color: var(--mute); font-size: 13.5px; line-height: 1.45; }
.tour-acts { display: flex; justify-content: flex-end; gap: 6px; }
.tour-acts .btn { height: 30px; padding: 0 14px; }
@keyframes swap { from { opacity: 0; transform: translateY(8px); } }

/* ---------- intro ---------- */
.intro {
  position: fixed; inset: 0; z-index: 60; background: var(--bg); display: grid; place-items: center; overflow: hidden;
  cursor: pointer;
}
.intro-img {
  position: absolute; inset: 0; background-size: cover; background-position: center;
  clip-path: inset(50% 50% 50% 50%); transform: scale(1.25); filter: brightness(0.55) saturate(1.1);
}
.intro-word { position: relative; text-align: center; }
.intro-word .w { display: inline-block; overflow: hidden; vertical-align: bottom; padding: 0 0.04em 0.12em; }
.intro-word .w > span { display: inline-block; transform: translateY(110%); }
.intro-title { font: 400 clamp(56px, 11vw, 168px)/0.95 var(--serif); letter-spacing: -0.02em; margin: 0; }
.intro-title .w:last-child { font-style: italic; }
.intro-meta { margin-top: 18px; display: flex; justify-content: center; gap: 14px; color: var(--mute); opacity: 0; }
.intro-line { position: absolute; left: 0; bottom: 0; height: 1px; width: 100%; background: var(--fg); transform: scaleX(0); transform-origin: 0 50%; opacity: 0.5; }

/* ---------- misc ---------- */
.toast {
  position: fixed; left: 50%; bottom: 28px; z-index: 70; transform: translate(-50%, 20px); opacity: 0;
  padding: 9px 14px; border-radius: 999px; background: var(--fg); color: #0a0a0b; font-size: 13px; font-weight: 500;
  transition: opacity 0.3s, transform 0.5s var(--ease-out); pointer-events: none;
}
.toast.on { opacity: 1; transform: translate(-50%, 0); }
.noscript { padding: 40px var(--gutter); color: var(--mute); }

@media (max-width: 640px) {
  .swatch { width: 20px; height: 20px; }
  .mark { font-size: 26px; }
  .bar.scrolled .mark { font-size: 22px; }
  /* The bar has no room for both: the logo keeps "egor's" and the tabs finish the phrase. */
  .mark em { display: none; }
  .bar-row { gap: 10px; }
  .actions { gap: 4px; }
  .tabs { gap: 5px; font-size: 11px; letter-spacing: 0; }
  .cgrid, .cgrid.by { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .cover b { left: 10px; right: 30px; bottom: 9px; font-size: 19px; }
  .cover .mono { right: 9px; bottom: 10px; }
  .colls h1 { font-size: 26px; }
  .wall-head h2 { font-size: 26px; }
  .spot { padding-top: 10px; }
  .spot-hits { grid-template-columns: repeat(2, 1fr); }
  .spot-foot > span:last-child { display: none; }
  .spot-q input { font-size: 17px; }
  .lb-nav { display: none; }
  .lb-title { font-size: 26px; }
  .lb-info { gap: 14px; padding: 14px 16px calc(16px + env(safe-area-inset-bottom)); }
  .lb-actions { width: 100%; }
  .lb-actions .btn { flex: 1; justify-content: center; }
  .lb-close { top: 12px; right: 12px; }
}

@media (max-width: 374px) { .tabs span { display: none; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; transition-delay: 0ms !important; }
  .card { opacity: 1; transform: none; clip-path: none; }
  .tilt { transform: none !important; }
}

.empty .btn { margin-top: 6px; }

/* ---------- viewer: credit, collection ---------- */
.lb-credit { margin: 4px 0 0; font-size: 13px; color: rgba(255, 255, 255, 0.75); }
.lb-credit a { color: var(--fg); text-decoration: underline; text-underline-offset: 3px; }
.lb-coll { margin-left: 12px; color: rgba(255, 255, 255, 0.5); text-decoration: underline; text-underline-offset: 3px; transition: color 0.2s; }
.lb-coll:hover { color: var(--fg); }

/* ---------- wallpaper page without JavaScript (and for crawlers) ---------- */
.js .still { display: none; }
.still { display: grid; gap: 10px; justify-items: start; padding-bottom: 40px; }
.still img { width: 100%; height: auto; border-radius: var(--radius); }
.still h1 { margin: 12px 0 0; font: 400 40px/1 var(--serif); }
.still p { margin: 0; color: var(--mute); }
.still a { color: var(--fg); text-decoration: underline; text-underline-offset: 3px; }

/* ---------- about overlay: holo card left, text right ---------- */
.about {
  width: min(1080px, calc(100% - 32px)); height: min(740px, calc(100% - 32px)); max-width: none; max-height: none;
  padding: 0; border: 1px solid var(--line-2); border-radius: 24px; overflow: hidden;
  background: rgba(17, 17, 19, 0.92); color: var(--fg);
  box-shadow: 0 60px 160px -40px rgba(0, 0, 0, 0.95), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}
.about[open] { animation: about-in 0.34s var(--ease-out); }
/* Leaving is quicker than arriving. */
.about.closing { animation: about-out 0.19s ease-in forwards; }
.about.closing::backdrop { animation: fade-out 0.19s ease-in forwards; }
@keyframes about-out { to { opacity: 0; transform: translateY(8px) scale(0.98); } }
@keyframes fade-out { to { opacity: 0; } }
.about::backdrop { background: rgba(6, 6, 7, 0.55); -webkit-backdrop-filter: blur(14px) saturate(1.2); backdrop-filter: blur(14px) saturate(1.2); animation: fade 0.24s ease-out; }
@keyframes about-in { from { opacity: 0; transform: translateY(14px) scale(0.97); } }
@keyframes fade { from { opacity: 0; } }
.about-x { position: absolute; top: 14px; right: 14px; z-index: 3; background: rgba(10, 10, 11, 0.5); }
.about-in { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); height: 100%; }
.about-card {
  display: grid; place-items: center; padding: 40px; overflow: hidden;
  background: radial-gradient(80% 70% at 50% 45%, color-mix(in srgb, var(--hc-c, #333) 32%, transparent), transparent 70%);
  border-right: 1px solid var(--line); transition: background 0.6s;
}
.about-text { overflow: auto; overscroll-behavior: contain; padding: 40px 48px 28px; display: grid; gap: 20px; align-content: start; }
.about-title { margin: 0; font: 400 42px/1 var(--serif); letter-spacing: -0.01em; }
.about-title em { color: var(--mute); }
.about-text section { display: grid; gap: 8px; }
.about-text h3 { margin: 0; color: var(--mute); font-weight: 400; }
.about-text p { margin: 0; font-size: 15px; line-height: 1.6; color: rgba(236, 235, 232, 0.86); max-width: 58ch; }
.about-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.about-panels { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); margin-top: 2px; padding-top: 20px; border-top: 1px solid var(--line); }
.about-panel { align-content: start; padding: 16px; border-radius: 16px; border: 1px solid var(--line-2); background: rgba(255, 255, 255, 0.03); }
.about-text .about-panel p { font-size: 14px; }
.about-row .btn .mono { margin-left: 2px; }
.soon { color: var(--mute); border-style: dashed; cursor: default; }
.soon:hover { background: none !important; }

/* The card: pointer position → tilt, shine and glare (all through CSS variables set by app.js). */
.hc {
  --mx: 50%; --my: 50%; --rx: 0deg; --ry: 0deg; --bx: 50%; --by: 50%; --o: 0;
  --holo: repeating-linear-gradient(115deg, hsl(350 100% 78%) 0%, hsl(45 100% 72%) 5%, hsl(150 90% 70%) 10%, hsl(195 100% 74%) 15%, hsl(275 100% 80%) 20%, hsl(350 100% 78%) 25%);
  width: min(340px, 100%); aspect-ratio: 0.716; perspective: 900px; container-type: inline-size; touch-action: none; cursor: grab;
}
.hc-rot {
  position: relative; width: 100%; height: 100%; border-radius: 4.5% / 3.3%; overflow: hidden; isolation: isolate;
  transform: rotateY(var(--ry)) rotateX(var(--rx)); transform-style: preserve-3d; will-change: transform;
  box-shadow: 0 30px 70px -20px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(255, 255, 255, 0.12),
    0 0 calc(40px * var(--o)) calc(-4px + 6px * var(--o)) color-mix(in srgb, var(--hc-c, #fff) 70%, transparent);
}
.hc-front, .hc-shine, .hc-glare { position: absolute; inset: 0; }
.hc-front { background: var(--hc-c, #111); }
.hc-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transform: scale(1.06); transform-origin: var(--mx) var(--my); }
.hc-frame {
  position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: space-between; padding: 7%;
  background: linear-gradient(rgba(0, 0, 0, 0.55), transparent 26%, transparent 52%, rgba(0, 0, 0, 0.82));
}
.hc-border { position: absolute; inset: 3.2%; border-radius: 3% / 2.2%; border: 1px solid rgba(255, 255, 255, 0.4); pointer-events: none; }
.hc-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.hc-head b { font: 400 7.6cqw/1 var(--serif); white-space: nowrap; }
.hc .mono { font-size: 3.2cqw; white-space: nowrap; }
.hc-head em { color: rgba(255, 255, 255, 0.72); }
.hc-head .mono { color: rgba(255, 255, 255, 0.7); }
.hc-foot { display: grid; gap: 10px; }
.hc-pic { color: rgba(255, 255, 255, 0.7); font-style: italic; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hc-stats { display: grid; grid-template-columns: repeat(3, 1fr); padding: 10px 0; border-top: 1px solid rgba(255, 255, 255, 0.28); border-bottom: 1px solid rgba(255, 255, 255, 0.28); }
.hc-stats span { display: grid; gap: 2px; text-align: center; }
.hc-stats span + span { border-left: 1px solid rgba(255, 255, 255, 0.18); }
.hc-stats b { font: 400 7.6cqw/1 var(--serif); }
.hc-stats i { font-style: normal; font-size: 2.6cqw; color: rgba(255, 255, 255, 0.65); text-transform: uppercase; letter-spacing: 0.08em; }
.hc-url { text-align: center; color: rgba(255, 255, 255, 0.55); letter-spacing: 0.12em; }
/* Holo foil only on the card's details, never on the art: rainbow bands slide against the pointer.
   Lines and edges: .hc-shine, masked by app.js to thin strips measured from the layout.
   Letters: .hc-foil, a copy of the frame whose text is cut out of the same gradient. */
.hc-shine, .hc-foil { background: var(--holo); background-size: 300% 300%; background-position: var(--bx) var(--by); }
.hc-shine { -webkit-mask: linear-gradient(transparent 0 0); mask: linear-gradient(transparent 0 0); opacity: calc(0.55 + var(--o) * 0.45); }
.hc-foil { -webkit-background-clip: text; background-clip: text; opacity: calc(0.3 + var(--o) * 0.65); pointer-events: none; }
.hc-foil, .hc-foil * { color: transparent !important; border-color: transparent !important; }
.hc-glare {
  background: radial-gradient(farthest-corner circle at var(--mx) var(--my), rgba(255, 255, 255, 0.75) 6%, rgba(255, 255, 255, 0.25) 30%, rgba(0, 0, 0, 0.45) 95%);
  mix-blend-mode: overlay; opacity: calc(0.08 + var(--o) * 0.35);
}

@media (max-width: 760px) {
  .about { height: calc(100% - 24px); width: calc(100% - 16px); border-radius: 20px; }
  .about-in { display: block; height: 100%; overflow: auto; overscroll-behavior: contain; }
  .about-card { padding: 44px 24px 8px; border-right: 0; }
  .hc { width: min(250px, 68vw); }
  .about-text { overflow: visible; padding: 24px 22px 32px; gap: 22px; }
  .about-title { font-size: 36px; }
}
@media (prefers-reduced-motion: reduce) { .hc { cursor: default; } }

/* ---------- motion details ---------- */
/* Between pages: a collection's cover grows into that collection's banner (Chrome, Edge, Safari 18.2+; other browsers just load the page). */
@view-transition { navigation: auto; }
::view-transition-group(*) { animation-duration: 0.42s; animation-timing-function: var(--ease-out); }
::view-transition-old(*), ::view-transition-new(*) { height: 100%; object-fit: cover; }
@media (prefers-reduced-motion: reduce) { @view-transition { navigation: none; } }

/* Banner and cover pictures fade in like the tiles instead of popping. */
.banner img, .cover img { transition: opacity 0.7s var(--ease-soft), transform 1.1s var(--ease-out); }
.js .banner img:not(.ok), .js .cover img:not(.ok) { opacity: 0; transform: scale(1.04); }

/* Labels and icons that change: every state stacked in one cell (the button keeps its size), crossfading with a short roll. */
.swap { display: inline-grid; align-items: center; justify-items: start; }
.swap.ico { justify-items: center; }
.swap > * { grid-area: 1 / 1; transition: opacity 0.2s var(--ease-out), transform 0.32s var(--ease-out), filter 0.2s var(--ease-out); }
.swap > :not(.on) { opacity: 0; transform: translateY(55%) scale(0.96); filter: blur(3px); pointer-events: none; }
.swap.ico > :not(.on) { transform: scale(0.4) rotate(-40deg); }

/* Icons: a small reaction on hover (mouse only) and a squeeze on press. */
.btn svg, .lb-close svg, .lb-nav svg, .dl-arrow, .arr { transition: transform 0.35s var(--ease-out); }
.dl-arrow { transform-box: fill-box; transform-origin: center; }
@media (any-hover: hover) and (any-pointer: fine) {
  #aboutBtn:hover svg { transform: scale(1.14); }
  .lb-close:hover svg, .about-x:hover svg { transform: rotate(90deg); }
  #copy:hover .swap.ico > .on { transform: rotate(-18deg); }
  #dl:hover .dl-arrow { transform: translateY(1.5px); }
  .about-row a:hover .arr { transform: translate(2px, -2px); }
}
.btn.icon:active svg, .lb-close:active svg, .lb-nav:active svg { transform: scale(0.86); transition-duration: 0.12s; }
/* One-off click animations (app.js adds .kick). */
#aboutBtn.kick svg { animation: beat 0.5s var(--ease-out); }
#shuffle.kick svg { animation: spin-once 0.6s var(--ease-out); }
#searchBtn.kick svg { animation: pop 0.35s var(--ease-out); }
#dl.kick .dl-arrow { animation: drop 0.6s var(--ease-out); }
@keyframes beat { 30% { transform: scale(1.32); } 60% { transform: scale(0.94); } }
@keyframes spin-once { to { transform: rotate(360deg); } }
@keyframes pop { 40% { transform: scale(1.25); } }
@keyframes drop { 35% { transform: translateY(5px); opacity: 0; } 36% { transform: translateY(-6px); opacity: 0; } }
.arr { width: 14px; height: 14px; }

/* ---------- show more ---------- */
.load-more { display: flex; justify-content: center; padding: 48px 0 8px; }
.load-more .btn { height: 44px; padding: 0 22px; gap: 10px; }
.load-more .swap { min-width: 7ch; justify-items: end; }
.lm-arrow { transform-box: fill-box; transform-origin: center; transition: transform 0.35s var(--ease-out); }
@media (any-hover: hover) and (any-pointer: fine) { .load-more .btn:hover .lm-arrow { transform: translateY(2px); } }
.load-more .kick .lm-arrow { animation: drop 0.6s var(--ease-out); }

/* Low-power mode (set by the scroll-speed probe in app.js): no blur, clip, blend, backdrop or tilt. */
.lite .lq, .lite .tile img { filter: none; }
.lite .tile img { transform: none; }
.lite .card, .lite .card.in { clip-path: none; }
.lite .tile, .lite .par { will-change: auto; }
.lite .tilt { transform: none !important; }
.lite .bar.scrolled, .lite .new, .lite .vars, .lite .lb-actions .btn, .lite .lb-actions .btn.ghost { -webkit-backdrop-filter: none; backdrop-filter: none; }
.lite .bar.scrolled { background: rgba(10, 10, 11, 0.94); }
.lite .amb { filter: none; animation: none; }
