:root {
  --ink: #14202a;
  --muted: #5b6b76;
  --line: #d7e0e6;
  --paper: #f3f7f8;
  --surface: #ffffff;
  --lagoon: #1f6f73;
  --lagoon-soft: #d9eef0;
  --sand: #c48a3a;
  --reserved: #8a6b4a;
  --shadow: 0 18px 50px rgba(20, 32, 42, 0.14);
  --radius: 14px;
  --font: "Manrope", system-ui, sans-serif;
  --display: "Instrument Serif", Georgia, serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: var(--font);
  color: var(--ink);
  background:
    radial-gradient(ellipse 80% 50% at 100% -10%, rgba(31, 111, 115, 0.12), transparent 55%),
    radial-gradient(ellipse 60% 40% at 0% 100%, rgba(196, 138, 58, 0.08), transparent 50%),
    linear-gradient(180deg, #eef4f5 0%, var(--paper) 40%, #e8f0f1 100%);
}

a { color: inherit; }

.page {
  width: min(1100px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 64px;
}

.site-header {
  display: grid;
  gap: 20px;
  margin-bottom: 24px;
}

.brand {
  margin: 0;
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(3rem, 10vw, 5.5rem);
  line-height: 0.92;
  letter-spacing: -0.03em;
}

.brand em {
  font-style: italic;
  color: var(--lagoon);
}

.lede {
  margin: 10px 0 0;
  max-width: 36rem;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.45;
}

.intro {
  max-width: 42rem;
  color: #314047;
  font-size: 1.02rem;
  line-height: 1.55;
}

.intro p {
  margin: 0 0 0.85rem;
}

.intro-lead {
  font-family: var(--display);
  font-size: clamp(1.45rem, 3.5vw, 1.85rem);
  line-height: 1.2;
  color: var(--ink);
}

.intro-label {
  margin-top: 1.1rem !important;
  font-weight: 700;
  color: var(--ink);
}

.intro-contacts {
  margin: 0 0 1rem;
  padding: 0;
  list-style: none;
}

.intro-contacts li {
  margin: 0 0 0.55rem;
}

.intro-contacts a {
  color: var(--lagoon);
  font-weight: 650;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.intro-contacts a:hover {
  color: var(--ink);
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-stack {
  display: grid;
  gap: 10px;
}

.modal-group {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 600;
}

.modal-group:empty,
.modal-group[hidden] {
  display: none;
}

.col-group {
  color: var(--muted);
  font-size: 0.95rem;
  white-space: nowrap;
}

.chip {
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 600;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.chip:hover { border-color: #b7c8cf; }
.chip.is-active {
  background: var(--lagoon);
  border-color: var(--lagoon);
  color: #fff;
}

.count {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 600;
}

.empty {
  margin: 48px 0;
  padding: 28px;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  text-align: center;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.55);
}

.table-wrap {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.catalog {
  width: 100%;
  border-collapse: collapse;
}

.catalog th,
.catalog td {
  padding: 14px 16px;
  text-align: left;
  vertical-align: middle;
  border-bottom: 1px solid var(--line);
}

.catalog thead th {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  background: #f7fbfc;
}

.catalog tbody tr:last-child td {
  border-bottom: 0;
}

.lot-row {
  cursor: pointer;
  transition: background 0.15s ease;
}

.lot-row:hover,
.lot-row:focus-visible {
  background: #f3fafb;
  outline: none;
}

.lot-row.is-reserved {
  opacity: 0.62;
}

.lot-row.is-reserved:hover,
.lot-row.is-reserved:focus-visible {
  opacity: 0.82;
}

.sort {
  text-decoration: none;
  color: inherit;
}

.sort.is-active {
  color: var(--lagoon);
}

.thumb {
  display: block;
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: 12px;
  background: #e5eef0;
}

.thumb-empty {
  background:
    linear-gradient(135deg, #e5eef0, #f7fbfc);
}

.lot-no {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.title {
  font-weight: 600;
  line-height: 1.3;
}

.mobile-meta {
  display: none;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--lagoon-soft);
  color: var(--lagoon);
  font-size: 0.78rem;
  font-weight: 700;
  white-space: nowrap;
}

.badge-reserved {
  background: #f3e8d8;
  color: var(--reserved);
}

.col-price,
.col-date {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.modal[hidden] { display: none; }

.modal {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 16px;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 20, 28, 0.55);
  backdrop-filter: blur(4px);
}

.modal-dialog {
  position: relative;
  z-index: 1;
  width: min(820px, 100%);
  max-height: min(90vh, 900px);
  overflow: auto;
  border-radius: 20px;
  background: var(--surface);
  box-shadow: var(--shadow);
  animation: modal-in 0.28s ease;
}

@keyframes modal-in {
  from { opacity: 0; transform: translateY(12px) scale(0.98); }
  to { opacity: 1; transform: none; }
}

.modal-close {
  position: absolute;
  top: 10px;
  right: 12px;
  z-index: 2;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
}

.gallery {
  background: #0f1c24;
}

.gallery-main {
  display: block;
  width: 100%;
  max-height: 420px;
  object-fit: contain;
  background: #0f1c24;
}

.gallery-main.is-empty {
  display: none;
}

.gallery-thumbs {
  display: flex;
  gap: 8px;
  padding: 10px 12px 12px;
  overflow-x: auto;
}

.gallery-thumbs:empty { display: none; }

.gallery-thumbs button {
  flex: 0 0 auto;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 10px;
  overflow: hidden;
  background: none;
  cursor: pointer;
}

.gallery-thumbs button.is-active {
  border-color: #fff;
}

.gallery-thumbs img {
  display: block;
  width: 64px;
  height: 64px;
  object-fit: cover;
}

.modal-body {
  padding: 22px 24px 28px;
}

.modal-lot {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.modal-title {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  font-weight: 400;
  line-height: 1.1;
}

.modal-price {
  margin: 12px 0 0;
  font-size: 1.35rem;
  font-weight: 700;
}

.modal-status { margin: 12px 0 0; }

.modal-desc {
  margin: 16px 0 0;
  color: #314047;
  white-space: pre-wrap;
  line-height: 1.55;
}

.modal-date {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

@media (max-width: 760px) {
  .page {
    width: min(100% - 16px, 1100px);
    padding: 14px 0 40px;
  }

  .site-header {
    gap: 14px;
    margin-bottom: 14px;
  }

  .brand {
    font-size: clamp(2.4rem, 12vw, 3.4rem);
  }

  .intro {
    font-size: 0.95rem;
    line-height: 1.45;
  }

  .intro p {
    margin: 0 0 0.55rem;
  }

  .intro-lead {
    font-size: 1.25rem;
  }

  .toolbar {
    gap: 8px;
  }

  .filter-stack {
    gap: 8px;
  }

  .filters {
    gap: 6px;
  }

  .chip {
    padding: 6px 11px;
    font-size: 0.84rem;
  }

  .count {
    font-size: 0.84rem;
  }

  .table-wrap {
    border-radius: 14px;
    box-shadow: 0 8px 24px rgba(20, 32, 42, 0.08);
  }

  .catalog thead {
    display: none;
  }

  .catalog,
  .catalog tbody {
    display: block;
    width: 100%;
  }

  .catalog tr.lot-row {
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr);
    column-gap: 12px;
    row-gap: 0;
    align-items: start;
    width: 100%;
    padding: 10px 12px;
    border-bottom: 1px solid var(--line);
  }

  .catalog tr.lot-row:last-child {
    border-bottom: 0;
  }

  .catalog td {
    display: none;
    width: auto;
    padding: 0;
    border: 0;
  }

  .catalog td.col-photo,
  .catalog td.col-title {
    display: block;
  }

  .catalog td.col-photo {
    grid-column: 1;
    grid-row: 1;
  }

  .catalog td.col-title {
    grid-column: 2;
    grid-row: 1;
    min-width: 0;
  }

  .thumb {
    width: 64px;
    height: 64px;
    border-radius: 10px;
  }

  .title {
    display: block;
    font-size: 0.98rem;
    line-height: 1.25;
  }

  .title::before {
    content: "#" attr(data-lot) " · ";
    color: var(--muted);
    font-weight: 700;
    font-variant-numeric: tabular-nums;
  }

  .mobile-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 8px;
    margin-top: 4px;
    align-items: center;
    color: var(--muted);
    font-size: 0.82rem;
    line-height: 1.3;
  }

  .badge {
    padding: 2px 8px;
    font-size: 0.72rem;
  }

  .modal-dialog {
    max-height: 94vh;
  }

  .gallery-main {
    max-height: 280px;
  }

  .modal-body {
    padding: 16px 16px 22px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .modal-dialog { animation: none; }
}
