/* wallls-next — оновлення, що відштовхується від ІСНУЮЧОГО wallls.com:
   Nunito, бірюзові кнопки й теги #78c1bc, коралова «lll» і кнопка скачування #cc8b76,
   мозаїка тегів, кружечки кольорів, розкладка сторінки обоїв — як були.
   Виконання стримане (як px-lab): картинки головні, інтерфейс — тиха рамка.
   Світла тема — як оригінал; темна — палітра px-lab, за системною темою. */
:root {
  --bg: #fafafa;
  --card: #ffffff;
  --ink: #121212;
  --ink-2: #585858;
  --muted: #8f8f8f;
  --line: #ececec;
  --field: #f3f3f3;
  --teal: #78c1bc;
  --teal-dark: #5aa7a1;
  --coral: #cc8b76;
  --wrap: 1280px;
  --row: 210px;
  --font: "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1115; --card: #171a21; --ink: #e6e8ee; --ink-2: #b9bfcc; --muted: #8a93a6;
    --line: #262b36; --field: #1d212a; --teal-dark: #8fd3ce; color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html, body { background: var(--bg); }
body { margin: 0; color: var(--ink); font: 400 15px/1.5 var(--font); }
a { color: inherit; }
img { max-width: 100%; display: block; }
.sr, .skip:not(:focus) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.skip:focus { position: fixed; top: 8px; left: 8px; z-index: 50; background: var(--ink); color: var(--bg); padding: 8px 12px; }
:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.muted { color: var(--muted); }

/* ── кнопки ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--teal); color: #fff; font: 700 14px/16px var(--font); text-decoration: none;
  padding: 9px 14px; border: 0; border-radius: 6px; cursor: pointer;
}
.btn:hover { filter: brightness(1.06); }
.btn.ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }
.btn.ghost:hover { box-shadow: inset 0 0 0 1px var(--teal); filter: none; }
.btn-download { background: var(--coral); font-size: 16px; padding: 14px 16px; width: 100%; }
.btn-download .res-num { font-weight: 600; opacity: .9; }

/* ── шапка ── */
.nav { background: color-mix(in srgb, var(--card) 94%, transparent); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line); position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; }
.nav .wrap { display: flex; align-items: center; gap: 18px; height: 60px; }
.logo { font: 800 21px/1 var(--font); text-decoration: none; color: var(--ink); white-space: nowrap; letter-spacing: -.01em; }
.logo b { color: var(--coral); font-weight: 800; }
.search { flex: 1; max-width: 560px; }
.search input {
  width: 100%; font: inherit; color: var(--ink); background: var(--field); border: 1px solid transparent;
  border-radius: 6px; padding: 9px 12px;
}
.search input::placeholder { color: var(--muted); }
.search input:focus { background: var(--card); border-color: var(--teal); outline: none; }
.menu { display: flex; align-items: center; gap: 14px; margin-left: auto; font-weight: 700; font-size: 14px; }
.menu > a { text-decoration: none; color: var(--ink-2); }
.menu > a:hover { color: var(--ink); }
.screen-chip {
  display: inline-flex; align-items: center; gap: 7px; font: 700 13px var(--font); color: var(--ink-2);
  background: var(--field); border: 0; border-radius: 6px; padding: 8px 10px; cursor: pointer;
}
.screen-chip:hover { color: var(--ink); }
.screen-chip svg { width: 16px; height: 13px; }
.account { display: flex; gap: 8px; align-items: center; }
.me { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; font-weight: 700; }
.me .avatar { width: 30px; height: 30px; font-size: 14px; line-height: 30px; }

.screen-panel {
  position: fixed; right: 16px; top: 68px; z-index: 30; width: min(330px, calc(100vw - 32px));
  background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 14px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, .14);
}
.sp-lead { margin: 0 0 8px; color: var(--muted); font-size: 13px; }
.sp-list { display: grid; gap: 2px; margin-bottom: 12px; }
.sp-list button {
  display: flex; justify-content: space-between; width: 100%; text-align: left; cursor: pointer; font: inherit;
  background: transparent; border: 0; border-radius: 6px; padding: 7px 10px; color: var(--ink);
}
.sp-list button:hover { background: var(--field); }
.sp-list button[aria-current="true"] { background: color-mix(in srgb, var(--teal) 18%, transparent); }
.sp-list .res-num { color: var(--ink-2); font-variant-numeric: tabular-nums; }
.sp-custom, .screen-add { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: 13px; color: var(--muted); }
.sp-custom input, .screen-add input {
  font: inherit; color: var(--ink); background: var(--field); border: 1px solid transparent; border-radius: 6px; padding: 7px 9px;
}
.sp-save { margin-top: 10px; width: 100%; }

/* ── головна ── */
.hero { text-align: center; padding: 42px 0 24px; }
.hero h1 { font: 800 clamp(28px, 3.6vw, 44px)/1.15 var(--font); margin: 0 0 8px; letter-spacing: -.01em; }
.hero p { margin: 0; color: var(--muted); font-size: 17px; }

/* мозаїка тегів як в оригіналі: великий тайл + малі, білий підпис зверху зліва */
.mosaic { list-style: none; padding: 0; display: grid; gap: 10px; grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 168px; grid-auto-flow: dense; margin: 0 0 10px; }
.mosaic li { position: relative; border-radius: 10px; overflow: hidden; background: var(--line); }
.mosaic li.big { grid-column: span 2; grid-row: span 2; }
.mosaic li.wide { grid-column: span 2; }
.mosaic a { position: absolute; inset: 0; text-decoration: none; }
.mosaic img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.mosaic a:hover img { transform: scale(1.03); }
.mosaic a::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0, 0, 0, .42), rgba(0, 0, 0, 0) 50%); }
.photo-title { position: absolute; top: 0; left: 0; right: 0; z-index: 2; padding: 14px 18px; color: #fff; font: 800 21px/1.2 var(--font); }
.big .photo-title { font-size: 30px; padding: 20px 24px; }
.photo-title span { display: block; font: 600 14px var(--font); opacity: .85; }
.photo-title .day-badge { display: table; font: 800 12px var(--font); background: var(--coral); color: #fff; border-radius: 4px; padding: 3px 8px; margin-bottom: 8px; }
.mosaic .day-dl { position: absolute; inset: auto auto 20px 24px; z-index: 3; width: auto; padding: 11px 16px; font-size: 15px; }
.mosaic .day-dl::after { display: none; }

.section { padding: 22px 0; }
.section-title { font: 800 24px/1.2 var(--font); margin: 0 0 14px; }
.section-title span { color: var(--muted); font-weight: 600; font-size: 16px; margin-left: 6px; }

/* кольори */
.colors-card { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 18px 22px;
  display: flex; flex-wrap: wrap; align-items: center; gap: 14px 30px; }
.colors-card h2 { font: 800 19px var(--font); margin: 0; }
.colors-card p { margin: 2px 0 0; color: var(--muted); font-size: 14px; }
.colors-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 9px; }
.color-item { border-radius: 50%; box-shadow: 0 0 0 1px var(--line); }
.color-item a { display: block; width: 42px; height: 42px; border-radius: 50%; border: 3px solid var(--card); background: var(--c); transition: transform .15s; }
.color-item a:hover { transform: scale(1.08); }
.colors.small .color-item a { width: 30px; height: 30px; }

/* піксельна стрічка */
.pixel-strip { list-style: none; margin: 0; padding: 0 0 6px; display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; }
.pixel-strip li { flex: 0 0 min(340px, 78vw); scroll-snap-align: start; }
.pixel-strip a { text-decoration: none; }
.pixel-strip img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; image-rendering: pixelated; border-radius: 10px; }
.pixel-strip span { display: block; font-size: 14px; padding-top: 6px; color: var(--ink-2); }
.crisp { image-rendering: pixelated; }

/* ── сітка обоїв: регулярна, як в оригіналі — однакові мініатюри 16:10, роздільність під фото ── */
.sheet { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px 12px;
  grid-template-columns: repeat(auto-fill, minmax(min(250px, 42vw), 1fr)); }
.tile { min-width: 0; }
.tile > a { display: block; border-radius: 10px; overflow: hidden; background: var(--line); }
.tile img { width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; transition: transform .4s ease; }
.tile > a:hover img { transform: scale(1.03); }
.tile-meta { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 6px 2px 0; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.fit { display: none; color: var(--teal-dark); font-weight: 700; }
.tile.fits .fit { display: inline; }
body.fits-only .tile:not(.fits) { display: none; }

/* ── заголовок списку ── */
.listhead { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 16px; padding: 28px 0 18px; }
.listhead h1 { font: 800 30px/1.2 var(--font); margin: 0; display: flex; align-items: center; gap: 10px; text-transform: capitalize; }
.listhead .count { margin: 0; color: var(--muted); }
.listhead .filters { margin-left: auto; }
.toggle { display: inline-flex; gap: 8px; align-items: center; color: var(--ink-2); cursor: pointer; font-size: 14px; font-weight: 600; }
.toggle input { accent-color: var(--teal); width: 16px; height: 16px; }
.sw { width: 26px; height: 26px; border-radius: 50%; background: var(--c); border: 3px solid var(--card); box-shadow: 0 0 0 1px var(--line); }
.empty { color: var(--ink-2); max-width: 70ch; padding: 10px 0 30px; }
.pager { display: flex; flex-wrap: wrap; gap: 6px; padding: 28px 0 0; }
.pager a { min-width: 38px; text-align: center; padding: 7px 10px; border-radius: 6px; background: var(--card); border: 1px solid var(--line); text-decoration: none; font-weight: 700; }
.pager a[aria-current] { background: var(--teal); border-color: var(--teal); color: #fff; }

/* ── сторінка обоїв: фото зліва, інфо справа (як в оригіналі) ── */
.photo-header { font: 800 24px/1.3 var(--font); margin: 0 0 12px; }
.photo-header::first-letter { text-transform: uppercase; }
.photo-page { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 32px; align-items: start; padding-top: 24px; }
.devices { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.devices button {
  font: 700 13px var(--font); cursor: pointer; color: var(--ink-2); background: var(--card);
  border: 1px solid var(--line); border-radius: 6px; padding: 6px 12px;
}
.devices button[aria-selected="true"] { background: var(--teal); border-color: var(--teal); color: #fff; }
.photo-block { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 18px; }
.frame { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.frame img { width: min(100%, calc((100vh - 250px) * var(--ar, 1.7778))); height: auto; aspect-ratio: var(--ar, 16 / 9); object-fit: cover; border-radius: 6px; background: var(--line); }
.frame.phone img { border-radius: 26px; box-shadow: 0 0 0 9px #1d1d1f; margin: 9px; }
.frame.tablet img { border-radius: 16px; box-shadow: 0 0 0 11px #1d1d1f; margin: 11px; }
.frame figcaption { color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.photo-info { position: sticky; top: 80px; display: flex; flex-direction: column; gap: 10px; }
.fit-line { margin: -4px 0 0; color: var(--muted); font-size: 13px; }
.photo-desc { margin: 0 0 14px; line-height: 1.55; }
.photo-meta { display: grid; grid-template-columns: minmax(170px, 1fr) minmax(0, 2fr) minmax(0, 1.2fr); gap: 18px 28px; margin-top: 18px; }
.photo-meta .small-title { margin: 0 0 8px; }

/* розділена кнопка: [⤓ Download wallpaper | 1920 × 1080 ▾] */
.dl-split { position: relative; display: flex; border-radius: 8px; background: var(--coral); color: #fff;
  box-shadow: 0 1px 0 rgba(0, 0, 0, .06), 0 6px 16px color-mix(in srgb, var(--coral) 28%, transparent); }
.dl-main { flex: 1; min-width: 0; display: inline-flex; align-items: center; gap: 9px; padding: 13px 14px 13px 16px;
  color: inherit; text-decoration: none; font: 800 15px/1.2 var(--font); white-space: nowrap; border-radius: 8px 0 0 8px; }
.dl-main svg { width: 18px; height: 18px; flex: none; }
.dl-size { display: inline-flex; align-items: center; gap: 7px; padding: 0 12px 0 13px; cursor: pointer;
  background: rgba(0, 0, 0, .1); color: inherit; border: 0; border-left: 1px solid rgba(255, 255, 255, .28);
  border-radius: 0 8px 8px 0; font: 700 14px var(--font); font-variant-numeric: tabular-nums; white-space: nowrap; }
.dl-size svg { width: 12px; height: 12px; transition: transform .15s; }
.dl-size[aria-expanded="true"] svg { transform: rotate(180deg); }
.dl-main:hover, .dl-size:hover { background: rgba(255, 255, 255, .12); }
.dl-size:hover { background: rgba(0, 0, 0, .04); }
.dl-main:focus-visible, .dl-size:focus-visible { outline: 2px solid var(--ink); outline-offset: -3px; }
.dl-menu { position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 15; max-height: min(430px, 70vh); overflow-y: auto;
  background: var(--card); color: var(--ink); border: 1px solid var(--line); border-radius: 10px; padding: 6px;
  box-shadow: 0 18px 44px rgba(0, 0, 0, .18); }
.dl-group { margin: 8px 8px 4px; font: 800 11px var(--font); color: var(--muted); letter-spacing: .02em; }
.dl-group:first-child { margin-top: 4px; }
.dl-menu ul { list-style: none; margin: 0; padding: 0; display: grid; }
.dl-menu a, .dl-menu button { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 7px 8px; border: 0; border-radius: 6px; background: none; color: inherit; font: 600 14px var(--font);
  text-decoration: none; text-align: left; cursor: pointer; font-variant-numeric: tabular-nums; }
.dl-menu a:hover, .dl-menu button:hover, .dl-menu a:focus-visible, .dl-menu button:focus-visible { background: var(--field); outline: none; }
.dl-dev { color: var(--muted); font-weight: 600; font-size: 13px; }
.dl-menu [aria-checked="true"] { background: color-mix(in srgb, var(--coral) 14%, transparent); }
.dl-menu [aria-checked="true"] .res-num::before { content: "✓ "; color: var(--coral); }
.dl-foot { margin: 6px 8px 2px; padding-top: 6px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.dl-meta { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 22px; }
.dl-meta .fit-line { margin: 0; }
.fav { flex: none; display: inline-flex; align-items: center; gap: 5px; background: none; border: 0; padding: 2px 0; cursor: pointer;
  font: 700 13px var(--font); color: var(--muted); white-space: nowrap; }
.fav span[aria-hidden] { font-size: 16px; line-height: 1; }
.fav:hover, .fav.on { color: var(--coral); }
.small-title { font: 800 14px var(--font); margin: 8px 0 0; }
.details { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; margin: 0; font-size: 14px; }
.details dt { color: var(--muted); } .details dd { margin: 0; font-variant-numeric: tabular-nums; white-space: nowrap; }
.keywords-block { display: flex; flex-wrap: wrap; gap: 5px; margin: 0; }
.tag { padding: 4px 9px; background: var(--teal); color: #fff; font-size: 13px; line-height: 16px; border-radius: 4px; text-decoration: none; transition: background .2s; }
.tag:hover { background: #5aa7a1; }
.more-title { font: 800 clamp(26px, 3vw, 36px)/1.2 var(--font); text-align: center; margin: 48px 0 24px; }

/* ── вхід / реєстрація ── */
.auth { max-width: 380px; margin: 0 auto; padding: 56px 0 40px; text-align: center; }
.auth h1 { font: 800 30px var(--font); margin: 0 0 6px; }
.auth-why { color: var(--muted); margin: 0 0 24px; }
.auth-form { display: grid; gap: 14px; text-align: left; }
.auth-form label { display: grid; gap: 6px; font-size: 14px; color: var(--ink-2); font-weight: 700; }
.auth-form input { font: inherit; font-size: 16px; color: var(--ink); padding: 11px 12px; background: var(--field); border: 1px solid transparent; border-radius: 6px; }
.auth-form input:focus { background: var(--card); border-color: var(--teal); outline: none; }
.auth-form .btn { padding: 12px; font-size: 16px; margin-top: 4px; }
.auth-switch { color: var(--muted); margin-top: 18px; }
.auth-switch a { color: var(--ink); font-weight: 700; }
.error { background: #fef1ef; border: 1px solid #f3c6bd; color: #a3402e; padding: 10px 12px; border-radius: 6px; text-align: left; }

/* ── профіль ── */
.profile { padding: 30px 0 10px; }
.p-head { display: flex; align-items: center; gap: 16px; }
.avatar { display: inline-block; width: 56px; height: 56px; border-radius: 50%; background: var(--teal); color: #fff; font: 800 24px/56px var(--font); text-align: center; text-transform: uppercase; }
.p-head h1 { font: 800 28px var(--font); margin: 0; }
.p-head form { margin-left: auto; }
.profile h2 { font: 800 19px var(--font); margin: 30px 0 10px; }
.profile h2 span { color: var(--muted); font-weight: 600; font-size: 15px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 16px; }
.screens-list { list-style: none; padding: 0; margin: 0 0 14px; display: grid; gap: 8px; }
.screens-list li { display: flex; gap: 12px; align-items: center; font-variant-numeric: tabular-nums; }
.screens-list b { min-width: 110px; }
.link { background: none; border: 0; color: var(--muted); cursor: pointer; font: inherit; text-decoration: underline; padding: 0; }
.dl-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.dl-list li { display: flex; gap: 14px; align-items: center; font-variant-numeric: tabular-nums; }
.dl-list img { width: 120px; border-radius: 6px; }

/* ── футер як в оригіналі ── */
.footer { margin-top: 48px; background: var(--card); border-top: 1px solid var(--line); }
.footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; padding-top: 24px; padding-bottom: 24px; }
.footer p { margin: 0; font-size: 14px; color: var(--ink-2); }
.footer .count b { font-size: 22px; color: var(--ink); }
.footer-links { text-align: center; padding: 0 0 calc(24px + env(safe-area-inset-bottom, 0px)); font-size: 13px; }
.footer-links a { margin: 0 10px; color: var(--muted); }

@media (max-width: 900px) {
  .nav .wrap { flex-wrap: wrap; height: auto; padding-top: 10px; padding-bottom: 10px; gap: 10px; }
  .search { order: 3; flex-basis: 100%; max-width: none; }
  .menu { gap: 10px; } .menu > .tags-link { display: none; }
  .mosaic { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 128px; }
  .photo-page { grid-template-columns: 1fr; }
  .photo-info { position: static; }
  .photo-meta { grid-template-columns: 1fr; }
  .photo-title { font-size: 17px; padding: 10px 12px; } .big .photo-title { font-size: 22px; padding: 14px 16px; }
  .mosaic .day-dl { inset: auto auto 12px 14px; }
}
@media (prefers-reduced-motion: reduce) { .mosaic img, .tile img { transition: none; } }

/* картки-перехресні посилання: обої ↔ піксель-версія */
.px-card { display: grid; grid-template-columns: 112px minmax(0, 1fr) 16px; gap: 12px; align-items: center; padding: 8px 12px 8px 8px;
  border: 1px solid var(--line); border-radius: 10px; background: var(--card); color: inherit; text-decoration: none;
  transition: border-color .15s, box-shadow .15s; }
.px-card:hover { border-color: var(--teal); box-shadow: 0 6px 18px rgba(0, 0, 0, .06); }
.px-card img { width: 112px; height: 63px; object-fit: cover; border-radius: 6px; display: block; background: var(--line); }
.px-card-body { min-width: 0; }
.px-card b { display: block; font: 800 15px/1.25 var(--font); }
.px-card small { display: block; color: var(--muted); font-size: 13px; line-height: 1.35; margin-top: 2px; }
.px-card-go { width: 16px; height: 16px; color: var(--muted); }
.px-card:hover .px-card-go { color: var(--teal-dark); }
.h-kind { display: inline-block; vertical-align: 4px; margin-left: 6px; padding: 3px 8px; border-radius: 4px;
  font: 800 11px/1 var(--font); letter-spacing: .04em; text-transform: uppercase; color: var(--teal-dark);
  background: color-mix(in srgb, var(--teal) 16%, transparent); }
.photo-desc.lead { color: var(--ink-2); margin-bottom: -4px; }
.details a { color: inherit; text-decoration-color: var(--teal); text-underline-offset: 2px; }
.details a:hover { color: var(--teal-dark); }

/* скачування на піксель-сторінці — та сама коралова кнопка, що й на сторінці обоїв */
.dl-solo { display: flex; align-items: center; gap: 9px; padding: 13px 16px; border-radius: 8px; background: var(--coral); color: #fff;
  text-decoration: none; font: 800 15px/1.2 var(--font); white-space: nowrap;
  box-shadow: 0 1px 0 rgba(0, 0, 0, .06), 0 6px 16px color-mix(in srgb, var(--coral) 28%, transparent); }
.dl-solo svg { width: 18px; height: 18px; flex: none; }
.dl-solo .res-num { margin-left: auto; font-weight: 700; font-size: 14px; opacity: .92; font-variant-numeric: tabular-nums; }
.dl-solo:hover { filter: brightness(1.05); }

/* кольори: смуга пропорцій + назви (посилання на /color/<hex>/) */
.palette-bar { display: flex; height: 14px; border-radius: 7px; overflow: hidden; box-shadow: 0 0 0 1px var(--line); }
.palette-bar a { background: var(--c); min-width: 6px; }
.color-names { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; font-size: 13px; }
.color-names a, .shade-list a { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px 3px 5px; border-radius: 999px;
  color: var(--ink-2); text-decoration: none; background: var(--card); box-shadow: inset 0 0 0 1px var(--line); font-weight: 600; }
.color-names a:hover, .shade-list a:hover { color: var(--ink); box-shadow: inset 0 0 0 1px var(--teal); }
.color-names .dot, .shade-list .dot { width: 14px; height: 14px; border-radius: 50%; background: var(--c);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .12); flex: none; }
.color-names small { color: var(--muted); font-weight: 600; font-variant-numeric: tabular-nums; }
/* палітра піксель-арту: суцільна смуга квадратів від темного до світлого */
.px-palette { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(16, 1fr);
  border-radius: 6px; overflow: hidden; box-shadow: 0 0 0 1px var(--line); }
.px-palette li { aspect-ratio: 1; background: var(--c); }
.more-tags summary { cursor: pointer; color: var(--teal-dark); font-size: 13px; font-weight: 700; margin-top: 2px; list-style: none; }
.more-tags summary::-webkit-details-marker { display: none; }
.more-tags summary::before { content: "+ "; }
.more-tags[open] summary { display: none; }
.more-tags .keywords-block { margin-top: 5px; }

/* теги-контури: для фасетів і хмари тегів, щоб не сперечались з основними бірюзовими */
.tag.ghost { background: transparent; color: var(--teal-dark); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--teal) 55%, transparent); }
.tag.ghost:hover { background: var(--teal); color: #fff; box-shadow: none; }
.tag small { opacity: .7; font-size: 12px; margin-left: 2px; }
.tag-cloud { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; }

/* фасети сторінок тегу й кольору */
.facets { display: grid; gap: 10px; margin: -4px 0 22px; }
.facet { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 10px; align-items: center; }
.facet-label { font: 800 13px var(--font); color: var(--muted); }
.shade-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; font-size: 13px; }
.hex { font: 600 13px ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--ink-2); }

/* плитки: бейдж роздільності, піксель-сітка */
.res { font: 800 11px/1 var(--font); color: var(--ink-2); background: var(--field); border-radius: 4px; padding: 3px 5px; margin-right: 4px; vertical-align: 1px; }
.px-sheet .tile img { aspect-ratio: 16 / 9; }
/* підпис на плитці: з'являється при наведенні/фокусі (на дотик — не заважає, бо прихований) */
.tile > a { position: relative; }
.tile-cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 22px 10px 8px; color: #fff; font: 700 13px/1.3 var(--font);
  background: linear-gradient(0deg, rgba(0, 0, 0, .62), rgba(0, 0, 0, 0)); opacity: 0; transform: translateY(4px);
  transition: opacity .2s, transform .2s; pointer-events: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tile > a:hover .tile-cap, .tile > a:focus-visible .tile-cap { opacity: 1; transform: none; }
.tile-cap::first-letter { text-transform: uppercase; }
@media (hover: none) { .tile-cap { display: none; } }
/* 404 — не глухий кут */
.nf { max-width: 640px; margin: 0 auto; padding: 48px 0 28px; text-align: center; }
.nf h1 { font: 800 30px var(--font); margin: 0 0 6px; }
.nf-why { color: var(--muted); margin: 0 0 18px; }
.nf-search { display: flex; gap: 8px; margin: 0 0 14px; }
.nf-search input { flex: 1; min-width: 0; font: inherit; color: var(--ink); background: var(--field); border: 1px solid transparent;
  border-radius: 6px; padding: 10px 12px; }
.nf-search input:focus { background: var(--card); border-color: var(--teal); outline: none; }
.nf-tags { justify-content: center; }
.nf-more { text-align: center; margin: 22px 0 0; }
.tile-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-2); }
.pager .pg-step { font-weight: 700; }
.pg-gap { align-self: center; color: var(--muted); padding: 0 2px; }

@media (max-width: 900px) {
  .facet { grid-template-columns: 1fr; gap: 6px; }
}
@media (max-width: 600px) {
  .account .btn:first-child { display: none; }              /* «Create account» — у меню входу */
  .nav .wrap { gap: 8px 10px; }
  .photo-block { padding: 8px; }
  .photo-header { font-size: 21px; }
  .devices { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; gap: 5px; }
  .devices button { flex: none; padding: 6px 10px; }
  .sheet { gap: 12px 8px; }
  .tile-meta { font-size: 12px; padding-top: 4px; }
  .fit-long { display: none; }
  .listhead { padding: 18px 0 12px; }
  .listhead h1 { font-size: 24px; }
  .more-title { margin: 32px 0 16px; }
  /* фасети на телефоні — по одному рядку з горизонтальним гортанням, щоб не відсували обої вниз */
  .facets { gap: 8px; margin-bottom: 16px; }
  .facet .shade-list, .facet .keywords-block, .facet .colors-list { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none;
    margin: 0 -20px; padding: 2px 20px; }
  .facet .shade-list::-webkit-scrollbar, .facet .keywords-block::-webkit-scrollbar { display: none; }
  .facet .shade-list li, .facet .tag, .facet .color-item { flex: none; white-space: nowrap; }
}
