*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --cream: #f5f0e8;
  --warm-white: #faf8f4;
  --sand: #e8e0d0;
  --stone: #c4b9a8;
  --charcoal: #2c2822;
  --muted: #6e6456;
  --label: #7c7162;
  --accent: #8a6a4b;
  --sold: #c4b9a8;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Jost", sans-serif;
  background: var(--warm-white);
  color: var(--charcoal);
  font-weight: 300;
  letter-spacing: 0.02em;
}

/* Skip link (keyboard users) */
.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 999;
  background: var(--charcoal);
  color: var(--cream);
  padding: 12px 22px;
  font-size: 0.65rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-decoration: none;
  transition: top 0.25s ease;
}
.skip-link:focus {
  top: 12px;
}

/* Visible focus ring for keyboard navigation */
a:focus-visible,
button:focus-visible,
.card:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
  border-radius: 1px;
}

/* Custom cursor — desktop pointer only, disabled for reduced-motion */
.cursor {
  position: fixed;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 9999;
  mix-blend-mode: multiply;
  transition: transform 0.15s ease;
  display: none;
}
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .cursor {
    display: block;
  }
  body,
  body a,
  body button,
  .card,
  .card-view,
  .filter-tab,
  .btn-buy,
  .btn-contact,
  .modal-close {
    cursor: none;
  }
}
.cursor-dot {
  width: 8px;
  height: 8px;
  background: var(--charcoal);
  border-radius: 50%;
  position: absolute;
  transform: translate(-50%, -50%);
  transition:
    width 0.2s,
    height 0.2s;
}
.cursor-ring {
  width: 36px;
  height: 36px;
  border: 1px solid var(--charcoal);
  border-radius: 50%;
  position: absolute;
  transform: translate(-50%, -50%);
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  opacity: 0.5;
}
body:has(a:hover) .cursor-ring,
body:has(.card:hover) .cursor-ring,
body:has(button:hover) .cursor-ring {
  width: 56px;
  height: 56px;
  opacity: 0.25;
}

/* Header */
header {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 100;
  padding: 28px 60px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(250, 248, 244, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.4s;
}
header.scrolled {
  border-color: var(--sand);
}

.logo {
  font-family: "Cormorant Garamond", serif;
  font-size: 1.25rem;
  font-weight: 300;
  letter-spacing: 0.12em;
  text-decoration: none;
  color: var(--charcoal);
}

nav {
  display: flex;
  gap: 40px;
}
nav a {
  font-size: 0.7rem;
  font-weight: 300;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--muted);
  transition: color 0.3s;
}
nav a:hover {
  color: var(--charcoal);
}

/* Hero */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 0 60px 80px;
  position: relative;
  overflow: hidden;
  background: var(--cream);
}

.hero-bg {
  position: absolute;
  inset: 0;
  opacity: 0.06;
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%232C2822' fill-opacity='1'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.hero-eyebrow {
  font-size: 0.65rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 24px;
  opacity: 0;
  animation: fadeUp 1s 0.3s forwards;
}

.hero-title {
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(3.5rem, 8vw, 7rem);
  font-weight: 300;
  line-height: 0.95;
  letter-spacing: -0.01em;
  max-width: 780px;
  opacity: 0;
  animation: fadeUp 1s 0.5s forwards;
}
.hero-title em {
  font-style: italic;
  color: var(--accent);
}

.hero-sub {
  font-size: 0.85rem;
  font-weight: 300;
  color: var(--muted);
  max-width: 380px;
  line-height: 1.8;
  margin-top: 32px;
  opacity: 0;
  animation: fadeUp 1s 0.7s forwards;
}

.hero-scroll {
  position: absolute;
  right: 60px;
  bottom: 80px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  opacity: 0;
  animation: fadeUp 1s 1.1s forwards;
}
.hero-scroll span {
  font-size: 0.6rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--label);
  writing-mode: vertical-rl;
}
.scroll-line {
  width: 1px;
  height: 60px;
  background: var(--stone);
  transform-origin: top;
  animation: scrollLine 2s 1.5s ease-in-out infinite;
}

@keyframes scrollLine {
  0% {
    transform: scaleY(0);
    opacity: 0;
  }
  50% {
    transform: scaleY(1);
    opacity: 1;
  }
  100% {
    transform: scaleY(0) translateY(100%);
    opacity: 0;
  }
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Subtle scroll reveal (ui-ux-pro-max "Subtle" tier) */
.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition:
    opacity 0.5s ease,
    transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal.in {
  opacity: 1;
  transform: none;
}

/* Gallery Section */
.gallery-section {
  padding: 120px 60px;
  background: var(--warm-white);
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 64px;
}

.section-label {
  font-size: 0.65rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--label);
}
.section-title {
  font-family: "Cormorant Garamond", serif;
  font-size: 2.8rem;
  font-weight: 300;
  margin-top: 10px;
}

/* Filter */
.filter-tabs {
  display: flex;
  gap: 0;
  border: 1px solid var(--sand);
}
.filter-tab {
  padding: 10px 24px;
  font-size: 0.65rem;
  font-weight: 300;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  border: none;
  background: none;
  cursor: pointer;
  color: var(--muted);
  transition: all 0.25s;
  border-right: 1px solid var(--sand);
}
.filter-tab:last-child {
  border-right: none;
}
.filter-tab.active {
  background: var(--charcoal);
  color: var(--warm-white);
}
.filter-tab:not(.active):hover {
  background: var(--cream);
}

/* Grid */
.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px 32px;
}

.grid-empty {
  grid-column: 1 / -1;
  padding: 80px 20px;
  text-align: center;
  font-family: "Cormorant Garamond", serif;
  font-size: 1.4rem;
  font-weight: 300;
  font-style: italic;
  color: var(--muted);
  border: 1px dashed var(--sand);
  border-radius: 4px;
}

.card {
  cursor: pointer;
  opacity: 0;
  transform: translateY(30px);
  transition:
    opacity 0.6s ease,
    transform 0.6s ease;
}
.card.visible {
  opacity: 1;
  transform: translateY(0);
}
.card.hidden {
  display: none;
}

.card-image-wrap {
  position: relative;
  overflow: hidden;
  background: var(--sand);
  aspect-ratio: 3/4;
}
.card-image-wrap picture {
  display: block;
  width: 100%;
  height: 100%;
}
.card-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  display: block;
}
.card:hover .card-image-wrap img {
  transform: scale(1.04);
}

.sold-overlay {
  position: absolute;
  inset: 0;
  background: rgba(196, 185, 168, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
}
.sold-stamp {
  font-size: 0.65rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  border: 1px solid rgba(44, 40, 34, 0.4);
  padding: 9px 18px;
  color: var(--charcoal);
  background: rgba(250, 248, 244, 0.7);
}

.available-badge {
  position: absolute;
  top: 16px;
  right: 16px;
  font-size: 0.55rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  padding: 5px 12px;
  background: var(--charcoal);
  color: var(--cream);
  opacity: 0;
  transition: opacity 0.3s;
}
.card:hover .available-badge {
  opacity: 1;
}

.card-info {
  padding: 18px 0 0;
}
.card-title {
  font-family: "Cormorant Garamond", serif;
  font-size: 1.2rem;
  font-weight: 400;
  margin-bottom: 5px;
}
.card-desc {
  font-size: 0.72rem;
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 12px;
}
.card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.card-price {
  font-size: 0.9rem;
  font-weight: 300;
  letter-spacing: 0.05em;
}
.card-price.sold-price {
  color: var(--stone);
  text-decoration: line-through;
}
.card-view {
  font-size: 0.6rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  border-bottom: 1px solid var(--stone);
  padding-bottom: 1px;
  cursor: pointer;
  transition:
    color 0.25s,
    border-color 0.25s;
}
.card:hover .card-view {
  color: var(--charcoal);
  border-color: var(--charcoal);
}

/* Modal */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(44, 40, 34, 0.7);
  backdrop-filter: blur(8px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
}
.modal-backdrop.open {
  opacity: 1;
  pointer-events: all;
}

.modal {
  background: var(--warm-white);
  max-width: 980px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  transform: translateY(30px);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.modal-backdrop.open .modal {
  transform: translateY(0);
}

.modal-image {
  position: relative;
  background: var(--sand);
  aspect-ratio: 3/4;
  cursor: zoom-in;
}
.modal-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Lightbox (полноэкранный просмотр + зум) */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 4000;
  background: rgba(22, 20, 17, 0.94);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  touch-action: none;
  opacity: 0;
  transition: opacity 0.25s ease;
}
.lightbox.open {
  opacity: 1;
}
.lightbox[hidden] {
  display: none;
}
.lightbox-img {
  position: absolute;
  top: 0;
  left: 0;
  transform-origin: 0 0;
  will-change: transform;
  user-select: none;
  -webkit-user-drag: none;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.5);
}
.lightbox-close {
  position: absolute;
  z-index: 2;
  top: calc(env(safe-area-inset-top, 0px) + 16px);
  right: 20px;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.25s;
}
.lightbox-close:hover {
  background: rgba(255, 255, 255, 0.24);
}
.lightbox-hint {
  position: absolute;
  z-index: 2;
  bottom: calc(env(safe-area-inset-bottom, 0px) + 20px);
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  background: rgba(0, 0, 0, 0.3);
  padding: 7px 16px;
  border-radius: 20px;
  pointer-events: none;
  transition: opacity 0.4s;
}

/* Заглушка при ошибке загрузки картинки */
.card-image-wrap.img-broken img,
.modal-image.img-broken img,
.lightbox.img-broken .lightbox-img {
  opacity: 0;
}
.card-image-wrap.img-broken::after,
.modal-image.img-broken::after {
  content: "Изображение недоступно";
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  text-align: center;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  color: var(--muted);
}
.lightbox.img-broken::after {
  content: "Изображение недоступно";
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.75);
}
.modal-sold-overlay {
  position: absolute;
  inset: 0;
  background: rgba(196, 185, 168, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
}
.modal-sold-stamp {
  font-size: 0.7rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  border: 1px solid rgba(44, 40, 34, 0.5);
  padding: 10px 22px;
  color: var(--charcoal);
  background: rgba(250, 248, 244, 0.8);
}

.modal-content {
  padding: 56px 48px;
  display: flex;
  flex-direction: column;
}
.modal-close {
  position: absolute;
  top: 24px;
  right: 24px;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 6px;
  z-index: 10;
}
.modal-close span {
  display: block;
  width: 22px;
  height: 1px;
  background: var(--charcoal);
  transition: transform 0.3s;
}
.modal-close span:first-child {
  transform: rotate(45deg) translate(5px, 5px);
}
.modal-close span:last-child {
  transform: rotate(-45deg) translate(5px, -5px);
}

.modal-label {
  font-size: 0.6rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--label);
}
.modal-title {
  font-family: "Cormorant Garamond", serif;
  font-size: 2.2rem;
  font-weight: 300;
  margin: 12px 0 20px;
  line-height: 1.1;
}
.modal-desc {
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.85;
  margin-bottom: 32px;
}

.modal-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 36px;
}
.meta-key {
  font-size: 0.58rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--label);
  margin-bottom: 5px;
}
.meta-val {
  font-size: 0.82rem;
}

.modal-price-row {
  display: flex;
  align-items: baseline;
  gap: 16px;
  margin-bottom: 32px;
}
.modal-price {
  font-family: "Cormorant Garamond", serif;
  font-size: 2rem;
  font-weight: 300;
}
.modal-price.sold {
  color: var(--stone);
  text-decoration: line-through;
  font-size: 1.5rem;
}
.modal-status-sold {
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
}

.btn-buy {
  padding: 16px 40px;
  background: var(--charcoal);
  color: var(--cream);
  border: none;
  cursor: pointer;
  font-family: "Jost", sans-serif;
  font-size: 0.65rem;
  font-weight: 300;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  transition:
    background 0.3s,
    color 0.3s;
  width: 100%;
}
.btn-buy:hover {
  background: var(--accent);
}
.btn-buy:disabled {
  background: var(--sand);
  color: var(--stone);
  cursor: not-allowed;
}
.btn-buy.sold-btn {
  background: var(--sand);
  color: var(--stone);
  pointer-events: none;
}

/* Share / QR buttons in modal */
.modal-share-row {
  display: flex;
  gap: 12px;
  margin-top: 14px;
}
.btn-ghost {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 18px;
  background: transparent;
  color: var(--charcoal);
  border: 1px solid rgba(44, 40, 34, 0.25);
  cursor: pointer;
  font-family: "Jost", sans-serif;
  font-size: 0.62rem;
  font-weight: 300;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  transition:
    background 0.3s,
    color 0.3s,
    border-color 0.3s;
}
.btn-ghost:hover {
  background: var(--charcoal);
  color: var(--cream);
  border-color: var(--charcoal);
}
.btn-ghost svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.modal-qr {
  margin-top: 16px;
  padding: 20px;
  border: 1px solid rgba(44, 40, 34, 0.12);
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.modal-qr[hidden] {
  display: none;
}
.modal-qr-box {
  width: 180px;
  height: 180px;
}
.modal-qr-box img,
.modal-qr-box canvas {
  width: 100% !important;
  height: 100% !important;
}
.modal-qr-hint {
  font-size: 0.7rem;
  color: var(--stone);
  text-align: center;
  letter-spacing: 0.04em;
}

/* Copy toast */
.toast {
  position: fixed;
  left: 50%;
  bottom: 40px;
  transform: translate(-50%, 20px);
  background: var(--charcoal);
  color: var(--cream);
  padding: 12px 24px;
  border-radius: 4px;
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 0.3s,
    transform 0.3s;
  z-index: 3000;
}
.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* Contact */
.contact-section {
  padding: 120px 60px;
  background: var(--charcoal);
  color: var(--cream);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}

.contact-label {
  font-size: 0.6rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--stone);
  margin-bottom: 20px;
}
.contact-title {
  font-family: "Cormorant Garamond", serif;
  font-size: 3rem;
  font-weight: 300;
  line-height: 1.1;
  margin-bottom: 24px;
}
.contact-title em {
  font-style: italic;
  color: var(--stone);
}
.contact-text {
  font-size: 0.82rem;
  color: var(--stone);
  line-height: 1.85;
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 32px;
}
.contact-key {
  font-size: 0.58rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--stone);
  margin-bottom: 7px;
}
.contact-val {
  font-size: 0.95rem;
}
.contact-val a {
  color: var(--cream);
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  padding-bottom: 2px;
  transition: border-color 0.3s;
}
.contact-val a:hover {
  border-color: var(--cream);
}

.btn-contact {
  display: inline-block;
  margin-top: 16px;
  padding: 16px 48px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: var(--cream);
  text-decoration: none;
  font-size: 0.65rem;
  font-weight: 300;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.3s;
}
.btn-contact:hover {
  background: var(--cream);
  color: var(--charcoal);
  border-color: var(--cream);
}

footer {
  padding: 28px 60px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--charcoal);
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  color: var(--stone);
}

/* Responsive */
@media (max-width: 900px) {
  header {
    padding: 22px 30px;
  }
  .hero {
    padding: 0 30px 60px;
  }
  .hero-scroll {
    right: 30px;
    bottom: 60px;
  }
  .gallery-section {
    padding: 80px 30px;
  }
  .grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 28px 20px;
  }
  .section-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 28px;
  }
  .contact-section {
    padding: 80px 30px;
    grid-template-columns: 1fr;
    gap: 48px;
  }
  footer {
    padding: 22px 30px;
    flex-direction: column;
    gap: 10px;
    text-align: center;
  }
  .modal {
    grid-template-columns: 1fr;
  }
  .modal-image {
    aspect-ratio: 4/3;
  }
  .modal-content {
    padding: 36px 28px;
  }
}
@media (max-width: 540px) {
  nav {
    display: none;
  }
  .grid {
    grid-template-columns: 1fr;
  }
  .modal-backdrop {
    padding: 0;
    align-items: flex-end;
  }
  .modal {
    max-height: 95vh;
  }
  .filter-tab {
    padding: 9px 14px;
  }
}

/* QR link in footer */
.qr-link {
  color: var(--stone);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.qr-link:hover {
  color: #fff;
}

/* QR sheet (print view) */
.qr-sheet {
  position: fixed;
  inset: 0;
  z-index: 2000;
  overflow-y: auto;
  background: #fff;
  color: #1a1a1a;
  padding: 40px 48px 80px;
}
body.qr-mode {
  overflow: hidden;
}
.qr-toolbar {
  max-width: 1000px;
  margin: 0 auto 32px;
}
.qr-toolbar h2 {
  font-size: 1.6rem;
  margin: 0 0 8px;
}
.qr-toolbar p {
  color: #555;
  margin: 0 0 18px;
  font-size: 0.9rem;
}
.qr-toolbar-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
/* Кнопки листа печати: одинаковый размер и заметны на белом фоне */
.qr-toolbar-actions .btn-buy,
.qr-toolbar-actions .btn-contact {
  width: auto;
  margin: 0;
  padding: 14px 36px;
}
.qr-toolbar-actions .btn-contact {
  border-color: #1a1a1a;
  color: #1a1a1a;
  background: transparent;
}
.qr-toolbar-actions .btn-contact:hover {
  background: #1a1a1a;
  color: #fff;
  border-color: #1a1a1a;
}
.qr-grid {
  max-width: 1000px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 28px;
}
.qr-item {
  border: 1px solid #ddd;
  border-radius: 10px;
  padding: 20px 16px;
  text-align: center;
  break-inside: avoid;
  page-break-inside: avoid;
}
.qr-box {
  display: flex;
  justify-content: center;
  margin-bottom: 14px;
}
.qr-box img,
.qr-box canvas {
  width: 100%;
  height: auto;
  max-width: 220px;
}
.qr-title {
  font-weight: 600;
  font-size: 1rem;
  margin-bottom: 4px;
}
.qr-meta {
  font-size: 0.8rem;
  color: #666;
  margin-bottom: 8px;
}
.qr-url {
  font-size: 0.62rem;
  color: #999;
  word-break: break-all;
}

@media print {
  body > *:not(.qr-sheet) {
    display: none !important;
  }
  .qr-sheet {
    position: static;
    padding: 0;
  }
  .qr-toolbar-actions {
    display: none !important;
  }
  .qr-item {
    border-color: #ccc;
  }
}

/* Respect reduced-motion preference (a11y) */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .card {
    opacity: 1 !important;
    transform: none !important;
  }
  .hero-eyebrow,
  .hero-title,
  .hero-sub,
  .hero-scroll {
    opacity: 1 !important;
  }
  .scroll-line {
    display: none;
  }
}
