:root {
  --bg: #fff6ec;
  --bg-deep: #ffe4c9;
  --ink: #2a2140;
  --muted: #6b6280;
  --accent: #ff5a3d;
  --accent-2: #2f9ced;
  --accent-soft: #ffe0d6;
  --accent-soft-2: #d6ecff;
  --paper: #ffffff;
  --line: #f0dcc8;
  --shadow: 0 14px 32px rgba(255, 90, 61, 0.1);
  --radius: 22px;
  --font-display: "Trebuchet MS", "Segoe UI", sans-serif;
  --font-body: "Segoe UI", "Trebuchet MS", sans-serif;
}

* { box-sizing: border-box; }
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background:
    radial-gradient(900px 420px at 8% -8%, #ffe8a8 0%, transparent 55%),
    radial-gradient(800px 380px at 95% 0%, #c8e8ff 0%, transparent 50%),
    radial-gradient(700px 360px at 70% 100%, #ffd0c2 0%, transparent 45%),
    linear-gradient(180deg, var(--bg), var(--bg-deep));
  min-height: 100vh;
}
body.is-site-edit {
  padding-top: 2.6rem;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: #000;
  color: #fff;
  padding: .5rem 1rem;
  z-index: 100;
}
.skip-link:focus { left: 0; }

.wrap {
  width: min(1120px, calc(100% - 2rem));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(12px);
  background: rgba(255, 248, 240, 0.9);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 80%, transparent);
}
body.is-site-edit .site-header {
  top: 2.6rem;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .9rem 0;
}
.brand {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.35rem;
  height: 2.35rem;
  flex-shrink: 0;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), #ff8a3d);
  text-decoration: none;
  box-shadow: 0 6px 14px rgba(255, 90, 61, 0.28);
  transition: transform .15s ease, box-shadow .15s ease;
}
.brand::before {
  content: "";
  width: 1.2rem;
  height: 1.2rem;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M12 3.2 3.5 10.2c-.3.25-.3.7 0 .95l.7.55c.25.2.6.2.85 0L12 5.9l6.95 5.8c.25.2.6.2.85 0l.7-.55c.3-.25.3-.7 0-.95L12 3.2zm-6.2 9.1V19c0 .55.45 1 1 1h3.7v-4.2c0-.55.45-1 1-1h2.1c.55 0 1 .45 1 1V20h3.7c.55 0 1-.45 1-1v-6.7l-7.3-6.05-7.3 6.05z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M12 3.2 3.5 10.2c-.3.25-.3.7 0 .95l.7.55c.25.2.6.2.85 0L12 5.9l6.95 5.8c.25.2.6.2.85 0l.7-.55c.3-.25.3-.7 0-.95L12 3.2zm-6.2 9.1V19c0 .55.45 1 1 1h3.7v-4.2c0-.55.45-1 1-1h2.1c.55 0 1 .45 1 1V20h3.7c.55 0 1-.45 1-1v-6.7l-7.3-6.05-7.3 6.05z'/%3E%3C/svg%3E") center / contain no-repeat;
}
.brand:hover {
  transform: translateY(-1px) scale(1.04);
  box-shadow: 0 8px 18px rgba(47, 156, 237, 0.28);
}
.nav {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem 1.1rem;
}
.nav a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 600;
}
.nav a:hover { color: var(--accent); }

.install-flash {
  margin-top: 1.25rem;
  padding: 1rem 1.1rem;
  border-radius: 14px;
  background: var(--accent-soft);
  border: 1px solid color-mix(in srgb, var(--accent) 25%, var(--line));
  color: var(--ink);
}
.install-flash ul { margin: .4rem 0 0; padding-left: 1.1rem; color: var(--muted); }

.hero {
  padding: 2.5rem 0 1.5rem;
}
.brand-mark {
  margin: 0 0 .35rem;
  font-size: clamp(2rem, 5vw, 3.4rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.05;
  color: var(--accent);
}
.hero h1 {
  margin: 0 0 .75rem;
  font-size: clamp(1.75rem, 4vw, 2.6rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--ink);
}
.hub-header h1 {
  margin: 0 0 .75rem;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  letter-spacing: -0.03em;
}
.lead {
  max-width: 42rem;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.55;
}

.home-sections {
  padding: 0.25rem 0 3rem;
}
.sections-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  padding: 1rem 0 3rem;
}
.section-link {
  display: flex;
  flex-direction: column;
  gap: .45rem;
  padding: 1.25rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow);
  transition: transform .2s ease, border-color .2s ease;
}
.section-link:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
}
.section-name { font-weight: 750; font-size: 1.15rem; }
.section-hint { color: var(--muted); font-size: .92rem; line-height: 1.4; }

.collage--text {
  grid-template-columns: 1fr;
}
.collage--text .collage-meta {
  padding: 0.5rem 0.85rem 0.65rem;
}
.collage-count--soon {
  color: var(--muted);
  font-weight: 600;
}
.home-sections .collage-mosaic {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  padding: 0.4rem;
  border-radius: 12px;
  background:
    linear-gradient(145deg, #ebe4d6 0%, #f4efe6 45%, #e5ddd0 100%);
}
.home-sections .collage:nth-child(1) { animation-delay: .02s; }
.home-sections .collage:nth-child(2) { animation-delay: .06s; }
.home-sections .collage:nth-child(3) { animation-delay: .1s; }
.home-sections .collage:nth-child(4) { animation-delay: .14s; }
.home-sections .collage:nth-child(5) { animation-delay: .18s; }
.home-sections .collage-mosaic img {
  transition: transform .25s ease;
  background: #fff;
  border: 1px solid rgba(28, 25, 20, 0.08);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.7) inset;
}
.home-sections .collage:hover .collage-mosaic img:nth-child(odd) {
  transform: translateY(-2px);
}
.home-sections .collage:hover .collage-mosaic img:nth-child(even) {
  transform: translateY(2px);
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  padding-top: 1.4rem;
  color: var(--muted);
  font-size: .92rem;
}
.breadcrumbs a { color: var(--accent); text-decoration: none; }

.hub-header { padding: 1rem 0 1.25rem; }

.page-with-nav {
  display: grid;
  grid-template-columns: 11.5rem minmax(0, 1fr);
  gap: 1.5rem 1.75rem;
  align-items: start;
  padding-bottom: 2rem;
}
.page-main { min-width: 0; }

.neighbors {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-bottom: 1.25rem;
}
.neighbors--side {
  position: sticky;
  top: 4.5rem;
  flex-direction: column;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: .4rem;
  margin: 1.4rem 0 0;
  padding: 0;
}
.neighbors a {
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line);
  text-decoration: none;
  padding: .35rem .7rem;
  border-radius: 999px;
  font-size: .88rem;
  font-weight: 650;
  transition: background .15s ease, border-color .15s ease, color .15s ease;
}
.neighbors--side a {
  border-radius: 14px;
  padding: .55rem .75rem;
  line-height: 1.25;
}
.neighbors a:hover {
  border-color: var(--accent-2);
  background: var(--accent-soft-2);
  color: var(--ink);
}
.neighbors a.is-active {
  background: linear-gradient(135deg, var(--accent), #ff8a3d);
  border-color: transparent;
  color: #fff;
}

@media (max-width: 860px) {
  .page-with-nav {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }
  .neighbors--side {
    position: static;
    flex-direction: row;
    flex-wrap: wrap;
    margin: 1rem 0 0.25rem;
  }
  .neighbors--side a {
    border-radius: 999px;
    padding: .35rem .7rem;
  }
}

.hub-facets {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-bottom: 1.25rem;
}
.hub-facets a {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line);
  text-decoration: none;
  padding: .4rem .75rem;
  border-radius: 999px;
  font-size: .88rem;
  font-weight: 600;
}
.hub-facets a:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.hub-facets a.is-active {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--paper);
}
.hub-facets .facet-count {
  opacity: .72;
  font-weight: 600;
  font-size: .8rem;
}

.sheet-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 1rem;
  padding-bottom: 2rem;
}
.sheet-card {
  position: relative;
  background: var(--paper);
  border: 2px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: var(--shadow);
  /* без entrance-анимации и без удаления DOM — стабильный CLS */
  contain: layout style;
  transition: border-color .18s ease, box-shadow .18s ease;
}
@media (hover: hover) and (pointer: fine) {
  .sheet-card:hover {
    border-color: color-mix(in srgb, var(--accent-2) 55%, var(--line));
    box-shadow: 0 16px 28px rgba(47, 156, 237, 0.14);
  }
}
.sheet-open {
  display: block;
  width: 100%;
  border: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
  text-align: left;
  color: inherit;
  text-decoration: none;
}
.sheet-open img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 400 / 560;
  object-fit: cover;
  background: #fffaf3;
  /* место под картинку всегда зарезервировано (CLS) */
  min-height: 0;
}
.sheet-open img.is-broken {
  /* битый thumb: место сохраняем, карточку не удаляем */
  background:
    linear-gradient(145deg, #f3ebe0, #fffaf3);
  object-fit: none;
}
.sheet-card-title {
  display: block;
  padding: 0.55rem 0.65rem 0.2rem;
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.25;
}
.sheet-card-meta {
  display: block;
  padding: 0 0.65rem 0.65rem;
  font-size: 0.8rem;
  color: var(--muted, #6b6560);
}
.scene-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.75rem;
}
.scene-related {
  padding: 1.5rem 0 2.5rem;
  border-top: 1px solid var(--line);
  margin-top: 0.5rem;
}
.scene-related-title {
  font-size: 1.25rem;
  margin: 0 0 1rem;
}
.scene-related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.85rem;
}
.scene-related-card {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  text-decoration: none;
  color: inherit;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.scene-related-card img {
  display: block;
  width: 100%;
  aspect-ratio: 200 / 280;
  object-fit: cover;
  background: #f7f4ec;
}
.scene-related-name {
  padding: 0 0.55rem;
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.25;
}
.scene-related-meta {
  padding: 0 0.55rem 0.55rem;
  font-size: 0.8rem;
  color: var(--muted, #6b6560);
}
.sheet-card.is-active {
  outline: 2px solid var(--accent, #2a6f6a);
  outline-offset: 2px;
}
.scene-header .muted {
  margin-top: 0.35rem;
}

.sheets-heading {
  margin: 0 0 1rem;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
}

.seo-content {
  margin: 0.5rem 0 2.5rem;
  padding: 1.25rem 1.35rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.seo-content-title {
  margin: 0 0 0.85rem;
  font-size: 1.2rem;
  letter-spacing: -0.02em;
}
.seo-print + .seo-faq {
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
}
.seo-print-steps {
  margin: 0;
  padding-left: 1.2rem;
  line-height: 1.5;
  color: var(--ink);
}
.seo-print-steps li {
  margin-bottom: 0.45rem;
}
.seo-print-note {
  margin: 0.85rem 0 0;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.45;
}
.seo-faq-list {
  display: grid;
  gap: 0.55rem;
}
.seo-faq-item {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fffaf3;
  padding: 0.65rem 0.85rem;
}
.seo-faq-item summary {
  cursor: pointer;
  font-weight: 650;
  line-height: 1.35;
  list-style: none;
}
.seo-faq-item summary::-webkit-details-marker {
  display: none;
}
.seo-faq-item summary::before {
  content: "+";
  display: inline-block;
  width: 1.1rem;
  color: var(--accent);
  font-weight: 800;
}
.seo-faq-item[open] summary::before {
  content: "–";
}
.seo-faq-item p {
  margin: 0.55rem 0 0.15rem;
  color: var(--muted);
  line-height: 1.45;
  font-size: 0.95rem;
}

.collages {
  padding: 0.5rem 0 2rem;
}
.collages-heading {
  margin: 0 0 1rem;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
}
.collages-list {
  display: grid;
  gap: 1.1rem;
}
.collage {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 1rem;
  align-items: center;
  padding: 0.85rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow);
  transition: border-color .2s ease, box-shadow .2s ease;
  contain: layout style;
}
@media (hover: hover) and (pointer: fine) {
  .collage:hover {
    border-color: var(--accent);
    box-shadow: 0 16px 28px rgba(255, 90, 61, 0.12);
  }
}
.collage-mosaic {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.35rem;
}
.collage-mosaic img {
  width: 100%;
  aspect-ratio: 5 / 7;
  object-fit: cover;
  border-radius: 8px;
  background: #f7f4ec;
  display: block;
}
.collage-meta {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding-right: 0.35rem;
}
.collage-title {
  font-weight: 750;
  font-size: 1.2rem;
  letter-spacing: -0.02em;
}
.collage-count {
  color: var(--accent);
  font-weight: 650;
  font-size: 0.9rem;
}
.collage-hint {
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.4;
}

.pagination {
  display: flex;
  gap: .4rem;
  flex-wrap: wrap;
  padding-bottom: 2.5rem;
}
.pagination a {
  min-width: 2.2rem;
  text-align: center;
  padding: .4rem .55rem;
  border-radius: 10px;
  text-decoration: none;
  color: var(--ink);
  border: 1px solid var(--line);
  background: var(--paper);
}
.pagination a.is-active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.site-footer {
  border-top: 1px solid var(--line);
  color: var(--muted);
  padding: 1.5rem 0 2rem;
  margin-top: 1rem;
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .75rem 1.5rem;
}
.footer-nav a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}
.footer-nav a:hover { text-decoration: underline; }

.legal-page {
  max-width: 42rem;
  padding-bottom: 2.5rem;
}
.legal-page h1 {
  margin: 0 0 .75rem;
}
.legal-page h2 {
  margin: 1.75rem 0 .5rem;
  font-size: 1.15rem;
}
.legal-page ul {
  margin: .5rem 0 0;
  padding-left: 1.25rem;
  color: var(--muted);
  line-height: 1.55;
}
.legal-page p {
  line-height: 1.55;
  color: var(--muted);
}
.legal-page .lead {
  color: var(--ink);
}
.legal-note {
  margin-top: 2rem;
  font-size: .9rem;
}

.modal-license {
  margin: 0 0 1rem;
  font-size: .88rem;
  line-height: 1.45;
  color: var(--muted);
}
.modal-license a {
  color: var(--accent);
  font-weight: 600;
}

.hp {
  position: absolute !important;
  left: -10000px !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
}

.modal[hidden] { display: none !important; }
.modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: max(0.5rem, env(safe-area-inset-top, 0px))
           max(0.75rem, env(safe-area-inset-right, 0px))
           max(0.5rem, env(safe-area-inset-bottom, 0px))
           max(0.75rem, env(safe-area-inset-left, 0px));
}
.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(20, 18, 14, 0.55);
  animation: fade .2s ease both;
}
.modal-dialog {
  position: relative;
  width: min(1120px, calc(100vw - 1.5rem));
  max-height: min(96vh, 100dvh - 1rem);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--paper);
  border-radius: 20px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  animation: pop .25s ease both;
}
.modal-close {
  position: absolute;
  top: .65rem;
  right: .65rem;
  z-index: 2;
  border: 0;
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 999px;
  background: var(--bg-deep);
  cursor: pointer;
  font-size: 1.35rem;
  line-height: 1;
}
.modal-body {
  padding: 1.1rem 1.25rem 1.4rem;
  overflow: auto;
  overscroll-behavior: contain;
  min-height: 0;
  flex: 1;
}
.modal-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(16rem, 0.85fr);
  gap: 1.25rem 1.5rem;
  align-items: start;
}
.modal-media {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
}
.modal-sheet {
  display: block;
  width: auto;
  max-width: 100%;
  max-height: min(72vh, 820px);
  height: auto;
  object-fit: contain;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fff;
}
.modal-example-fig {
  margin: 1rem 0 0;
  width: min(100%, 280px);
  text-align: left;
}
.modal-example-btn {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: zoom-in;
  position: relative;
  text-align: left;
}
.modal-example {
  display: block;
  width: 100%;
  height: auto;
  max-height: min(42vh, 360px);
  object-fit: contain;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fff;
  box-shadow: 0 8px 20px rgba(28, 25, 20, 0.06);
}
.example-zoom {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: rgba(12, 12, 12, 0.88);
  cursor: zoom-out;
}
.example-zoom img {
  max-width: min(920px, 96vw);
  max-height: 92vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 8px;
  background: #fff;
  cursor: default;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
}
.example-zoom-close {
  position: absolute;
  top: max(0.75rem, env(safe-area-inset-top, 0px));
  right: max(0.75rem, env(safe-area-inset-right, 0px));
  width: 2.4rem;
  height: 2.4rem;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}
.sheet-page {
  padding-bottom: 2rem;
}
.sheet-page-layout {
  margin-bottom: 0.5rem;
}
.sheet-page #modal-title {
  margin: 0 0 0.75rem;
  font-size: clamp(1.25rem, 2.4vw, 1.7rem);
  line-height: 1.25;
  letter-spacing: -0.02em;
  padding-right: 0.5rem;
}
.modal-info #modal-title.visually-hidden + .modal-meta {
  margin-top: 0;
}
.modal-howto {
  margin: 0.35rem 0 0;
  color: var(--muted);
  line-height: 1.5;
}
.modal-meta {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  margin: .75rem 0;
}
.badge {
  font-size: .8rem;
  padding: .25rem .55rem;
  border-radius: 999px;
  background: var(--bg-deep);
  color: var(--muted);
}
.modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
  margin: 1rem 0;
}
.modal-actions--sizes {
  flex-direction: column;
  align-items: stretch;
}
.modal-actions--sizes .btn {
  width: 100%;
  border-radius: 14px;
  justify-content: flex-start;
}
.wallpaper-empty {
  padding: 2rem 0 3rem;
  max-width: 36rem;
}
.wallpaper-grid .sheet-card img {
  aspect-ratio: 9 / 16;
  object-fit: cover;
}
.pager {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: .75rem 1rem;
  margin: 2rem 0 1rem;
}
.btn {
  border: 0;
  border-radius: 999px;
  padding: .75rem 1.15rem;
  font-weight: 750;
  cursor: pointer;
  background: linear-gradient(135deg, var(--accent), #ff8a3d);
  color: #fff;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 16px rgba(255, 90, 61, 0.22);
}
.btn:disabled {
  opacity: .55;
  cursor: wait;
}
.btn-secondary {
  background: var(--accent-soft-2);
  color: var(--ink);
  box-shadow: none;
}
.ad-slot {
  margin: 1rem 0;
  padding: 1rem;
  border-radius: 12px;
  border: 1px dashed var(--line);
  background: linear-gradient(135deg, #f6f1e6, #e8f0eb);
  color: var(--muted);
  min-height: 90px;
  display: grid;
  place-items: center;
  text-align: center;
}
.progress {
  height: 8px;
  background: var(--bg-deep);
  border-radius: 999px;
  overflow: hidden;
  margin: .5rem 0 1rem;
}
.progress > span {
  display: block;
  height: 100%;
  width: 0;
  background: var(--accent);
  transition: width .2s linear;
}
.modal-more-wrap {
  margin-top: 1.35rem;
  padding-top: 1.15rem;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 1.25rem;
}
.modal-more {
  min-width: 0;
}
.modal-more-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.55rem;
}
.modal-more-title {
  margin: 0;
  font-size: 0.98rem;
  font-weight: 750;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.modal-more-related .modal-more-title {
  color: var(--muted);
  font-weight: 650;
  font-size: 0.92rem;
}
.more-rail {
  display: flex;
  gap: 0.7rem;
  overflow-x: auto;
  padding: 0.15rem 0.15rem 0.55rem;
  margin: 0 -0.15rem;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}
.more-card {
  flex: 0 0 auto;
  width: 7.25rem;
  border: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
  text-align: left;
  scroll-snap-align: start;
  color: inherit;
  text-decoration: none;
}
.modal-more-series .more-card {
  width: 8.1rem;
}
.more-card-media {
  display: block;
  overflow: hidden;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fff;
  box-shadow: 0 6px 16px rgba(28, 25, 20, 0.05);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.more-card:hover .more-card-media,
.more-card:focus-visible .more-card-media {
  transform: translateY(-2px);
  box-shadow: 0 10px 22px rgba(28, 25, 20, 0.1);
}
.more-card img {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}
.muted { color: var(--muted); }

@keyframes rise {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}
@keyframes fade {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes pop {
  from { opacity: 0; transform: translateY(12px) scale(.98); }
  to { opacity: 1; transform: none; }
}

@media (max-width: 640px) {
  .header-inner { flex-direction: column; align-items: flex-start; }
  .sheet-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .collage {
    grid-template-columns: 1fr;
  }
  .collage-mosaic {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  .modal-layout {
    grid-template-columns: 1fr;
  }
  .modal-sheet {
    max-height: min(58vh, 560px);
  }
  .modal-example-fig {
    width: min(100%, 240px);
  }
  .modal-example {
    max-height: min(36vh, 280px);
  }
  .modal-info {
    padding-right: 0;
  }
}

/* —— Онлайн-раскраска /paint/ —— */
.paint-app {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin: 0.5rem 0 2rem;
}
.paint-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.25rem;
}
.paint-back {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}
.paint-back:hover { text-decoration: underline; }
.paint-heading { flex: 1 1 12rem; min-width: 0; }
.paint-kicker {
  margin: 0;
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}
.paint-heading h1 {
  margin: 0.15rem 0 0;
  font-size: clamp(1.25rem, 2.5vw, 1.75rem);
  line-height: 1.2;
}
.paint-top-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.paint-body {
  display: grid;
  grid-template-columns: minmax(200px, 260px) minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
}
.paint-tools {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: var(--shadow);
}
.paint-tools-title {
  margin: 0.85rem 0 0.45rem;
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.paint-tools-title:first-child { margin-top: 0; }
.paint-tool-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.4rem;
}
.paint-tool {
  appearance: none;
  border: 2px solid var(--line);
  background: #fff;
  border-radius: 12px;
  padding: 0.55rem 0.7rem;
  text-align: left;
  cursor: pointer;
  font: inherit;
  color: var(--ink);
}
.paint-tool.is-active {
  border-color: #e85a8c;
  background: #fff5f8;
}
.paint-size-row {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.paint-size-row input[type="range"] { flex: 1; }
.paint-icon-btn {
  width: 2rem;
  height: 2rem;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #fff;
  cursor: pointer;
  font-size: 1.1rem;
  line-height: 1;
}
.paint-palette {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.4rem;
}
.paint-swatch {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 999px;
  border: 2px solid rgba(0,0,0,0.12);
  background: var(--swatch, #ccc);
  cursor: pointer;
  padding: 0;
}
.paint-swatch.is-active {
  outline: 2px solid #e85a8c;
  outline-offset: 2px;
}
.paint-custom-color {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-top: 0.65rem;
  font-size: 0.9rem;
  color: var(--muted);
}
.paint-custom-color input[type="color"] {
  width: 2.5rem;
  height: 2rem;
  border: none;
  background: transparent;
  cursor: pointer;
}
.paint-history {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  margin-top: 1rem;
}
.paint-stage {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.75rem;
  box-shadow: var(--shadow);
  min-height: 320px;
}
.paint-canvas-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}
#paint-canvas {
  max-width: 100%;
  height: auto;
  background: #fff;
  border-radius: 8px;
  cursor: crosshair;
  touch-action: none;
  box-shadow: 0 1px 0 rgba(0,0,0,0.04);
}
.paint-status { margin: 0; min-height: 1.25em; text-align: center; }

@media (max-width: 860px) {
  .paint-body {
    grid-template-columns: 1fr;
  }
  .paint-tools {
    order: 2;
  }
  .paint-tool-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .paint-top-actions {
    width: 100%;
  }
  .paint-top-actions .btn {
    flex: 1;
  }
}

/* —— Режим правки на сайте —— */
.site-edit-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.55rem 1rem;
  background: linear-gradient(90deg, #2f9ced, #ff5a3d);
  color: #fff;
  font-weight: 700;
  font-size: 0.92rem;
  box-shadow: 0 6px 16px rgba(42, 33, 64, 0.18);
}
.site-edit-exit {
  color: #fff;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  padding: 0.3rem 0.8rem;
  text-decoration: none;
}
.site-edit-exit:hover { background: rgba(255, 255, 255, 0.32); }
.site-edit-card { position: relative; }
.site-edit-pencil {
  position: absolute;
  top: 0.45rem;
  right: 0.45rem;
  z-index: 5;
  width: 2.1rem;
  height: 2.1rem;
  border: 0;
  border-radius: 999px;
  background: #fff;
  color: var(--accent);
  box-shadow: 0 6px 14px rgba(42, 33, 64, 0.18);
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
}
.site-edit-pencil:hover {
  background: var(--accent);
  color: #fff;
}
.site-edit-dialog[hidden] { display: none !important; }
.site-edit-dialog {
  position: fixed;
  inset: 0;
  z-index: 90;
}
.site-edit-dialog-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(42, 33, 64, 0.45);
}
.site-edit-dialog-panel {
  position: relative;
  z-index: 1;
  width: min(420px, calc(100% - 2rem));
  margin: 8vh auto 0;
  background: var(--paper);
  border-radius: 20px;
  padding: 1.25rem 1.25rem 1.1rem;
  box-shadow: 0 24px 48px rgba(42, 33, 64, 0.22);
}
.site-edit-dialog-panel h2 {
  margin: 0 1.5rem 0.85rem 0;
  font-size: 1.2rem;
}
.site-edit-dialog-x {
  position: absolute;
  top: 0.7rem;
  right: 0.75rem;
  border: 0;
  background: transparent;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--muted);
}
.site-edit-form label {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  margin-bottom: 0.75rem;
  font-weight: 650;
  font-size: 0.9rem;
}
.site-edit-form input[type="text"],
.site-edit-form input:not([type]),
.site-edit-form input[type="search"],
.site-edit-form input[name="title_ru"],
.site-edit-form input[name="alt_ru"] {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.55rem 0.7rem;
  font: inherit;
}
.site-edit-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.5rem;
}
.site-edit-status {
  margin: 0 0 0.5rem;
  min-height: 1.2em;
}
.site-edit-status.is-error { color: #c0392b; }

/* ——— Wallpaper product surface (page-wallpapers) ——— */
.page-wallpapers {
  --wp-ink: #0e1218;
  --wp-muted: #6b7585;
  --wp-paper: #f4f6f8;
  --wp-line: rgba(14, 18, 24, 0.08);
  --wp-accent: #0d9488;
  --wp-accent-2: #14b8a6;
  --wp-deep: #111827;
  --font-display: "Trebuchet MS", "Segoe UI", Roboto, sans-serif;
  --font-body: "Segoe UI", Roboto, Arial, sans-serif;
  font-family: var(--font-body);
  color: var(--wp-ink);
  background:
    radial-gradient(1200px 520px at 12% -10%, rgba(13, 148, 136, 0.16), transparent 55%),
    radial-gradient(900px 480px at 100% 0%, rgba(56, 89, 140, 0.12), transparent 50%),
    linear-gradient(180deg, #eef2f6 0%, #e4e9ef 48%, #dce3ea 100%);
}
.page-wallpapers .site-header {
  background: rgba(244, 246, 248, 0.78);
  border-bottom: 1px solid var(--wp-line);
  backdrop-filter: blur(16px) saturate(1.2);
}
.page-wallpapers .brand {
  width: auto;
  height: auto;
  padding: 0.35rem 0.15rem;
  border-radius: 0;
  background: none;
  box-shadow: none;
  color: var(--wp-ink);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -0.04em;
}
.page-wallpapers .brand::before { display: none; }
.page-wallpapers .brand:hover {
  transform: none;
  box-shadow: none;
  color: var(--wp-accent);
}
.page-wallpapers .wp-main {
  width: 100%;
  margin: 0;
  padding: 0;
}
.page-wallpapers .site-footer {
  margin-top: 2.5rem;
  border-top: 1px solid var(--wp-line);
  background: transparent;
}
.page-wallpapers .footer-tagline,
.page-wallpapers .footer-nav a {
  color: var(--wp-muted);
}

.wp-hero {
  position: relative;
  isolation: isolate;
  min-height: min(78vh, 720px);
  display: grid;
  align-items: end;
  overflow: hidden;
  color: #f8fafc;
}
.wp-hero-media {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.wp-hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.04);
  filter: saturate(1.05) contrast(1.05);
  animation: wp-hero- ken 18s ease-out forwards;
}
.wp-hero-media--mesh {
  background:
    radial-gradient(ellipse 80% 60% at 20% 30%, rgba(20, 184, 166, 0.45), transparent 55%),
    radial-gradient(ellipse 70% 50% at 85% 20%, rgba(59, 130, 246, 0.28), transparent 50%),
    radial-gradient(ellipse 60% 45% at 60% 85%, rgba(15, 23, 42, 0.55), transparent 55%),
    linear-gradient(145deg, #0b1220 0%, #132033 45%, #0f766e 140%);
}
.wp-hero-veil {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(180deg, rgba(8, 12, 18, 0.25) 0%, rgba(8, 12, 18, 0.55) 45%, rgba(8, 12, 18, 0.88) 100%);
}
.wp-hero-copy {
  position: relative;
  z-index: 2;
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 5.5rem 0 2.75rem;
}
.wp-brand {
  margin: 0 0 0.85rem;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.6rem, 8vw, 5.2rem);
  letter-spacing: -0.055em;
  line-height: 0.95;
  color: #fff;
  text-shadow: 0 10px 40px rgba(0, 0, 0, 0.35);
}
.wp-headline {
  margin: 0 0 0.75rem;
  max-width: 18ch;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: clamp(1.35rem, 3.2vw, 2rem);
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: rgba(255, 255, 255, 0.92);
}
.wp-lead {
  margin: 0 0 1.5rem;
  max-width: 34rem;
  color: rgba(226, 232, 240, 0.82);
  font-size: 1.05rem;
  line-height: 1.55;
  font-weight: 450;
}
.wp-cta { display: flex; flex-wrap: wrap; gap: 0.75rem; }

.wp-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.85rem 1.25rem;
  border: 0;
  border-radius: 14px;
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.18s ease, background 0.18s ease, color 0.18s ease;
}
.wp-btn:hover { transform: translateY(-1px); }
.wp-btn-primary {
  background: #fff;
  color: var(--wp-ink);
}
.wp-btn-primary:hover { background: #f0fdfa; color: #0f766e; }
.wp-btn-ghost {
  background: rgba(255, 255, 255, 0.08);
  color: var(--wp-ink);
  border: 1px solid var(--wp-line);
}
.page-wallpapers .wp-pager .wp-btn-ghost {
  background: rgba(255, 255, 255, 0.55);
}

.wp-empty {
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 2.5rem 0 4rem;
  color: var(--wp-muted);
  font-size: 1.05rem;
  line-height: 1.55;
  max-width: 36rem;
}

.wp-crumbs {
  width: min(1180px, calc(100% - 1.5rem));
  margin: 1.25rem auto 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.5rem;
  align-items: center;
  color: var(--wp-muted);
  font-size: 0.9rem;
  font-weight: 600;
}
.wp-crumbs a {
  color: var(--wp-muted);
  text-decoration: none;
}
.wp-crumbs a:hover {
  color: var(--wp-accent);
}
.wp-hub-head {
  width: min(1180px, calc(100% - 1.5rem));
  margin: 1rem auto 0;
}
.wp-hub-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3.5vw, 2.35rem);
  letter-spacing: -0.04em;
  color: var(--wp-ink);
}
.wp-hub-lead {
  margin: 0.65rem 0 0;
  max-width: 40rem;
  color: var(--wp-muted);
  font-size: 1.02rem;
  line-height: 1.55;
}
.wp-hub-meta {
  margin: 0.55rem 0 0;
  color: var(--wp-muted);
  font-weight: 600;
  font-size: 0.92rem;
}
.wp-browse--hub {
  padding-top: 1rem;
  padding-bottom: 0.5rem;
}
.wp-browse--hub.wp-browse--tags {
  padding-top: 2rem;
  padding-bottom: 2rem;
  margin-top: 0.75rem;
}
.page-wallpapers .seo-content {
  width: min(1180px, calc(100% - 1.5rem));
  margin: 2rem auto 1rem;
}

.wp-browse {
  width: min(1180px, calc(100% - 1.5rem));
  margin: 0 auto;
  padding: 1.75rem 0 0.5rem;
}
.wp-browse--tags {
  padding-top: 2.25rem;
  padding-bottom: 2rem;
  border-top: 1px solid var(--wp-line);
  margin-top: 0.5rem;
}
.wp-browse-fold {
  margin: 0;
  border: 0;
}
.wp-browse-fold > summary {
  list-style: none;
}
.wp-browse-fold > summary::-webkit-details-marker {
  display: none;
}
.wp-browse-toggle {
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  width: 100%;
  box-sizing: border-box;
  margin: 0;
  padding: 0.85rem 1rem;
  border-radius: 12px;
  border: 1px solid var(--wp-line);
  background: #fff;
  color: var(--wp-ink);
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.wp-browse-toggle-text {
  min-width: 0;
}
.wp-browse-toggle-chevron {
  flex: 0 0 auto;
  width: 0.55rem;
  height: 0.55rem;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  transition: transform 0.18s ease;
  opacity: 0.7;
}
.wp-browse-fold[open] > .wp-browse-toggle .wp-browse-toggle-chevron {
  transform: rotate(-135deg);
  margin-top: 0.25rem;
}
.wp-browse-panel {
  margin: 0;
}
.wp-browse-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.9rem;
}
.wp-browse-title {
  margin: 0 0 0.75rem;
  font-family: var(--font-display);
  font-size: clamp(1.15rem, 2.2vw, 1.45rem);
  letter-spacing: -0.03em;
  color: var(--wp-ink);
}
.wp-browse-head .wp-browse-title {
  margin-bottom: 0;
}
.wp-browse-all {
  color: var(--wp-accent);
  font-weight: 700;
  font-size: 0.92rem;
  text-decoration: none;
  white-space: nowrap;
}
.wp-browse-all:hover {
  text-decoration: underline;
}
@media (max-width: 767px) {
  .wp-browse {
    padding-top: 1rem;
    padding-bottom: 0.35rem;
  }
  .wp-browse--tags {
    padding-top: 1.25rem;
    padding-bottom: 1.5rem;
  }
  .wp-browse-toggle {
    display: flex;
  }
  .wp-browse-fold:not([open]) .wp-browse-panel {
    display: none;
  }
  .wp-browse-fold[open] .wp-browse-panel {
    display: block;
    margin-top: 0.65rem;
  }
  .wp-browse-fold .wp-browse-title {
    display: none;
  }
  .wp-browse-fold .wp-browse-head {
    margin-bottom: 0.65rem;
  }
}
.wp-browse-cats {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem;
}
@media (min-width: 640px) {
  .wp-browse-cats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (min-width: 960px) {
  .wp-browse-cats {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
.wp-browse-cats a {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
  width: 100%;
  box-sizing: border-box;
  padding: 0.7rem 0.85rem;
  border-radius: 10px;
  background: #fff;
  border: 1px solid var(--wp-line);
  color: var(--wp-ink);
  text-decoration: none;
  font-weight: 650;
  font-size: 0.95rem;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.wp-browse-cats a:hover {
  border-color: rgba(13, 148, 136, 0.4);
  background: rgba(13, 148, 136, 0.04);
}
.wp-browse-name {
  min-width: 0;
  line-height: 1.25;
}
.wp-browse-count {
  flex: 0 0 auto;
  color: var(--wp-muted);
  font-weight: 600;
  font-size: 0.82rem;
}
.wp-browse-tags {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1rem;
  line-height: 1.6;
  column-gap: 1.15rem;
}
.wp-browse-tags a {
  color: var(--wp-muted);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
}
.wp-browse-tags a:hover {
  color: var(--wp-accent);
  text-decoration: underline;
}

.wp-res {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem 0.75rem;
  width: 100%;
}
.wp-res-caption {
  flex: 0 0 auto;
  color: var(--wp-muted);
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.wp-res-toggles {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 0;
  padding: 0.2rem;
  border-radius: 999px;
  background: rgba(14, 18, 24, 0.045);
  border: 1px solid var(--wp-line);
}
.wp-res-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2rem;
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
  color: var(--wp-muted);
  text-decoration: none;
  font-weight: 700;
  font-size: 0.86rem;
  line-height: 1;
  white-space: nowrap;
  transition: background 0.15s ease, color 0.15s ease;
}
.wp-res-toggle:hover {
  color: var(--wp-ink);
}
.wp-res-toggle.is-on {
  background: #fff;
  color: var(--wp-ink);
  box-shadow: 0 1px 2px rgba(14, 18, 24, 0.08);
}
.wp-res-reset {
  color: var(--wp-accent);
  font-weight: 700;
  font-size: 0.86rem;
  text-decoration: none;
  white-space: nowrap;
}
.wp-res-reset:hover {
  text-decoration: underline;
}
.wp-empty .wp-res {
  width: min(1180px, 100%);
  margin: 0 auto 1rem;
  justify-content: center;
}

.wp-gallery {
  width: min(1280px, calc(100% - 1.5rem));
  margin: 0 auto;
  padding: 1.75rem 0 1rem;
}
.wp-gallery-head {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.85rem;
  margin-bottom: 1rem;
}
.wp-gallery-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
}
.wp-gallery-filters {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.65rem;
  width: 100%;
}
.wp-empty .wp-gallery-filters {
  width: min(1180px, 100%);
  margin: 0 auto 1rem;
}
@media (min-width: 860px) {
  .wp-gallery-head {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
  .wp-gallery-filters {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem 1.25rem;
  }
  .wp-gallery-head .wp-res {
    width: auto;
  }
}
.wp-gallery-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 2.5vw, 1.65rem);
  letter-spacing: -0.03em;
}
.wp-gallery-meta {
  margin: 0;
  color: var(--wp-muted);
  font-weight: 600;
  font-size: 0.92rem;
}

/* Колонночный masonry: пропорции как у файла (без crop и без чёрных дыр) */
.wp-masonry {
  column-count: 2;
  column-gap: 0.75rem;
}
@media (min-width: 640px) {
  .wp-masonry { column-count: 3; column-gap: 0.9rem; }
}
@media (min-width: 1200px) {
  /* 3 крупные колонки читаются лучше, чем 4 мелких */
  .wp-masonry { column-count: 3; column-gap: 1.1rem; max-width: 1180px; margin-inline: auto; }
}

.wp-tile {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  background: #1a1f27;
  break-inside: avoid;
  -webkit-column-break-inside: avoid;
  page-break-inside: avoid;
  margin: 0 0 0.7rem;
}
@media (min-width: 720px) {
  .wp-tile { margin-bottom: 0.9rem; }
}
@media (min-width: 1100px) {
  .wp-tile { margin-bottom: 1rem; }
}
.wp-tile-link {
  display: block;
  position: relative;
  color: inherit;
  text-decoration: none;
}
.wp-tile img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: auto;
  object-fit: unset;
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}
.wp-tile-shade {
  position: absolute;
  inset: auto 0 0;
  height: 48%;
  background: linear-gradient(180deg, transparent, rgba(8, 12, 18, 0.82));
  opacity: 0;
  transition: opacity 0.25s ease;
  pointer-events: none;
}
.wp-tile-label {
  position: absolute;
  left: 0.8rem;
  right: 0.8rem;
  bottom: 0.7rem;
  color: #fff;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.25s ease, transform 0.25s ease;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.45);
  pointer-events: none;
}
.wp-tile-label-title {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-weight: 700;
  font-size: 0.88rem;
  letter-spacing: -0.01em;
  line-height: 1.3;
}
.wp-tile-label-size {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.75rem;
  font-weight: 650;
  opacity: 0.85;
}
@media (hover: hover) and (pointer: fine) {
  .wp-tile:hover img { transform: scale(1.045); }
  .wp-tile:hover .wp-tile-shade,
  .wp-tile:hover .wp-tile-label { opacity: 1; }
  .wp-tile:hover .wp-tile-label { transform: translateY(0); }
}
/* На таче без hover — лёгкая подпись всегда внизу не нужна; title в атрибуте ссылки */
@media (hover: none) {
  .wp-tile-shade {
    opacity: 0.55;
  }
  .wp-tile-label {
    opacity: 1;
    transform: none;
  }
  .wp-tile-label-title {
    -webkit-line-clamp: 1;
  }
}

.wp-pager {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.75rem 1rem;
  width: min(1120px, calc(100% - 2rem));
  margin: 1.5rem auto 2.5rem;
}
.wp-pager-status { color: var(--wp-muted); font-weight: 600; }

.page-wallpapers .modal {
  --ink: #f8fafc;
  --muted: #94a3b8;
  --paper: #111827;
  --line: rgba(255, 255, 255, 0.1);
  --bg-deep: rgba(255, 255, 255, 0.06);
  --accent: var(--wp-accent);
}
.page-wallpapers .modal-backdrop {
  background: rgba(6, 10, 16, 0.72);
  backdrop-filter: blur(10px);
}
.page-wallpapers .modal-dialog {
  background: #0f172a;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
  color: #f8fafc;
  animation: wp-modal-in 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}
.page-wallpapers .modal-close {
  color: #e2e8f0;
  background: rgba(255, 255, 255, 0.06);
}
.page-wallpapers .modal-sheet {
  border-radius: 14px;
  background: #020617;
}
.page-wallpapers .modal-info #modal-title {
  margin: 0 0 0.65rem;
  font-family: var(--font-display);
  font-size: clamp(1.15rem, 2.4vw, 1.55rem);
  letter-spacing: -0.03em;
  line-height: 1.2;
  color: #f8fafc;
}
.page-wallpapers .wp-size-label {
  margin: 0.85rem 0 0.45rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #94a3b8;
}
.page-wallpapers .badge {
  background: rgba(255, 255, 255, 0.07);
  color: #cbd5e1;
  border-radius: 10px;
}
.page-wallpapers .modal-alt {
  margin: 0.35rem 0 0.75rem;
  color: #94a3b8;
  font-size: 0.95rem;
  line-height: 1.45;
}
/* Блок автора/лицензии/источника — как на WallpapersCraft */
.page-wallpapers .author {
  margin: 0.9rem 0 1.05rem;
  padding: 0.75rem 0.85rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #cbd5e1;
  font-size: 0.92rem;
  line-height: 1.45;
}
.page-wallpapers .author_margin { margin-top: 0.85rem; }
.page-wallpapers .author__block + .author__block { margin-top: 0.55rem; }
.page-wallpapers .author__row { margin: 0.1rem 0; }
.page-wallpapers .author__row span {
  color: #f8fafc;
  font-weight: 650;
}
.page-wallpapers .author__block_source {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding-top: 0.55rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.page-wallpapers .gui-icon_source {
  width: 14px;
  height: 14px;
  flex: 0 0 14px;
  border-radius: 50%;
  border: 1.5px solid #5eead4;
  box-shadow: inset 0 0 0 2px transparent;
  background:
    radial-gradient(circle at 50% 50%, #5eead4 0 2px, transparent 2.5px),
    transparent;
  opacity: 0.9;
}
.page-wallpapers .author__link {
  color: var(--wp-accent-2);
  font-weight: 650;
  text-decoration: none;
}
.page-wallpapers .author__link:hover { text-decoration: underline; }
.page-wallpapers .wallpaper__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.55rem;
  margin: 0.55rem 0 0.85rem;
  color: #94a3b8;
  font-size: 0.92rem;
  line-height: 1.5;
}
.page-wallpapers .wallpaper__tag {
  color: #cbd5e1;
}
.page-wallpapers a.wallpaper__tag--link {
  color: var(--wp-accent-2);
  text-decoration: none;
  font-weight: 650;
}
.page-wallpapers a.wallpaper__tag--link:hover {
  text-decoration: underline;
}
.page-wallpapers .wallpaper-info {
  margin: 0.75rem 0 1rem;
}
.page-wallpapers .wallpaper-table {
  display: grid;
  gap: 0.35rem;
  font-size: 0.9rem;
}
.page-wallpapers .wallpaper-table__row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.75rem;
  padding: 0.2rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.page-wallpapers .wallpaper-table__cell:first-child { color: #94a3b8; }
.page-wallpapers .wallpaper-table__cell:last-child {
  color: #f8fafc;
  font-weight: 650;
  text-align: right;
}
.page-wallpapers .wallpaper__button {
  display: block;
  width: 100%;
  margin: 1rem 0 0.35rem;
  padding: 0.85rem 1rem;
  border: 0;
  border-radius: 12px;
  background: linear-gradient(135deg, #0d9488, #14b8a6);
  color: #fff;
  font: inherit;
  font-weight: 750;
  cursor: pointer;
  text-align: center;
}
.page-wallpapers .wallpaper__button:hover { filter: brightness(1.06); }
.page-wallpapers .modal-media {
  align-items: stretch;
}
.page-wallpapers .modal-more-wrap--inline {
  width: 100%;
  margin: 0.95rem 0 0;
  padding: 0.85rem 0 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.page-wallpapers .modal-more-wrap--inline .modal-more {
  margin: 0;
}
.page-wallpapers .modal-more-wrap--inline .modal-more-title {
  font-size: 1.05rem;
  color: #f8fafc;
  font-weight: 750;
}
.page-wallpapers .modal-more-wrap--inline .more-rail {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.7rem;
  overflow: visible;
  padding: 0.15rem 0 0;
  margin: 0;
  scroll-snap-type: none;
}
.page-wallpapers .modal-more-wrap--inline .more-card {
  width: auto;
  flex: none;
  min-width: 0;
}
.page-wallpapers .modal-more-wrap--inline .more-card-media {
  border-radius: 12px;
  border-color: rgba(255, 255, 255, 0.1);
  background: #1a1f27;
  box-shadow: none;
}
.page-wallpapers .modal-more-wrap--inline .more-card img {
  aspect-ratio: auto;
  width: 100%;
  height: auto;
  max-height: none;
  object-fit: unset;
  border-radius: 12px;
  display: block;
}
@media (min-width: 1100px) {
  .page-wallpapers .modal-more-wrap--inline .more-rail {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.85rem;
  }
}
.page-wallpapers .resolutions-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin: 0.4rem 0 0.65rem;
}
.page-wallpapers .resolutions-head__title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 750;
  letter-spacing: -0.02em;
  color: #f8fafc;
}
.page-wallpapers .gui-toggler__switcher {
  display: none;
  width: 100%;
  margin: 0 0 0.65rem;
  padding: 0.65rem 0.85rem;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: #e2e8f0;
  font: inherit;
  font-weight: 650;
  cursor: pointer;
  text-align: left;
}
.page-wallpapers .gui-toggler__switcher-text_alt { display: none; }
.page-wallpapers .gui-toggler_active .gui-toggler__switcher-text { display: none; }
.page-wallpapers .gui-toggler_active .gui-toggler__switcher-text_alt { display: inline; }
.page-wallpapers .gui-toggler__content { display: none; }
.page-wallpapers .gui-toggler_active .gui-toggler__content { display: block; }
@media (min-width: 860px) {
  .page-wallpapers .gui-toggler__switcher { display: none !important; }
  .page-wallpapers .gui-toggler__content { display: block !important; }
}
@media (max-width: 859px) {
  .page-wallpapers .gui-toggler__switcher { display: block; }
}
.page-wallpapers .resolutions__section {
  margin: 0 0 1rem;
  padding: 0 0 0.85rem;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.1);
}
.page-wallpapers .resolutions__section:last-child {
  border-bottom: 0;
  margin-bottom: 0;
  padding-bottom: 0;
}
.page-wallpapers .resolutions__title {
  margin: 0 0 0.55rem;
  font-size: 0.98rem;
  font-weight: 750;
  color: #f8fafc;
}
.page-wallpapers .resolutions__table { margin: 0 0 0.45rem; }
.page-wallpapers .resolutions__row {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: 0.55rem 0.85rem;
  align-items: start;
}
@media (max-width: 640px) {
  .page-wallpapers .resolutions__row { grid-template-columns: 1fr; gap: 0.25rem; }
}
.page-wallpapers .resolutions__caption {
  color: #94a3b8;
  font-size: 0.84rem;
  line-height: 1.4;
}
.page-wallpapers .resolutions__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}
.page-wallpapers .resolutions__link {
  appearance: none;
  border: 1px solid rgba(94, 234, 212, 0.35);
  background: rgba(13, 148, 136, 0.12);
  color: #5eead4;
  border-radius: 8px;
  padding: 0.28rem 0.55rem;
  font: inherit;
  font-size: 0.86rem;
  font-weight: 700;
  cursor: pointer;
}
.page-wallpapers .resolutions__link:hover {
  background: rgba(13, 148, 136, 0.22);
  border-color: rgba(94, 234, 212, 0.55);
}
.page-wallpapers .modal-license { color: #94a3b8; margin-top: 0.75rem; }
.page-wallpapers .modal-license a { color: var(--wp-accent-2); }
.page-wallpapers .modal-actions--sizes .btn {
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  color: #f8fafc;
  box-shadow: none;
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-weight: 700;
}
.page-wallpapers .modal-actions--sizes .btn-primary {
  background: linear-gradient(135deg, #0d9488, #14b8a6);
  border-color: transparent;
  color: #fff;
}
.page-wallpapers .modal-actions--sizes .btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
}
.page-wallpapers .ad-slot {
  background: rgba(255, 255, 255, 0.04);
  border: 1px dashed rgba(255, 255, 255, 0.12);
  color: #94a3b8;
}
.page-wallpapers .progress {
  background: rgba(255, 255, 255, 0.08);
}
.page-wallpapers .progress span {
  background: linear-gradient(90deg, #0d9488, #2dd4bf);
}

@keyframes wp-rise {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes wp-hero-ken {
  from { transform: scale(1.08); }
  to { transform: scale(1.02); }
}
@keyframes wp-tile-in {
  from { opacity: 0; transform: translateY(14px) scale(0.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes wp-modal-in {
  from { opacity: 0; transform: translateY(12px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  .wp-hero-copy,
  .wp-tile,
  .page-wallpapers .modal-dialog,
  .wp-hero-media img {
    animation: none !important;
  }
  .wp-tile img { transition: none; }
}

.page-wallpapers .wp-legal {
  width: min(760px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 2rem 0 3.5rem;
}
.page-wallpapers .wp-legal h1 {
  font-family: var(--font-display);
  letter-spacing: -0.03em;
}
.page-wallpapers .wp-legal h2 {
  margin-top: 1.75rem;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
}
.page-wallpapers .wp-legal a {
  color: var(--wp-accent);
}

/* Кнопка «наверх» */
.to-top {
  position: fixed;
  right: max(1rem, env(safe-area-inset-right, 0px));
  bottom: max(1rem, env(safe-area-inset-bottom, 0px));
  z-index: 40;
  width: 2.75rem;
  height: 2.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 0;
  border: 1px solid rgba(15, 118, 110, 0.28);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.92);
  color: #0f766e;
  font: inherit;
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.14);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease, background 0.15s ease;
}
.to-top:hover {
  background: #fff;
  color: #0d9488;
}
.to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.to-top[hidden] {
  display: none !important;
}
.page-wallpapers .to-top {
  background: rgba(15, 23, 42, 0.78);
  border-color: rgba(255, 255, 255, 0.14);
  color: #f0fdfa;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28);
}
.page-wallpapers .to-top:hover {
  background: rgba(15, 118, 110, 0.95);
  color: #fff;
}
@media (prefers-reduced-motion: reduce) {
  .to-top {
    transition: none;
  }
}

/* Пазлы (/pazly/) */
.page-puzzles .pz-hero {
  position: relative;
  width: 100%;
  max-width: none;
  box-sizing: border-box;
  padding: 1.35rem 1.25rem 1.4rem;
  margin: 0 0 1rem;
  border-radius: 0;
  background:
    radial-gradient(120% 80% at 10% 0%, rgba(13, 148, 136, 0.22), transparent 55%),
    linear-gradient(160deg, #0f172a 0%, #134e4a 48%, #0f172a 100%);
  color: #f8fafc;
  overflow: hidden;
}
.page-puzzles .pz-hero-inner {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.55rem;
}
.page-puzzles .pz-hero .pz-kicker {
  display: none;
}
.page-puzzles .pz-kicker {
  margin: 0 0 0.5rem;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #99f6e4;
  font-weight: 700;
}
.page-puzzles .pz-hero h1,
.page-puzzles .pz-hub-intro h1,
.page-puzzles .pz-play-heading h1 {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1.12;
  margin: 0 0 0.75rem;
}
.page-puzzles .pz-hero h1 {
  margin: 0;
  max-width: 28ch;
  font-size: clamp(1.35rem, 2.8vw, 1.85rem);
  line-height: 1.18;
}
.page-puzzles .pz-hero .pz-lead {
  margin: 0;
  max-width: 40rem;
  color: rgba(248, 250, 252, 0.78);
  font-size: 0.95rem;
  line-height: 1.45;
}
.page-puzzles .pz-lead {
  margin: 0 0 1.25rem;
  max-width: 38rem;
  color: rgba(248, 250, 252, 0.86);
  font-size: 1.05rem;
}
.page-puzzles .pz-hub-intro .pz-lead,
.page-puzzles .pz-section-head p {
  color: #475569;
}
.page-puzzles .pz-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0.25rem 0 0;
}
.page-puzzles .pz-hero-actions .wp-btn {
  padding: 0.5rem 0.95rem;
  font-size: 0.9rem;
}
.page-puzzles .pz-section-head {
  margin: 0 0 1rem;
}
.page-puzzles .pz-section-head h2 {
  margin: 0 0 0.35rem;
  font-family: var(--font-display);
  font-size: 1.35rem;
}
.page-puzzles .pz-section-head p,
.page-puzzles .pz-hub-meta {
  margin: 0;
  color: #64748b;
}
.page-puzzles .pz-daily,
.page-puzzles .pz-modes,
.page-puzzles .pz-cats,
.page-puzzles .pz-gallery,
.page-puzzles .pz-faq,
.page-puzzles .pz-related,
.page-puzzles .pz-hub-intro {
  padding: 0 1.25rem 2rem;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}
.page-puzzles .pz-daily-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
}
.page-puzzles .pz-daily-card {
  position: relative;
  display: block;
  text-decoration: none;
  color: #f8fafc;
  border-radius: 0.85rem;
  overflow: hidden;
  background: #0f172a;
  isolation: isolate;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.14);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.page-puzzles .pz-daily-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 28px rgba(15, 23, 42, 0.2);
}
.page-puzzles .pz-daily-card img {
  width: 100%;
  height: auto;
  display: block;
  aspect-ratio: 4 / 5;
  object-fit: cover;
}
.page-puzzles .pz-daily-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.05) 40%, rgba(15, 23, 42, 0.82) 100%);
  pointer-events: none;
  z-index: 1;
}
.page-puzzles .pz-daily-meta {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.2rem;
  padding: 0.7rem 0.75rem 0.75rem;
}
.page-puzzles .pz-daily-eyebrow {
  font-size: 0.68rem;
  color: #99f6e4;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.page-puzzles .pz-daily-title {
  font-family: var(--font-display);
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.page-puzzles .pz-daily-cta {
  margin-top: 0.2rem;
  display: inline-flex;
  align-items: center;
  padding: 0.28rem 0.55rem;
  border-radius: 999px;
  background: rgba(45, 212, 191, 0.95);
  color: #042f2e;
  font-size: 0.72rem;
  font-weight: 750;
}
@media (max-width: 980px) {
  .page-puzzles .pz-daily-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 520px) {
  .page-puzzles .pz-daily-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.55rem;
  }
  .page-puzzles .pz-daily-title {
    font-size: 0.84rem;
  }
}
.page-puzzles .pz-mode-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(13.5rem, 1fr));
  gap: 0.7rem;
}
.page-puzzles .pz-mode-card {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-height: 6.5rem;
  padding: 0.95rem 1rem;
  border-radius: 0.9rem;
  text-decoration: none;
  color: inherit;
  background:
    linear-gradient(160deg, rgba(240, 253, 250, 0.9), rgba(241, 245, 249, 0.95));
  border: 1px solid #dbe4ee;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.page-puzzles .pz-mode-card:hover {
  border-color: #5eead4;
  transform: translateY(-1px);
}
.page-puzzles .pz-mode-name {
  font-family: var(--font-display);
  font-weight: 750;
  font-size: 1.05rem;
  color: #0f766e;
}
.page-puzzles .pz-mode-desc {
  color: #64748b;
  font-size: 0.88rem;
  line-height: 1.35;
}
.page-puzzles .pz-cat-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(11.5rem, 1fr));
  gap: 0.65rem;
}
.page-puzzles .pz-cat-grid a {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  align-items: baseline;
  padding: 0.85rem 0.95rem;
  border-radius: 0.75rem;
  background: #f1f5f9;
  color: #0f172a;
  text-decoration: none;
  font-weight: 650;
  transition: background 0.15s ease, transform 0.15s ease;
}
.page-puzzles .pz-cat-grid a:hover {
  background: #e2e8f0;
  transform: translateY(-1px);
}
.page-puzzles .pz-cat-count {
  color: #64748b;
  font-size: 0.85rem;
  font-weight: 600;
}
.page-puzzles .pz-faq-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  gap: 0.85rem;
}
.page-puzzles .pz-faq-grid article {
  padding: 1rem 1.05rem;
  border-radius: 0.85rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}
.page-puzzles .pz-faq-grid h3 {
  margin: 0 0 0.4rem;
  font-size: 1rem;
}
.page-puzzles .pz-faq-grid p {
  margin: 0;
  color: #475569;
  font-size: 0.95rem;
}
.page-puzzles .pz-crumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
  padding: 1rem 1.25rem 0.25rem;
  max-width: 1200px;
  margin: 0 auto;
  color: #64748b;
  font-size: 0.9rem;
}
.page-puzzles .pz-crumbs a {
  color: #0f766e;
  text-decoration: none;
}
.page-puzzles .pz-hub-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  margin-top: 0.75rem !important;
}
.page-puzzles .pz-hub-meta a {
  color: #0f766e;
  text-decoration: none;
  font-weight: 650;
}

/* Play */
.page-puzzle-play .pz-app {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0.75rem 1rem 1.5rem;
}
.page-puzzle-play .pz-play-top {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  align-items: flex-start;
  margin-bottom: 0.75rem;
}
.page-puzzle-play .pz-back {
  color: #0f766e;
  text-decoration: none;
  font-weight: 650;
  padding-top: 0.35rem;
}
.page-puzzle-play .pz-play-heading { flex: 1 1 12rem; min-width: 0; }
.page-puzzle-play .pz-play-heading h1 {
  font-size: clamp(1.2rem, 2.8vw, 1.75rem);
  margin: 0;
  color: #0f172a;
}
.page-puzzle-play .pz-play-heading .pz-kicker { color: #0f766e; }
.page-puzzle-play .pz-play-sizes {
  display: flex;
  gap: 0.35rem;
}
.page-puzzle-play .pz-size-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.75rem;
  height: 2.4rem;
  padding: 0 0.65rem;
  border-radius: 0.65rem;
  background: #e2e8f0;
  color: #0f172a;
  text-decoration: none;
  font-weight: 700;
}
.page-puzzle-play .pz-size-btn.is-active {
  background: #0f766e;
  color: #fff;
}
.page-puzzle-play .pz-play-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 0.75rem;
}
.page-puzzle-play .pz-status {
  margin: 0 0 0 0.25rem;
  color: #64748b;
  font-weight: 650;
}
.page-puzzle-play .pz-play-modes {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0 0 0.75rem;
}
.page-puzzle-play .pz-mode-btn {
  display: inline-flex;
  align-items: center;
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  border: 1px solid #cbd5e1;
  background: #fff;
  color: #334155;
  text-decoration: none;
  font-size: 0.84rem;
  font-weight: 650;
}
.page-puzzle-play .pz-mode-btn.is-active,
.page-puzzle-play .pz-mode-btn:hover {
  border-color: #0f766e;
  background: #0f766e;
  color: #fff;
}
.page-puzzle-play .pz-stage-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.75rem;
  align-items: stretch;
  min-height: min(78vh, 820px);
}
.page-puzzle-play .pz-stage {
  background:
    linear-gradient(180deg, #e2e8f0, #f8fafc);
  border: 1px solid #cbd5e1;
  border-radius: 1rem;
  min-height: min(78vh, 820px);
  height: 100%;
  display: flex;
  align-items: stretch;
  justify-content: stretch;
  padding: 0;
  overflow: hidden;
}
.page-puzzle-play .pz-preview-panel {
  width: min(280px, 100%);
  padding: 0.75rem;
  border-radius: 0.85rem;
  background: #fff;
  border: 1px solid #e2e8f0;
}
.page-puzzle-play .pz-preview-panel img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 0.5rem;
  margin-bottom: 0.65rem;
}
.page-puzzle-play .pz-preview-label {
  margin: 0 0 0.5rem;
  font-size: 0.8rem;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.page-puzzle-play .pz-done {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: rgba(15, 23, 42, 0.55);
}
.page-puzzle-play .pz-done[hidden] { display: none !important; }
.page-puzzle-play .pz-done-card {
  width: min(26rem, 100%);
  background: #fff;
  border-radius: 1rem;
  padding: 1.25rem 1.35rem;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
}
.page-puzzle-play .pz-done-card h2 {
  margin: 0 0 0.5rem;
  font-family: var(--font-display);
}
.page-puzzle-play .pz-done-card p {
  margin: 0 0 1rem;
  color: #475569;
}
.page-puzzle-play .pz-done-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}
.page-puzzle-play .pz-related {
  padding-top: 0.5rem;
}
.page-puzzle-play .pz-related-rail {
  padding: 0 1.25rem 2rem;
}
@media (max-width: 820px) {
  .page-puzzle-play .pz-stage-wrap {
    grid-template-columns: 1fr;
    min-height: min(72vh, 680px);
  }
  .page-puzzle-play .pz-stage {
    min-height: min(72vh, 680px);
  }
  .page-puzzle-play .pz-preview-panel {
    width: 100%;
  }
}

.header-nav {
  display: flex;
  gap: 0.85rem;
  align-items: center;
  flex-shrink: 0;
}
.header-nav a {
  color: inherit;
  text-decoration: none;
  font-weight: 650;
  font-size: 0.95rem;
  opacity: 0.88;
}
.header-nav a:hover { opacity: 1; text-decoration: underline; }
.page-wallpapers .header-nav a {
  color: var(--wp-ink, #0f172a);
}

.header-search {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex: 1 1 14rem;
  min-width: 0;
  max-width: 28rem;
  margin-inline: auto;
}
.header-search-input {
  flex: 1 1 auto;
  min-width: 0;
  width: 100%;
  height: 2.35rem;
  padding: 0 0.9rem;
  border: 1px solid rgba(14, 18, 24, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--wp-ink, #0e1218);
  font: inherit;
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.header-search-input::placeholder {
  color: #8a93a3;
}
.header-search-input:focus {
  border-color: rgba(13, 148, 136, 0.55);
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.18);
}
.header-search-btn {
  flex-shrink: 0;
  height: 2.35rem;
  padding: 0 0.95rem;
  border: 0;
  border-radius: 999px;
  background: #0d9488;
  color: #fff;
  font: inherit;
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
}
.header-search-btn:hover {
  background: #0f766e;
}
.page-wallpapers .header-inner {
  gap: 0.75rem 1rem;
}
@media (max-width: 640px) {
  .page-wallpapers .header-inner {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
  }
  .page-wallpapers .header-search {
    order: 3;
    flex: 1 1 100%;
    max-width: none;
    margin-inline: 0;
  }
  .page-wallpapers .header-search-btn {
    padding: 0 0.8rem;
  }
}

.wp-search-head {
  padding-inline: 0.75rem;
}
@media (min-width: 720px) {
  .wp-search-head { padding-inline: 1rem; }
}
.wp-search-hubs {
  width: min(1120px, calc(100% - 1.5rem));
  margin: 0 auto 1.25rem;
}
.wp-search-hubs-title {
  margin: 0 0 0.65rem;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--wp-muted, #6b7585);
}
.wp-search-hubs-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.wp-search-hub {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(14, 18, 24, 0.08);
  color: var(--wp-ink, #0e1218);
  text-decoration: none;
  font-weight: 650;
  font-size: 0.92rem;
}
.wp-search-hub:hover {
  border-color: rgba(13, 148, 136, 0.35);
  color: #0f766e;
}
.wp-search-hub-count {
  color: var(--wp-muted, #6b7585);
  font-weight: 600;
  font-size: 0.82rem;
}
.wp-puzzle-cta {
  margin: 0.85rem 0 1rem;
}
.wp-puzzle-cta .btn {
  width: 100%;
  text-align: center;
}
.page-wallpapers .wp-puzzle-cta + .resolutions-head {
  margin-top: 0.15rem;
}

/* Puzzle v2: badges, continue, jigsaw, timer, SEO */
.pz-card { position: relative; }
.pz-badge {
  position: absolute;
  top: 0.55rem;
  left: 0.55rem;
  z-index: 2;
  padding: 0.22rem 0.45rem;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.78);
  color: #f8fafc;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  pointer-events: none;
}
.pz-badge--sm {
  top: 0.35rem;
  left: 0.35rem;
  font-size: 0.65rem;
  padding: 0.15rem 0.35rem;
}
.more-card-media { position: relative; display: block; }
.pz-card-solves {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.75rem;
  color: #64748b;
}
.pz-continue {
  padding: 0 1.25rem 1.25rem;
  max-width: 1200px;
  margin: 0 auto;
}
.pz-continue-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr));
  gap: 0.65rem;
}
.pz-continue-card {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  padding: 0.55rem;
  border-radius: 0.75rem;
  background: #fff;
  border: 1px solid #e2e8f0;
  text-decoration: none;
  color: inherit;
}
.pz-continue-media {
  width: 3.25rem;
  height: 4.25rem;
  border-radius: 0.4rem;
  overflow: hidden;
  background: #e2e8f0;
  flex-shrink: 0;
}
.pz-continue-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.pz-continue-title {
  display: block;
  font-weight: 700;
  font-size: 0.92rem;
  line-height: 1.25;
}
.pz-continue-progress {
  display: block;
  margin-top: 0.2rem;
  color: #0f766e;
  font-size: 0.8rem;
  font-weight: 650;
}
.pz-more-link {
  margin: 0.75rem 0 0;
}
.pz-more-link a {
  color: #0f766e;
  font-weight: 650;
  text-decoration: none;
}
.pz-seo {
  padding: 0 1.25rem 2.5rem;
  max-width: 1200px;
  margin: 0 auto;
}
.pz-seo-text {
  margin: 0 0 1rem;
  max-width: 46rem;
  color: #475569;
  line-height: 1.55;
}
.pz-faq-list {
  display: grid;
  gap: 0.45rem;
  max-width: 46rem;
}
.pz-faq-item {
  border: 1px solid #e2e8f0;
  border-radius: 0.65rem;
  background: #fff;
  padding: 0.65rem 0.85rem;
}
.pz-faq-item summary {
  cursor: pointer;
  font-weight: 700;
}
.pz-faq-item p {
  margin: 0.45rem 0 0;
  color: #475569;
  font-size: 0.95rem;
}
.page-puzzle-play .pz-solves {
  margin: 0.25rem 0 0;
  color: #0f766e;
  font-size: 0.88rem;
  font-weight: 650;
}
.page-puzzle-play .pz-timer {
  margin: 0;
  min-width: 5.5rem;
  color: #475569;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.page-puzzle-play .pz-hint {
  margin: 0 0 0.65rem;
  color: #64748b;
  font-size: 0.82rem;
}
.page-puzzle-play [data-pz-timer-toggle].is-active {
  background: #0f766e;
  color: #fff;
  border-color: #0f766e;
}
.page-puzzle-play .pz-viewport {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: min(72vh, 780px);
  display: block;
  overflow: hidden;
  touch-action: none;
  cursor: grab;
}
.page-puzzle-play .pz-board {
  position: absolute;
  left: 0;
  top: 0;
  transform-origin: 0 0;
  overflow: visible;
  touch-action: none;
  background:
    linear-gradient(90deg, rgba(15, 118, 110, 0.22) 0 1px, transparent 1px),
    linear-gradient(180deg, rgba(15, 118, 110, 0.22) 0 1px, transparent 1px),
    repeating-conic-gradient(#f1f5f9 0% 25%, #e2e8f0 0% 50%) 0 0 / 28px 28px;
  background-repeat: no-repeat, no-repeat, repeat;
  background-size: 100% 1px, 1px 100%, 28px 28px;
}
.page-puzzle-play .pz-board-frame {
  position: absolute;
  z-index: 0;
  pointer-events: none;
  box-shadow: inset 0 0 0 2px rgba(15, 118, 110, 0.55);
  border-radius: 2px;
}
.page-puzzle-play .pz-board.is-easy {
  box-shadow: inset 0 0 0 3px rgba(15, 118, 110, 0.55);
}
.page-puzzle-play .pz-piece {
  position: absolute;
  left: 0;
  top: 0;
  display: block;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: grab;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  filter: drop-shadow(0 3px 7px rgba(15, 23, 42, 0.28));
  z-index: 2;
  transform-origin: center center;
  transition: filter 0.12s ease;
}
.page-puzzle-play .pz-piece.is-edge {
  filter: drop-shadow(0 0 1px rgba(45, 212, 191, 0.95)) drop-shadow(0 3px 8px rgba(15, 23, 42, 0.28));
  z-index: 4;
}
.page-puzzle-play .pz-piece.is-dragging {
  cursor: grabbing;
  z-index: 30 !important;
  filter: drop-shadow(0 16px 26px rgba(15, 23, 42, 0.42)) drop-shadow(0 2px 0 rgba(255, 255, 255, 0.35));
  transition: none;
}
.page-puzzle-play .pz-piece.is-locked {
  cursor: default;
  filter: none;
  z-index: 1;
}
.page-puzzle-play .pz-board.is-complete .pz-piece {
  filter: none;
}
.page-puzzle-play .pz-crosslinks {
  padding: 1rem 1rem 0.25rem;
  max-width: 1200px;
  margin: 0 auto;
}
.page-puzzle-play .pz-crosslinks-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  gap: 0.65rem;
}
.page-puzzle-play .pz-crosslink {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0.85rem 1rem;
  border-radius: 0.75rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  text-decoration: none;
  color: inherit;
}
.page-puzzle-play .pz-crosslink strong {
  color: #0f766e;
}
.page-puzzle-play .pz-crosslink span {
  color: #64748b;
  font-size: 0.88rem;
}

.page-puzzle-play .pz-board-ghost {
  position: absolute;
  z-index: 0;
  pointer-events: none;
  background-size: 100% 100%;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0.18;
  filter: saturate(1.08);
  box-shadow: inset 0 0 0 2px rgba(15, 118, 110, 0.5);
}
.page-puzzle-play .pz-board-ghost.is-strong {
  opacity: 0.34;
}
.page-puzzle-play .pz-board-ghost.is-dark {
  opacity: 0.46;
  filter: brightness(1.55) contrast(1.12) saturate(1.15);
}
.page-puzzle-play .pz-board.is-dark-image {
  background-color: #1e293b;
  background-image:
    linear-gradient(90deg, rgba(148, 163, 184, 0.35) 0 1px, transparent 1px),
    linear-gradient(180deg, rgba(148, 163, 184, 0.35) 0 1px, transparent 1px),
    repeating-conic-gradient(#334155 0% 25%, #1e293b 0% 50%) 0 0 / 24px 24px;
  background-size: 100% 1px, 1px 100%, 24px 24px;
  box-shadow: inset 0 0 0 2px rgba(94, 234, 212, 0.55);
}
.page-puzzle-play .pz-piece.is-near {
  filter: drop-shadow(0 0 0 rgba(45, 212, 191, 1)) drop-shadow(0 0 14px rgba(45, 212, 191, 0.85)) !important;
}
.page-puzzle-play .pz-piece.is-snap {
  animation: pz-snap-flash 0.26s ease-out;
}
@keyframes pz-snap-flash {
  0% { filter: drop-shadow(0 0 16px rgba(45, 212, 191, 1)) brightness(1.16); }
  100% { filter: none; }
}
