:root {
  --bg: #22252a;
  --surface: #2a2d33;
  --surface-soft: #2d3138;
  --text: #f2f2f0;
  --muted: #a8adb5;
  --muted-strong: #d7d9dd;
  --border: rgba(242, 242, 240, 0.08);
  --border-strong: rgba(242, 242, 240, 0.14);
  --shadow: 0 12px 28px rgba(0, 0, 0, 0.16);
  --shadow-hover: 0 16px 34px rgba(0, 0, 0, 0.22);
  --radius-card: 16px;
  --radius-image: 12px;
  --max-width: 1200px;
}

* {
  box-sizing: border-box;
}

html {
  font-size: 16px;
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--text);
  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
}

img {
  display: block;
  max-width: 100%;
}

button {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 90;
  padding: 0;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.12);
}

.site-header__inner,
.page-shell {
  width: min(100%, var(--max-width));
  margin: 0 auto;
}

.site-header__inner {
  padding: 12px 18px;
}

.site-header__brand {
  margin: 0;
  font-size: 1.02rem;
  font-weight: 700;
  letter-spacing: 0.24em;
  text-transform: lowercase;
  color: var(--muted-strong);
}

.page-shell {
  padding: 18px 18px 40px;
}

.notice-block {
  margin-bottom: 24px;
  padding: 18px 20px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.notice-block p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.objects-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

.objects-grid--gallery {
  align-items: start;
}

.object-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  background: var(--surface);
  box-shadow: var(--shadow);
  transition:
    transform 140ms ease,
    box-shadow 140ms ease,
    border-color 140ms ease;
}

.object-card__link {
  display: block;
  padding: 12px;
  color: inherit;
  text-decoration: none;
}

.object-card__image-wrap {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: var(--radius-image);
  background: #343840;
}

.object-card__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 180ms ease, filter 180ms ease;
}

.object-card__meta {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 10px 14px;
  padding: 14px 2px 2px;
}

.object-card__title,
.object-card__count {
  margin: 0;
}

.object-card__title {
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.35;
  text-align: center;
  justify-self: center;
  max-width: 100%;
  text-wrap: balance;
}

.object-card__count {
  flex-shrink: 0;
  font-size: 0.875rem;
  color: var(--muted);
  justify-self: end;
}

.site-header--object {
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 0;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.12);
}

.page-shell--object {
  padding-top: 20px;
}

.object-header-bar {
  padding: 10px 0;
  background: var(--surface);
}

.object-topbar {
  display: grid;
  grid-template-columns: minmax(92px, 1fr) minmax(0, 2fr) minmax(92px, 1fr);
  align-items: center;
  gap: 12px;
  min-height: 56px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid rgba(242, 242, 240, 0.16);
  border-radius: 999px;
  color: var(--muted-strong);
  text-decoration: none;
  background: #353942;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.16);
  transition:
    background 140ms ease,
    border-color 140ms ease,
    color 140ms ease,
    transform 140ms ease;
}

.object-topbar__side {
  display: flex;
  align-items: center;
}

.object-topbar__side--left {
  justify-content: flex-start;
}

.object-topbar__side--right {
  justify-content: flex-end;
}

.object-topbar__center {
  min-width: 0;
  text-align: center;
}

.object-topbar__count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 13px;
  border: 1px solid rgba(242, 242, 240, 0.14);
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--muted-strong);
  background: #333740;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
  white-space: nowrap;
}

.object-topbar__eyebrow {
  margin: 0 0 4px;
  font-size: 0.75rem;
  color: var(--muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.object-topbar__title {
  margin: 0;
  font-size: clamp(1.125rem, 4.8vw, 1.5rem);
  line-height: 1.2;
  font-weight: 600;
  text-wrap: balance;
}

.info-block {
  margin-bottom: 28px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.info-block__inner {
  padding: 18px 20px;
}

.info-block p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.info-block p + p {
  margin-top: 12px;
}

.object-gallery {
  column-count: 1;
  column-gap: 18px;
}

.gallery-item {
  break-inside: avoid;
  margin: 0 0 22px;
}

.gallery-item__image {
  width: 100%;
  height: auto;
  border-radius: 10px;
  background: #343840;
}

.gallery-item__button {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}

.gallery-item__caption {
  padding: 10px 2px 0;
  font-size: 0.8125rem;
  color: var(--muted);
}

.lightbox-open {
  overflow: hidden;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
}

.lightbox[hidden] {
  display: none;
}

.lightbox__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(4, 4, 5, 0.96);
}

.lightbox__dialog {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  padding: 12px;
  color: rgba(255, 255, 255, 0.96);
}

.lightbox__topbar {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 12px;
}

.lightbox__caption {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.72);
}

.lightbox__close,
.lightbox__nav {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
}

.lightbox__close {
  width: 52px;
  height: 52px;
  padding: 0;
  border-radius: 999px;
  cursor: pointer;
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(12, 12, 14, 0.68);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.22);
}

.lightbox__close span {
  font-size: 1.9rem;
  line-height: 1;
}

.lightbox__stage {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  min-height: 0;
}

.lightbox__image-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  padding: 4px 0 12px;
  touch-action: pan-y;
}

.lightbox__image {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
}

.lightbox__nav {
  position: absolute;
  top: 50%;
  z-index: 1;
  width: 48px;
  height: 48px;
  padding: 0;
  border-radius: 999px;
  cursor: pointer;
  transform: translateY(-50%);
}

.lightbox__nav span {
  font-size: 2rem;
  line-height: 1;
}

.lightbox__nav--prev {
  left: 0;
}

.lightbox__nav--next {
  right: 0;
}

.lightbox__nav:disabled {
  opacity: 0.4;
  cursor: default;
}

.back-link:focus-visible,
.lightbox__close:focus-visible,
.lightbox__nav:focus-visible {
  outline: 2px solid rgba(242, 242, 240, 0.45);
  outline-offset: 2px;
}

.back-link:active,
.lightbox__close:active,
.lightbox__nav:active {
  transform: translateY(1px);
}

@media (min-width: 680px) {
  .site-header__inner {
    padding-top: 14px;
    padding-bottom: 14px;
  }

  .site-header--object {
    padding-top: 0;
  }

  .page-shell {
    padding-bottom: 56px;
  }

  .objects-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
  }

  .object-topbar {
    grid-template-columns: minmax(120px, 1fr) minmax(0, 2.4fr) minmax(120px, 1fr);
    min-height: 60px;
  }

  .object-gallery {
    column-count: 2;
    column-gap: 20px;
  }

  .lightbox__dialog {
    padding: 18px 22px 18px;
  }

  .lightbox__nav--prev {
    left: 8px;
  }

  .lightbox__nav--next {
    right: 8px;
  }
}

@media (min-width: 1024px) {
  .objects-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .object-card:hover {
    transform: translateY(-2px);
    border-color: var(--border-strong);
    box-shadow: var(--shadow-hover);
  }

  .object-card:hover .object-card__image {
    transform: scale(1.02);
    filter: brightness(0.985);
  }

  .object-gallery {
    column-count: 3;
    column-gap: 24px;
  }

  .back-link:hover {
    border-color: rgba(242, 242, 240, 0.24);
    background: #3a3f49;
    color: var(--text);
  }

  .object-topbar__count {
    border-color: rgba(242, 242, 240, 0.18);
  }

  .gallery-item__button:hover .gallery-item__image {
    filter: brightness(0.985);
  }

  .lightbox__close:hover,
  .lightbox__nav:hover {
    background: rgba(20, 20, 22, 0.82);
    border-color: rgba(255, 255, 255, 0.28);
  }
}
