:root {
  --bg: #f3f3f3;
  --accent: #DFB23D;
  --page-vh: 100vh;
  --tile: 170px;
  --gap: 0px;
  --dim: .20;
  --radius: 0px;
  --shadow: 0 10px 30px rgba(0, 0, 0, .10);
  --nav-h: 145px;
  --travel: 0px;
  /* Homepage mosaic vertical drift (desktop / tablet wide) */
  --home-gallery-drift-duration: 60s;
  /* Slower drift on narrow viewports — edit independently */
  --home-gallery-drift-duration-mobile: 96s;
  --footer-flow-space: 90px;
  --space-container-x: 18px;
  --space-topbar-y: 12px;
  --space-topbar-top: 18px;
  --space-inline-xs: 8px;
  --space-inline-sm: 10px;
  --space-inline-md: 14px;
  --space-inline-lg: 18px;
  --space-block-xs: 8px;
  --space-block-sm: 10px;
  --space-block-md: 14px;
  --space-block-lg: 18px;
  --space-block-xl: 24px;
  --space-card: 16px;
  --space-card-lg: 20px;
  --space-gap-sm: 8px;
  --space-gap-md: 10px;
  --space-gap-lg: 14px;
  --space-gap-xl: 20px;
  --space-gap-2xl: clamp(28px, 5vw, 72px);
  --space-page-top: 20px;
  --space-page-bottom: 12px;
}

@supports (height: 100dvh) {
  :root {
    --page-vh: 100dvh;
  }
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  font-family: "Saira", ui-sans-serif, system-ui, sans-serif;
  background: var(--bg);
  color: #111;
  overflow-x: hidden;
}

body.nav-open {
  overflow: hidden;
}

.skip-link {
  position: absolute;
  left: -9999px;
  z-index: 999;
  padding: 12px 20px;
  background: #111;
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  border-radius: 0 0 8px 0;
}

.skip-link:focus {
  left: 0;
  top: 0;
}

.topbar {
  position: fixed;
  inset: 0 0 auto 0;
  min-height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-topbar-y) 0;
  padding-top: var(--space-topbar-top);
  z-index: 20;
  pointer-events: none;
  isolation: isolate;
}

.topbar::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg,
      rgba(255, 255, 255, 0.01) 0%,
      rgba(255, 255, 255, 0) 100%);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  -webkit-mask-image: linear-gradient(180deg,
      rgba(0, 0, 0, 1) 0%,
      rgba(0, 0, 0, 0.68) 36%,
      rgba(0, 0, 0, 0.18) 72%,
      rgba(0, 0, 0, 0) 100%);
  mask-image: linear-gradient(180deg,
      rgba(0, 0, 0, 1) 0%,
      rgba(0, 0, 0, 0.68) 36%,
      rgba(0, 0, 0, 0.18) 72%,
      rgba(0, 0, 0, 0) 100%);
  pointer-events: none;
  z-index: 0;
}

.topbar>* {
  position: relative;
  z-index: 1;
  pointer-events: auto;
}

.container {
  width: 100%;
  max-width: 1600px;
  margin: 0 auto;
  padding: 0 var(--space-container-x);
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-gap-lg);
}

.brand {
  width: 100px;
  display: inline-flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  padding: 0;
  background: #fdfdfd;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, .08);
  opacity: 1;
  transform: rotate(0deg);
  text-decoration: none;
  color: inherit;
}

.brand-images {
  display: flex;
  align-items: center;
  gap: 0;
  height: 100%;
}

.brand-images img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* =====================
     NAV — DESKTOP
  ===================== */
.nav-desktop {
  display: flex;
  align-items: center;
  gap: var(--space-gap-xl);
  padding: var(--space-block-sm) var(--space-inline-md);
  min-width: 0;
}

/* Mobile drawer hidden on desktop */
.nav-mobile {
  display: none;
}

.nav-mobile-head,
.nav-toggle,
.nav-backdrop {
  display: none;
}

.nav-close {
  display: none;
  border: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
}

.nav-toggle {
  border: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
}

.nav-links {
  display: contents;
}

.nav-link-num,
.nav-mobile-brand,
.nav-mobile-footer,
.nav-social {
  display: none;
}

.nav-desktop a {
  flex: 0 0 auto;
  color: #111;
  text-decoration: none;
  font-weight: 500;
  letter-spacing: .3px;
  font-size: 18px;
  white-space: nowrap;
  text-decoration-color: transparent;
  text-decoration-thickness: 2px;
  text-underline-offset: 6px;
  transition: color .2s ease, text-decoration-color .2s ease, opacity .2s ease;
}

.nav-desktop a:hover,
.nav-desktop a.active,
.nav-desktop a[aria-current="page"] {
  opacity: 1;
  text-decoration: underline;
  text-decoration-color: var(--accent);
}

.cta,
.nav-cta {
  margin-left: 6px;
  padding: var(--space-block-sm) var(--space-inline-lg);
  border-radius: 4px;
  background: #DFB23D;
  color: #111;
  text-decoration: none;
  font-weight: 800;
  box-shadow: 0 10px 26px rgba(217, 165, 49, .35);
  white-space: nowrap;
  transition: background .18s ease, color .18s ease, box-shadow .18s ease;
}

.cta:hover,
.nav-cta:hover {
  background: #111;
  color: #fff;
  box-shadow: 0 10px 26px rgba(0, 0, 0, .25);
}

.nav-desktop .cta:hover,
.nav-desktop .cta.active,
.nav-desktop .cta[aria-current="page"] {
  text-decoration: none;
  text-decoration-color: transparent;
}

.gallery-wrap {
  height: 100vh;
  padding: 0;
  overflow: hidden;
}

.gallery {
  display: grid;
  gap: var(--gap);
  grid-template-columns: repeat(8, minmax(0, 1fr));
  align-content: start;
  will-change: transform;
  transform: translate3d(0, 0, 0);
  animation: drift var(--home-gallery-drift-duration) linear infinite;
}


@keyframes drift {
  from {
    transform: translate3d(0, 0, 0);
  }

  to {
    transform: translate3d(0, calc(var(--travel) * -1), 0);
  }
}

.tile {
  border: 0;
  padding: 0;
  background: #e8e8e8;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  cursor: pointer;
  display: block;
  aspect-ratio: 1 / 1;
  contain: layout paint;
}

.tile img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  opacity: var(--dim);
  transform: scale(1.08);
  transition:
    opacity .22s ease,
    transform .22s ease,
    filter .22s ease;
  will-change: transform, opacity;
}

.tile:hover img {
  opacity: 1;
  transform: scale(1.02);
  filter: saturate(1.06);
}

.gallery--grayscale .tile img {
  filter: grayscale(1) saturate(0) contrast(0.98);
}

.gallery--grayscale .tile:hover img {
  filter: grayscale(0) saturate(1.06) contrast(1);
}

.tile:focus-visible {
  outline: 3px solid rgba(0, 0, 0, .55);
  outline-offset: 3px;
}

.footer-bar {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-gap-lg);
  margin-top: 20px;
  padding: var(--space-block-xl) 0 calc(var(--space-block-lg) + env(safe-area-inset-bottom, 0px));
  font-weight: 700;
}

.footer-bar--floating {
  position: fixed;
  inset: auto 0 12px 0;
  z-index: 20;
  margin-top: 0;
  padding: var(--space-block-sm) 0;
}

.footer-inner {
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-gap-lg) var(--space-gap-xl);
}

.footer-icons {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-gap-md);
}

.social {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(18, 18, 18, 0.3);
  color: #333;
  text-decoration: none;
  font-weight: 800;
  letter-spacing: .2px;
  transition: background .18s ease, transform .18s ease, box-shadow .18s ease;
}

.social:hover {
  background: rgba(18, 18, 18, 0.65);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, .25);
}

.social svg {
  width: 18px;
  height: 18px;
  fill: #FFF;
}

.footer-text {
  min-width: 0;
  white-space: normal;
  text-align: right;
  text-wrap: balance;
  line-height: 1.35;
  font-size: 16px;
  font-weight: 500;
  overflow-wrap: anywhere;
}

.footer-text a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: opacity .18s ease;
}

.footer-text a:hover {
  opacity: .7;
}

.page-wrap {
  min-height: calc(100vh - var(--footer-flow-space));
  padding: calc(var(--nav-h) + var(--space-page-top)) var(--space-container-x) var(--space-page-bottom);
  position: relative;
  overflow: hidden;
}

.page-wrap::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--page-bg-url) center center / cover no-repeat fixed;
  opacity: 0.12;
  pointer-events: none;
  z-index: 0;
}

.page-wrap>* {
  position: relative;
  z-index: 1;
}

.page-hero-title {
  margin: 0;
  font-size: 32px;
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.04em;
  color: #111;
  white-space: pre-line;
}

.page-title {
  margin: 0 0 18px;
}

.empty-state {
  padding: var(--space-block-xl);
  font-weight: 700;
}

.modal-title-link {
  color: inherit;
  text-decoration: none;
}

.modal-title-link.is-disabled {
  pointer-events: none;
  opacity: .85;
  cursor: default;
}

.grid-basic {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.card {
  background: rgba(255, 255, 255, .8);
  border-radius: 16px;
  box-shadow: 0 10px 26px rgba(0, 0, 0, .10);
  overflow: hidden;
  text-decoration: none;
  color: #111;
  display: block;
}

.card-media {
  width: 100%;
  height: 200px;
  background-size: cover;
  background-position: center;
  overflow: hidden;
}

.card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.card-body {
  padding: 14px 16px 18px;
}

.card-title {
  margin: 0 0 6px;
  font-size: 18px;
}

.card-meta {
  font-size: 14px;
  opacity: .75;
}

.art-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.detail-wrap {
  display: grid;
  gap: 20px;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr);
}

.detail-media {
  background: #fff;
  border-radius: 16px;
  padding: 12px;
  box-shadow: 0 10px 26px rgba(0, 0, 0, .10);
}

.detail-media img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 12px;
}

.detail-info {
  background: rgba(255, 255, 255, .8);
  border-radius: 16px;
  padding: 18px;
  box-shadow: 0 10px 26px rgba(0, 0, 0, .10);
}

.meta-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid rgba(0, 0, 0, .08);
  padding: 10px 0;
  font-size: 14px;
}

.meta-row:last-child {
  border-bottom: 0;
}

/* Artwork detail page */
.artwork-detail-page {
  --artwork-ink: #18140f;
  --artwork-muted: #6c5d4a;
  height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  position: relative;
  background:
    radial-gradient(circle at 18% 20%, rgba(223, 178, 61, 0.14), transparent 30%),
    radial-gradient(circle at 82% 16%, rgba(255, 255, 255, 0.42), transparent 24%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.68), rgba(255, 255, 255, 0.42) 52%, rgba(255, 255, 255, 0.3)),
    var(--page-bg-color, #f6f0e6);
  color: var(--artwork-ink);
}

.artwork-detail-page::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--page-bg-url) center center / cover no-repeat;
  opacity: var(--page-bg-opacity, 0.16);
  pointer-events: none;
  z-index: 0;
}

.artwork-detail-page::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.34), transparent 26%),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.06) 0 1px, transparent 1px 120px);
  mix-blend-mode: screen;
  pointer-events: none;
  z-index: 0;
}

.artwork-detail-page .artwork-wrap {
  max-width: 1260px;
  margin: 0 auto;
  width: 100%;
  position: relative;
  z-index: 1;
  flex: 1;
  min-height: 0;
  padding: calc(var(--nav-h) + 36px) 32px 12px;
  display: flex;
  flex-direction: column;
}

.artwork-detail-page .footer-bar {
  margin-top: auto;
}

.artwork-detail-page .artwork-backlink {
  width: fit-content;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  padding: 0;
  background: none;
  border: none;
  box-shadow: none;
  color: #403224;
  text-decoration: none;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.01em;
  transition: color 0.2s ease;
}

.artwork-detail-page .artwork-backlink:hover {
  color: #8d6930;
}

.artwork-detail-page .artwork-backlink svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.artwork-detail-page .artwork-stage {
  display: flex;
  gap: clamp(36px, 5vw, 72px);
  align-items: stretch;
  min-height: 0;
  flex: 1;
}

.artwork-detail-page .artwork-gallery-column {
  flex: 1.1;
  min-width: 0;
  min-height: 0;
  overflow: visible;
  display: flex;
  flex-direction: column;
}

.artwork-detail-page .detail-info {
  flex: 0.9;
  min-width: 300px;
  min-inline-size: 0;
  display: flex;
  flex-direction: column;
}

.artwork-detail-page .artwork-title {
  margin: 0 0 20px;
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: normal;
}

.artwork-detail-page .artwork-badges {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}

.artwork-detail-page .meta-pill,
.artwork-detail-page .meta-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 5px 10px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.artwork-detail-page .meta-pill {
  background: rgba(115, 88, 49, 0.08);
  border: 1px solid rgba(115, 88, 49, 0.14);
  color: #544633;
}

.artwork-detail-page .meta-pill--accent {
  background: rgba(100, 160, 190, 0.12);
  border-color: rgba(100, 160, 190, 0.22);
  color: #2a5f7a;
}

.artwork-detail-page .detail-media-wrap {
  position: relative;
  overflow: hidden;
  border-radius: 4px;
  flex: 1;
  min-height: 0;
}

.artwork-detail-page .detail-media {
  background: none;
  border-radius: 0;
  overflow: visible;
  position: relative;
  box-shadow: none;
  padding: 0;
  margin: 0;
  height: 100%;
}

.artwork-detail-page .detail-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  cursor: default;
  z-index: 1;
  transform-origin: var(--zoom-x, 50%) var(--zoom-y, 50%);
  transition: transform 0.28s ease;
  will-change: transform;
  border-radius: 0;
  background: none;
}

@media (min-width: 1101px) {
  .artwork-detail-page .artwork-wrap {
    justify-content: center;
  }

  .artwork-detail-page .detail-info {
    min-height: 0;
  }

  .artwork-detail-page .artwork-thumb-strip {
    margin-top: 12px;
  }
}

@media (hover: hover) and (pointer: fine) {
  .artwork-detail-page .detail-media img.is-zooming {
    transform: scale(3.5);
    z-index: 8;
  }
}

.artwork-detail-page .artwork-thumb-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.artwork-detail-page .artwork-thumb {
  padding: 6px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.78);
  border: 2px solid transparent;
  box-shadow: 0 6px 18px rgba(75, 52, 19, 0.08);
  cursor: pointer;
  text-align: left;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.artwork-detail-page .artwork-thumb:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(75, 52, 19, 0.12);
}

.artwork-detail-page .artwork-thumb.is-active,
.artwork-detail-page .artwork-thumb[aria-pressed="true"] {
  border-color: rgba(179, 134, 56, 0.5);
  background: rgba(255, 255, 255, 0.96);
}

.artwork-detail-page .artwork-thumb img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 6px;
  display: block;
}

.artwork-detail-page .artwork-thumb-meta {
  display: block;
  margin-top: 8px;
  color: #5d513f;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.artwork-detail-page .detail-info {
  background: none;
  border-radius: 0;
  padding: 0;
  box-shadow: none;
}

.artwork-detail-page .zoom-btn {
  position: absolute;
  bottom: 16px;
  right: 16px;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background:transparent;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(66, 47, 20, 0.14);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 10;
  color: #3b2d1f;
}

.artwork-detail-page .zoom-btn:hover {
  background: none;
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 12px 28px rgba(82, 58, 24, 0.2);
  border-color: rgba(179, 134, 56, 0.35);
  color: #8d6930;
}

.artwork-detail-page .zoom-btn:active {
  transform: translateY(0) scale(1);
}

.artwork-detail-page .info-card {
  padding: 0;
  background: none;
  border: none;
  border-radius: 0;
  position: sticky;
  top: calc(var(--nav-h) + 40px);
  box-shadow: none;
  margin-top: auto;
  margin-bottom: auto;
}

.artwork-detail-page .meta-status {
  margin: 0;
  border: 1px solid transparent;
}

.artwork-detail-page .meta-status.available {
  background: rgba(105, 156, 99, 0.16);
  border-color: rgba(105, 156, 99, 0.24);
  color: #28593b;
}

.artwork-detail-page .meta-status.reserved {
  background: rgba(214, 182, 100, 0.24);
  border-color: rgba(174, 133, 36, 0.2);
  color: #7d5f1e;
}

.artwork-detail-page .meta-status.sold {
  background: rgba(180, 108, 96, 0.18);
  border-color: rgba(180, 108, 96, 0.2);
  color: #7d3227;
}

.artwork-detail-page .artwork-description {
  margin: 0 0 32px;
  line-height: 1.82;
  color: #40372c;
  font-size: 16px;
}

.artwork-detail-page .artwork-actions {
  display: flex;
}

.artwork-detail-page .inquire-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 14px 36px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.01em;
  background: linear-gradient(135deg, #d8a62a, #e8ba42);
  color: #17130e;
  border: 1px solid rgba(181, 132, 33, 0.25);
  box-shadow: 0 8px 24px rgba(181, 132, 33, 0.22);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.artwork-detail-page .inquire-btn:hover {
  transform: translateY(-2px);
  background: linear-gradient(135deg, #e0b238, #f0c85a);
  box-shadow: 0 14px 32px rgba(181, 132, 33, 0.3);
}

.artwork-detail-page .artwork-nav {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: auto;
  padding-top: 28px;
}

.artwork-detail-page .artwork-nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 18px;
  border-radius: 50px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-decoration: none;
  background: #1a1410;
  color: #fff;
  border: 1px solid #1a1410;
  transition: background 0.18s ease, transform 0.18s ease;
  cursor: pointer;
}

.artwork-detail-page .artwork-nav-btn:hover {
  background: #332a20;
  transform: translateY(-1px);
}

.artwork-detail-page .artwork-nav-btn.is-disabled {
  opacity: 0.35;
  cursor: default;
  pointer-events: none;
}

.artwork-modal {
  display: none;
  position: fixed;
  inset: 0;
  background: var(--artwork-modal-bg, #f5f0e6);
  z-index: 2000;
  justify-content: center;
  align-items: center;
  padding: clamp(18px, 3vw, 48px);
  opacity: 0;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: opacity 0.3s ease;
}

.artwork-modal.open {
  display: flex;
  opacity: 1;
}

.artwork-modal .modal-content {
  max-height: 100%;
}

.artwork-modal .modal-content img {
  max-width: 100%;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

.artwork-modal .modal-close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 48px;
  height: 48px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #fff;
  font-size: 28px;
  cursor: pointer;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.artwork-modal .modal-close:hover {
  background: rgba(255, 255, 255, 0.22);
}

@media (max-width: 1100px) {
  /* Tablets (incl. all iPads) use the stacked layout, which can exceed the
     viewport — release the fixed 100vh/overflow:hidden so the page scrolls.
     (Contact's equivalent override lives after its base rule, below, so the
     cascade doesn't undo it.) */
  .artwork-detail-page {
    height: auto;
    min-height: 100svh;
    overflow-y: auto;
  }

  .artwork-detail-page .artwork-stage {
    flex-direction: column;
    gap: 32px;
  }

  .artwork-detail-page .artwork-gallery-column,
  .artwork-detail-page .detail-info {
    flex: none;
    width: 100%;
    min-width: 0;
    align-self: auto;
  }

  .artwork-detail-page .detail-media-wrap {
    flex: none;
    height: 56vh;
  }

  .artwork-detail-page .info-card {
    position: static;
  }
}

/* =====================
       BURGER BUTTON — MOBILE
    ===================== */
@media (max-width: 720px) {
  .nav-toggle {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    border: 1.5px solid rgba(0, 0, 0, 0.14);
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    cursor: pointer;
    flex-shrink: 0;
  }

  .nav-toggle-bar {
    display: block;
    width: 18px;
    height: 2px;
    border-radius: 999px;
    background: #222;
    transform-origin: center;
    transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.2s;
  }

  .nav-open .nav-toggle-bar:nth-child(1) {
    transform: translateY(3.5px) rotate(45deg);
  }

  .nav-open .nav-toggle-bar:nth-child(2) {
    transform: translateY(-3.5px) rotate(-45deg);
  }

  /* =====================
         BACKDROP
      ===================== */
  .nav-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    background: transparent;
    z-index: 29;
    border: 0;
    cursor: pointer;
    transition: background 0.3s ease;
    pointer-events: none;
  }

  .nav-open .nav-backdrop {
    background: rgba(0, 0, 0, 0.35);
    pointer-events: auto;
  }

  /* =====================
         DRAWER — .nav-mobile
      ===================== */
  .nav-desktop {
    display: none;
  }

  .nav-mobile {
    position: fixed;
    inset: 0 0 0 auto;
    width: min(300px, 85vw);
    height: 100%;
    display: flex;
    flex-direction: column;
    padding: 0;
    gap: 0;
    background: #ffffff;
    box-shadow: -4px 0 32px rgba(0, 0, 0, 0.12);
    z-index: 30;
    transform: translateX(100%);
    transition: transform 0.32s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
  }

  .nav-open .nav-mobile {
    transform: translateX(0);
  }

  /* Drawer Header */
  .nav-mobile-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 18px;
    border-bottom: 1px solid #f0f0f0;
    flex-shrink: 0;
  }

  .nav-mobile-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: #111;
    font-size: 14px;
    min-width: 0;
    flex: 1;
  }

  .nav-mobile-brand img {
    width: 34px;
    height: 34px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid #eee;
    flex-shrink: 0;
  }

  /* Close button */
  .nav-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    border-radius: 6px;
    border: 1px solid #e8e8e8;
    background: #f5f5f5;
    cursor: pointer;
    position: relative;
    transition: background 0.18s ease;
  }

  .nav-close:hover {
    background: #ebebeb;
  }

  .nav-close-bar {
    display: block;
    width: 14px;
    height: 1.5px;
    border-radius: 999px;
    background: #555;
    position: absolute;
  }

  .nav-close-bar:nth-child(1) {
    transform: rotate(45deg);
  }

  .nav-close-bar:nth-child(2) {
    transform: rotate(-45deg);
  }

  /* Nav links */
  .nav-links {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 8px 0;
  }

  .nav-link-num {
    display: none;
  }

  .nav-links a {
    display: block;
    padding: 14px 24px;
    font-size: 18px;
    font-weight: 500;
    color: #111;
    text-decoration: none;
    border-bottom: 1px solid #f5f5f5;
    transition: background 0.15s ease, color 0.15s ease;
    white-space: nowrap;
  }

  .nav-links a:hover {
    background: #fafafa;
    color: #111;
  }

  .nav-links a.active,
  .nav-links a[aria-current="page"] {
    color: var(--accent);
    font-weight: 700;
    background: rgba(223, 178, 61, 0.05);
    text-decoration: none;
    font-weight: 500;
  }

  /* Contact CTA in drawer */
  .nav-links a.nav-cta {
    margin: 14px 18px 6px;
    padding: 13px 20px;
    border-radius: 8px;
    border-bottom: none;
    background: #DFB23D;
    color: #111;
    font-weight: 700;
    font-size: 16px;
    text-align: center;
    transition: background 0.18s ease;
  }

  .nav-links a.nav-cta:hover {
    background: #c99e30;
    color: #111;
  }

  .nav-links a.nav-cta.active,
  .nav-links a.nav-cta[aria-current="page"] {
    background: #111;
    color: #fff;
  }

  /* Social footer */
  .nav-mobile-footer {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 16px 20px;
    border-top: 1px solid #f0f0f0;
    flex-shrink: 0;
  }

  .nav-social {
    display: inline-flex;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: #f5f5f5;
    border: 1px solid #e8e8e8;
    align-items: center;
    justify-content: center;
    color: #444;
    text-decoration: none;
    font-size: 11px;
    font-weight: 700;
    transition: background 0.15s ease;
  }

  .nav-social:hover {
    background: #eee;
  }

  .nav-social svg {
    width: 16px;
    height: 16px;
    fill: #444;
  }
}

/* =====================
       ARTWORK — 720px overrides
    ===================== */
@media (max-width: 720px) {
  :root {
    --footer-flow-space: 112px;
  }

  .artwork-detail-page .artwork-wrap {
    padding: calc(var(--nav-h) + 20px) 18px 12px;
    max-width: 100%;
    overflow-x: clip;
  }

  .artwork-detail-page .artwork-backlink {
    margin-bottom: 10px;
  }

  .artwork-detail-page .artwork-stage {
    gap: 22px;
  }

  .artwork-detail-page .detail-media-wrap {
    height: auto;
    width: 100%;
    max-width: 100%;
    inline-size: min(100%, calc(100vw - 36px));
    margin-inline: auto;
    overflow: visible;
  }

  .artwork-detail-page .detail-media {
    height: auto;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .artwork-detail-page .detail-media img {
    position: static;
    inset: auto;
    width: 100%;
    max-width: 100%;
    height: auto;
    max-height: none;
    object-fit: contain;
  }

  .artwork-detail-page .artwork-title {
    font-size: clamp(26px, 8vw, 32px);
    line-height: 1.12;
    letter-spacing: -0.02em;
  }

  .artwork-detail-page .artwork-badges {
    gap: 8px;
    margin-bottom: 22px;
  }

  .artwork-detail-page .meta-pill,
  .artwork-detail-page .meta-status {
    max-width: 100%;
    overflow-wrap: anywhere;
  }

  .artwork-detail-page .artwork-thumb-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .artwork-detail-page .inquire-btn {
    width: 100%;
  }
}

@media (max-width: 1100px) and (orientation: landscape) and (max-height: 520px) {
  .artwork-detail-page {
    height: auto;
    min-height: 100svh;
    overflow-y: auto;
  }

  .artwork-detail-page .artwork-wrap {
    padding: calc(var(--nav-h) + 10px) 18px 12px;
  }

  .artwork-detail-page .artwork-stage {
    display: grid;
    grid-template-columns: minmax(0, 0.95fr) minmax(0, 1fr);
    align-items: start;
    gap: 18px;
  }

  .artwork-detail-page .artwork-gallery-column,
  .artwork-detail-page .detail-info {
    width: 100%;
    min-width: 0;
  }

  .artwork-detail-page .detail-media-wrap {
    height: auto;
    max-height: none;
  }

  .artwork-detail-page .detail-media {
    height: auto;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .artwork-detail-page .detail-media img {
    position: static;
    inset: auto;
    width: auto;
    max-width: 100%;
    height: auto;
    max-height: calc(100svh - var(--nav-h) - 36px);
    object-fit: contain;
  }

  .artwork-detail-page .info-card {
    margin: 0;
  }

  .artwork-detail-page .artwork-backlink {
    margin-bottom: 8px;
  }

  .artwork-detail-page .artwork-title {
    font-size: clamp(22px, 3.6vw, 28px);
    line-height: 1.08;
    margin-bottom: 12px;
  }

  .artwork-detail-page .artwork-badges {
    gap: 6px;
    margin-bottom: 14px;
  }

  .artwork-detail-page .meta-pill,
  .artwork-detail-page .meta-status {
    min-height: 28px;
    padding: 4px 8px;
    font-size: 12px;
  }

  .artwork-detail-page .artwork-description {
    margin-bottom: 18px;
    font-size: 14px;
    line-height: 1.55;
  }

  .artwork-detail-page .inquire-btn {
    min-height: 42px;
    padding: 10px 18px;
  }

  .artwork-detail-page .artwork-nav {
    padding-top: 14px;
    justify-content: flex-start;
  }
}

.contact-page {
  height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: calc(var(--nav-h) + calc(var(--space-page-top) * 2)) clamp(var(--space-card), 3vw, 28px) calc(var(--space-page-bottom) + 8px);
  position: relative;
  background-image:
    linear-gradient(0deg, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.9)),
    linear-gradient(90deg, rgba(0, 0, 0, 0.04) 0%, rgba(0, 0, 0, 0) 100%);
  background-color: var(--page-bg-color, #f6f0e6);
  color: #1f1f1f;
}

.contact-page::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--page-bg-url, url("../contact-us.jpg"));
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: scroll;
  opacity: var(--page-bg-opacity, 0.15);
  pointer-events: none;
  z-index: 0;
}

/* Tablets (incl. all iPads): release the fixed 100vh/overflow:hidden and
   top-align so a form taller than the viewport scrolls instead of being
   clipped/centered out of reach. Placed after the base rule so it wins the
   cascade. */
@media (max-width: 1100px) {
  .contact-page {
    height: auto;
    min-height: 100svh;
    justify-content: flex-start;
    overflow-y: auto;
  }
}

/* Short viewports (e.g. 13" laptops wider than the tablet breakpoint): the
   form is taller than the screen, so release the fixed 100vh/overflow:hidden
   and top-align to let it scroll instead of clipping the Send button. */
@media (max-height: 920px) {
  .contact-page {
    height: auto;
    min-height: 100svh;
    justify-content: flex-start;
    overflow-y: auto;
  }
}

.contact-container {
  display: grid;
  grid-template-columns: minmax(320px, 560px) minmax(280px, 1fr);
  gap: var(--space-gap-2xl);
  align-items: center;
  justify-content: space-between;
  margin: 0 auto;
  width: 100%;
  flex: 1;
  min-height: 0;
  position: relative;
  z-index: 1;
}

/* -- Info column (right) -- */
.contact-info {
  display: flex;
  flex-direction: column;
  gap: var(--space-gap-sm);
  max-width: 720px;
  padding-top: var(--space-block-sm);
}

.contact-title {
  margin: 0 0 8px;
}

.contact-copy {
  margin: 0 0 var(--space-gap-xl);
  line-height: 1.72;
  font-size: clamp(16px, 1.4vw, 26px);
  color: rgba(0, 0, 0, 1);
}

.contact-details {
  display: flex;
  flex-direction: column;
  gap: var(--space-gap-lg);
  margin-top: var(--space-block-sm);
}

.contact-detail {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 15px;
  font-weight: 500;
  color: #2b2b2b;
  text-decoration: none;
  transition: color .2s ease;
}

a.contact-detail:hover {
  color: var(--accent, #DFB23D);
}

.contact-detail-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: rgba(223, 178, 61, .1);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #8a6b20;
  transition: background .2s ease, transform .2s ease;
}

a.contact-detail:hover .contact-detail-icon {
  background: rgba(223, 178, 61, .2);
  transform: translateY(-1px);
}

/* -- Form card -- */
.contact-card {
  border: 1px solid #FFF;
  border-radius: 20px;
  padding: var(--space-card-lg) var(--space-card) var(--space-card);
  box-shadow: 0 8px 40px rgba(0, 0, 0, .06);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0;
  width: 100%;
  max-width: 560px;
}

.form-alert {
  padding: var(--space-block-sm) var(--space-inline-lg);
  border-radius: 12px;
  font-size: 14px;
  margin: 0 0 var(--space-gap-xl);
  display: flex;
  align-items: center;
  gap: var(--space-gap-md);
}

.form-alert-success {
  background: rgba(217, 165, 49, .12);
  border: 1px solid rgba(217, 165, 49, .35);
}

.form-alert-icon {
  flex-shrink: 0;
}

.form-alert-error {
  background: rgba(200, 60, 40, .06);
  border: 1px solid rgba(200, 60, 40, .25);
  color: #6a2c20;
}

.form-alert ul {
  margin: 0;
  padding-left: 18px;
}

.honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.contact-section {
  margin-bottom: var(--space-gap-xl);
}

.contact-label {
  display: block;
  margin: 0 0 var(--space-gap-sm);
  font-size: 18px;
  font-weight: 500;
  letter-spacing: .1em;
  color: rgba(0, 0, 0, 1);
}

.contact-section h4 {
  margin: 0 0 var(--space-gap-sm);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: rgba(17, 17, 17, .52);
}

.pill-group {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-gap-md);
}

.pill {
  position: relative;
  border-radius: 8px;
  border: 1px solid rgba(217, 165, 49, .35);
  padding: var(--space-block-sm) var(--space-inline-md);
  background: rgba(255, 255, 255, .95);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: var(--space-gap-md);
  font-weight: 500;
  font-size: 14px;
  transition: border-color .2s ease, background .2s ease, box-shadow .2s ease;
}

.pill:hover {
  border-color: rgba(217, 165, 49, .6);
}

.pill input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.pill span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.pill span::before {
  content: "";
  width: 14px;
  height: 14px;
  border-radius: 999px;
  border: 2px solid rgba(217, 165, 49, .55);
  display: inline-block;
  background: #fff;
  transition: background .15s ease, border-color .15s ease, box-shadow .15s ease;
}

.pill input:checked+span::before {
  background: var(--accent, #DFB23D);
  border-color: var(--accent, #DFB23D);
  box-shadow: inset 0 0 0 2px #fff;
}

.pill:has(input:checked) {
  border-color: rgba(217, 165, 49, .7);
  background: rgba(223, 178, 61, .06);
}

.contact-grid {
  display: grid;
  gap: var(--space-gap-md);
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.contact-grid.full {
  grid-template-columns: 1fr;
}

.field {
  width: 100%;
  border-radius: 10px;
  border: 1px solid rgba(217, 165, 49, .7);
  padding: var(--space-block-sm) var(--space-inline-md);
  font-size: 15px;
  font-family: inherit;
  background: rgba(255, 255, 255, .96);
  color: #2b2b2b;
  outline: none;
  transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}

.field::placeholder {
  color: #a0a0a0;
}

.field:focus {
  border-color: rgba(217, 165, 49, .7);
  box-shadow: 0 0 0 3px rgba(217, 165, 49, .12);
  background: #fff;
}

textarea.field {
  resize: vertical;
  min-height: 80px;
}

.phone-row {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: var(--space-gap-md);
}

.contact-gap-top {
  margin-top: var(--space-gap-md);
}

.select-wrap {
  position: relative;
}

.select-wrap::after {
  content: "";
  position: absolute;
  right: 14px;
  top: 50%;
  width: 7px;
  height: 7px;
  border-right: 2px solid #8a6b20;
  border-bottom: 2px solid #8a6b20;
  transform: translateY(-60%) rotate(45deg);
  pointer-events: none;
}

.select-wrap .field {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 34px;
  cursor: pointer;
}

/* Searchable phone-country combobox */
.phone-country {
  position: relative;
}

.phone-country-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  text-align: left;
  padding-right: 28px;
}

.phone-country-toggle::after {
  content: "";
  position: absolute;
  right: 12px;
  top: 50%;
  width: 7px;
  height: 7px;
  border-right: 2px solid #8a6b20;
  border-bottom: 2px solid #8a6b20;
  transform: translateY(-60%) rotate(45deg);
  pointer-events: none;
}

.phone-country-flag {
  font-size: 16px;
  line-height: 1;
}

.phone-country-panel {
  position: absolute;
  z-index: 50;
  top: calc(100% + 4px);
  left: 0;
  width: 280px;
  max-width: 80vw;
  background: #fff;
  border: 1px solid rgba(217, 165, 49, .7);
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .12);
  overflow: hidden;
}

.phone-country-search {
  width: 100%;
  border: none;
  border-bottom: 1px solid rgba(217, 165, 49, .35);
  padding: 10px 12px;
  font-size: 14px;
  font-family: inherit;
  color: #2b2b2b;
  outline: none;
  box-sizing: border-box;
}

.phone-country-search::placeholder {
  color: #a0a0a0;
}

.phone-country-list {
  list-style: none;
  margin: 0;
  padding: 4px 0;
  max-height: 260px;
  overflow-y: auto;
}

.phone-country-option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  font-size: 14px;
  color: #2b2b2b;
  cursor: pointer;
}

.phone-country-option:hover,
.phone-country-option.is-selected {
  background: rgba(217, 165, 49, .14);
}

.phone-country-option .phone-country-name {
  flex: 1 1 auto;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.phone-country-option .phone-country-dial {
  color: #8a6b20;
  font-variant-numeric: tabular-nums;
}

.submit-btn {
  align-self: flex-start;
  border: 2px solid var(--accent, #DFB23D);
  padding: var(--space-block-xs) calc(var(--space-inline-lg) * 2);
  border-radius: 4px;
  background: var(--accent, #DFB23D);
  color: #111;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: .3px;
  cursor: pointer;
  transition: background .2s ease, transform .2s ease, box-shadow .2s ease;
}

.submit-btn:hover {
  background: transparent;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(223, 178, 61, .25);
}

.submit-btn:active {
  transform: translateY(0);
}

/* About page */
.about-page {
  --about-max-width: 1520px;
  --timeline-col-gap: clamp(24px, 3vw, 46px);
  --timeline-event-col: clamp(220px, 24vw, 440px);
  --timeline-marker-col: clamp(116px, 9vw, 148px);
  --timeline-dot-half: 8px;
  --timeline-line-x: calc(var(--timeline-event-col) + var(--timeline-col-gap) + var(--timeline-marker-col) - var(--timeline-dot-half));
  min-height: var(--page-vh);
  padding: calc(var(--nav-h) + calc(var(--space-page-top) + var(--space-gap-md))) clamp(12px, 3vw, 28px) clamp(44px, 7vh, 72px);
  position: relative;
  background-image:
    linear-gradient(0deg, rgba(255, 255, 255, 0.93), rgba(255, 255, 255, 0.93)),
    linear-gradient(90deg, rgba(0, 0, 0, 0.05) 0%, rgba(0, 0, 0, 0) 100%);
  background-color: var(--page-bg-color, #fff);
}

.about-page::before {
  content: "";
  position: fixed;
  inset: 0;
  background: var(--page-bg-url, url("../about-us.jpg")) center center / cover no-repeat;
  opacity: var(--page-bg-opacity, 0.18);
  pointer-events: none;
  z-index: 0;
}

.about-page>* {
  position: relative;
  z-index: 1;
}

.about-title {
  max-width: var(--about-max-width);
  margin: 0 auto calc(var(--space-gap-xl) + 10px);
  white-space: pre-line;
}

.about-timeline {
  max-width: var(--about-max-width);
  margin: 0 auto;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: clamp(24px, 4vw, 48px);
}

.about-timeline::before {
  content: "";
  position: absolute;
  left: var(--timeline-line-x);
  top: 18px;
  bottom: 18px;
  width: 6.4px;
  transform: translateX(-50%);
  background: var(--accent);
  border-radius: 999px;
  z-index: 0;
}

.timeline-entry {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: var(--timeline-event-col) var(--timeline-marker-col) minmax(0, 1fr);
  column-gap: var(--timeline-col-gap);
  align-items: start;
  margin: 0;
  min-height: 0;
  padding: 0;
}

.timeline-entry+.timeline-entry {
  border-top: 0;
  padding-top: 0;
}

.timeline-event {
  padding: var(--space-block-sm) 0 0;
  text-align: left;
}

.timeline-event-text {
  display: inline-block;
  max-width: 20ch;
  font-size: clamp(20px, 2vw, 26px);
  font-weight: 500;
  line-height: 1.38;
  color: #111;
  letter-spacing: -0.03em;
  white-space: pre-line;
}

.timeline-marker {
  min-height: 100%;
  display: flex;
  align-items: flex-start;
  flex-direction: row;
  justify-content: center;
  padding-top: var(--space-block-xs);
  position: relative;
}

.timeline-anchor {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--space-gap-md);
  position: relative;
  z-index: 2;
}

.timeline-year {
  font-size: clamp(20px, 1.8vw, 28px);
  font-weight: bold;
  line-height: 1;
  letter-spacing: -0.05em;
  color: #111;
  white-space: pre-line;
}

.timeline-dot {
  flex: none;
  width: 16px;
  height: 16px;
  border-radius: 999px;
  background: var(--accent);
  border: 3px solid var(--accent);
  box-shadow: 0 0 0 5px rgba(217, 165, 49, 0.14);
}

.timeline-content {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-gap-lg);
  padding: 0;
}

.timeline-label {
  margin: 0;
  align-self: flex-start;
  font-size: clamp(18px, 1.7vw, 28px);
  font-weight: 500;
  line-height: 1.28;
  color: #111;
  letter-spacing: -0.02em;
  white-space: pre-line;
}

.timeline-body {
  margin: 0;
  max-width: 42ch;
  font-size: clamp(17px, 1.65vw, 26px);
  font-weight: 500;
  line-height: 1.6;
  color: #111;
  letter-spacing: -0.02em;
  white-space: pre-line;
}

.timeline-gallery {
  width: 100%;
}

.timeline-gallery--masonry {
  display: grid;
  gap: var(--space-gap-lg);
  grid-template-columns: repeat(var(--timeline-gallery-cols-desktop, 3), minmax(0, 1fr));
  grid-auto-flow: dense;
  grid-auto-rows: 8px;
  align-items: start;
}

.timeline-gallery--masonry[data-gallery-cols-desktop="6"] {
  grid-auto-flow: initial;
  grid-auto-rows: auto;
}

.timeline-gallery-item {
  display: block;
  width: 100%;
  height: auto;
  overflow: hidden;
  break-inside: avoid;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  appearance: none;
  -webkit-appearance: none;
  text-align: inherit;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.22);
  transform: none;
}

.timeline-gallery--masonry .timeline-gallery-item {
  margin-bottom: 0;
}

.timeline-gallery--masonry[data-gallery-cols-desktop="6"] .timeline-gallery-item {
  height: clamp(120px, 12vw, 120px);
}

.timeline-gallery-item:focus-visible {
  outline: 3px solid rgba(223, 178, 61, 0.8);
  outline-offset: 4px;
}

.timeline-gallery-item img {
  width: 100%;
  height: auto;
  display: block;
  aspect-ratio: auto;
  object-fit: initial;
  cursor: inherit;
  transition: opacity 0.2s ease;
}

.timeline-gallery--masonry[data-gallery-cols-desktop="6"] .timeline-gallery-item img {
  height: 100%;
  aspect-ratio: auto;
  object-fit: cover;
}

.timeline-gallery-item img:hover {
  opacity: 0.9;
}

/* Timeline Modal */
.timeline-modal {
  display: flex;
  position: fixed;
  inset: 0;
  background: rgba(22, 17, 12, 0.92);
  z-index: 2000;
  justify-content: center;
  align-items: center;
  padding: clamp(18px, 3vw, 48px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: opacity 0.3s ease, visibility 0s linear 0.3s;
}

.timeline-modal.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition-delay: 0s;
}

.timeline-modal .modal-content {
  max-height: 100%;
  position: relative;
}

.timeline-modal .modal-content img {
  max-width: 100%;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

.timeline-modal .modal-close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 48px;
  height: 48px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #fff;
  font-size: 28px;
  cursor: pointer;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2001;
  transition: background 0.2s ease;
}

.timeline-modal .modal-close:hover {
  background: rgba(255, 255, 255, 0.22);
}

.timeline-modal .modal-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 56px;
  height: 56px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 2001;
  transition: background 0.2s ease, transform 0.2s ease;
}

.timeline-modal .modal-nav:hover {
  background: rgba(255, 255, 255, 0.22);
  transform: translateY(-50%) scale(1.05);
}

.timeline-modal .modal-nav[hidden] {
  display: none;
}

.timeline-modal .modal-nav svg {
  width: 24px;
  height: 24px;
}

.timeline-modal .modal-prev {
  left: 24px;
}

.timeline-modal .modal-next {
  right: 24px;
}

@media (max-width: 768px) {
  .timeline-modal .modal-nav {
    width: 44px;
    height: 44px;
  }

  .timeline-modal .modal-prev {
    left: 12px;
  }

  .timeline-modal .modal-next {
    right: 12px;
  }
}

.timeline-entry--no-event .timeline-event-text,
.timeline-entry--no-label .timeline-label,
.timeline-entry--no-body .timeline-body {
  display: none;
}

.timeline-entry--no-year .timeline-anchor {
  justify-content: center;
}

.timeline-entry--no-gallery .timeline-content {
  gap: 12px;
  max-width: 720px;
}

.timeline-entry--empty .timeline-event-text,
.timeline-entry--empty .timeline-label,
.timeline-entry--empty .timeline-body {
  display: inline-block;
}

@media (max-width: 1200px) {
  .about-page {
    --timeline-col-gap: 20px;
    --timeline-event-col: clamp(180px, 24vw, 300px);
    --timeline-marker-col: 112px;
    padding: calc(var(--nav-h) + var(--space-page-top)) 20px 152px;
  }

  .about-title {
    margin-bottom: 28px;
  }

  .about-timeline {
    gap: 28px;
  }

  .timeline-event-text {
    font-size: clamp(18px, 1.8vw, 26px);
  }

  .timeline-year {
    font-size: clamp(22px, 2vw, 34px);
  }

  .timeline-label {
    font-size: clamp(18px, 1.6vw, 24px);
  }

  .timeline-body {
    font-size: clamp(16px, 1.5vw, 22px);
  }
}

@media (max-width: 1024px) {
  .about-page {
    --timeline-marker-col: 92px;
    padding: calc(var(--nav-h) + 18px) 16px 148px;
  }

  .about-title {
    margin-bottom: 24px;
  }

  .about-timeline {
    gap: 24px;
  }

  .about-timeline::before {
    left: calc(var(--timeline-marker-col) - var(--timeline-dot-half));
    top: 10px;
    bottom: 10px;
  }

  .timeline-entry {
    grid-template-columns: var(--timeline-marker-col) minmax(0, 1fr);
    column-gap: var(--space-gap-xl);
    row-gap: var(--space-gap-md);
  }

  .timeline-event {
    grid-column: 2;
    grid-row: 1;
    padding-top: 0;
    text-align: left;
  }

  .timeline-marker {
    grid-column: 1;
    grid-row: 1 / span 2;
    justify-content: flex-start;
    padding-top: 3px;
  }

  .timeline-anchor {
    justify-content: flex-end;
    gap: var(--space-gap-md);
  }

  .timeline-content {
    grid-column: 2;
    grid-row: 2;
  }

  .timeline-entry--no-event .timeline-content {
    grid-row: 1;
  }

  .timeline-gallery--masonry {
    display: block;
    gap: 0;
    column-count: var(--timeline-gallery-cols-tablet, 3);
    column-gap: var(--space-gap-lg);
  }

  .timeline-gallery--masonry .timeline-gallery-item {
    display: inline-block;
    margin-bottom: var(--space-gap-lg);
  }
}

@media (max-width: 767px) {
  .about-page {
    --timeline-marker-col: 84px;
    --timeline-dot-half: 6px;
    padding: calc(var(--nav-h) + 18px) 12px 140px;
  }

  .about-title {
    margin-bottom: 20px;
  }

  .about-timeline {
    gap: 20px;
  }

  .about-timeline::before {
    left: 42px;
    top: 20px;
    bottom: 20px;
  }

  .timeline-entry {
    column-gap: var(--space-gap-md);
    row-gap: var(--space-gap-md);
  }

  .timeline-event-text {
    max-width: none;
    font-size: clamp(17px, 5.4vw, 24px);
    line-height: 1.32;
  }

  .timeline-marker {
    padding-top: 0;
  }

  .timeline-anchor {
    width: var(--timeline-marker-col);
    min-height: 78px;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    gap: var(--space-gap-sm);
  }

  .timeline-year {
    font-size: clamp(15px, 4.8vw, 20px);
    letter-spacing: -0.03em;
    text-align: center;
  }

  .timeline-dot {
    width: 12px;
    height: 12px;
    border-width: 2px;
  }

  .timeline-content {
    gap: var(--space-gap-md);
    padding-top: 2px;
  }

  .timeline-label {
    font-size: 17px;
    line-height: 1.32;
  }

  .timeline-body {
    font-size: 15px;
    line-height: 1.55;
    max-width: none;
  }

  .timeline-gallery--masonry {
    display: block;
    column-gap: 10px;
    column-count: var(--timeline-gallery-cols-mobile, 2);
  }

  .timeline-gallery-item {
    border-radius: 0;
  }

  .timeline-gallery--masonry .timeline-gallery-item {
    display: inline-block;
    margin-bottom: 10px;
  }

  .timeline-gallery-item img {
    height: auto;
    aspect-ratio: auto;
    object-fit: initial;
    width: 100%;
  }

  .timeline-entry--no-year .timeline-anchor {
    min-height: 18px;
  }
}

.themes-page {
  min-height: var(--page-vh);
  display: flex;
  flex-direction: column;
  position: relative;
  background-image:
    linear-gradient(0deg, #FFFFFF, #FFFFFF),
    linear-gradient(90deg, rgba(0, 0, 0, 0.04) 0%, rgba(0, 0, 0, 0) 100%);
  background-color: var(--page-bg-color, #fff);
  overflow: hidden;
}

.themes-page::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--page-bg-url, url("../theme.jpg")) center center / cover no-repeat fixed;
  opacity: var(--page-bg-opacity, 0.2);
  pointer-events: none;
  z-index: 0;
}

.themes-wrap {
  margin: 0 auto;
  width: 100%;
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  flex: 1;
  gap: 38px;
  padding: calc(var(--nav-h) + 36px) 36px 56px;
  min-height: calc(var(--page-vh) - var(--nav-h));
}

.themes-page:not(.theme-single-page) .themes-wrap {
  justify-content: center;
  padding-top: calc(var(--nav-h) + 12px);
  padding-bottom: 8px;
  min-height: 0;
}

.themes-page:not(.theme-single-page) .footer-bar {
  margin-top: auto;
  padding: var(--space-block-xl) 0 calc(var(--space-block-lg) + env(safe-area-inset-bottom, 0px));
}

.themes-page:not(.theme-single-page) .footer-inner {
  gap: 8px 18px;
}

.themes-page:not(.theme-single-page) .footer-text {
  line-height: 1.2;
}


.themes-intro {
  max-width: 560px;
}

.themes-title {
  margin: 0 0 12px;
  overflow: hidden;
}

/* ── Shared page entrance animations ── */
@keyframes pageTitle-reveal {
  0% {
    opacity: 0;
    transform: translateY(28px);
    filter: blur(4px);
  }

  100% {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
}

@keyframes pageCopy-reveal {
  0% {
    opacity: 0;
    transform: translateY(16px);
    filter: blur(2px);
  }

  100% {
    opacity: 0.85;
    transform: translateY(0);
    filter: blur(0);
  }
}

/* Letter-by-letter rise animation */
@keyframes letterRise {
  from {
    opacity: 0;
    transform: translateY(32px);
    filter: blur(3px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
}

.page-anim-title,
.page-anim-copy {
  opacity: 1;
}

html.has-js .page-anim-title {
  opacity: 0;
  overflow: hidden;
  animation: pageTitle-reveal 0.7s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

html.has-js .page-anim-copy {
  opacity: 0;
  animation: pageCopy-reveal 0.65s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

html.has-js .page-anim-title .letter-anim {
  display: inline-block;
  opacity: 0;
  animation: letterRise 0.45s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  animation-delay: calc(var(--i) * 40ms);
}

.themes-copy {
  line-height: 1.7;
  opacity: 0;
  margin: 0;
  animation: pageCopy-reveal 0.65s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.themes-copy-label {
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: .8px;
  margin-right: 6px;
}

.themes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 24px;
  width: 100%;
  align-items: start;
}

.theme-card {
  text-decoration: none;
  color: #111;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: flex-start;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.35s ease;
  cursor: pointer;
}

.theme-card:hover {
  transform: translateY(-6px);
}

.theme-icon {
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1.5;
  max-height: 320px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  position: relative;
}

.theme-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: left;
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.theme-card:hover .theme-icon img {
  transform: scale(1.06);
}

.theme-name {
  margin: 0;
  font-size: 24px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .6px;
  border-bottom: 2px solid rgb(203 164 107);
  display: inline-block;
  padding-bottom: 4px;
  transition: letter-spacing 0.35s ease, border-color 0.25s ease;
}

.theme-card:hover .theme-name {
  letter-spacing: 1.2px;
  border-color: rgb(163 124 67);
}

.theme-count {
  font-size: 18px;
  opacity: .7;
}

@media (min-width: 1025px) and (max-width: 1440px) {
  .themes-page:not(.theme-single-page) .themes-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 18px;
  }

  .themes-page:not(.theme-single-page) .theme-name {
    font-size: clamp(15px, 1.25vw, 22px);
    letter-spacing: .2px;
    white-space: nowrap;
  }

  .themes-page:not(.theme-single-page) .theme-card:hover .theme-name {
    letter-spacing: .5px;
  }

  .themes-page:not(.theme-single-page) .theme-count {
    font-size: clamp(13px, 1vw, 16px);
  }
}

.theme-artworks-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
  width: 100%;
}

/* ── Collection Hero ── */
.collection-hero {
  display: grid;
  grid-template-columns: minmax(260px, 380px) minmax(0, 1fr);
  gap: 48px;
  align-items: stretch;
  width: 100%;
  flex: 1;
  min-height: 0;
}

.collection-hero-media {
  position: relative;
  overflow: hidden;
  width: 100%;
  max-width: 340px;
  justify-self: start;
  min-height: 0;
}

.collection-hero-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.collection-hero-body {
  display: flex;
  flex-direction: column;
  gap: 20px;
  align-self: center;
}

.collection-hero-quote {
  margin: 0;
  font-size: clamp(17px, 1.6vw, 24px);
  line-height: 1.7;
  font-style: italic;
  color: rgba(17, 17, 17, .82);
}

.collection-hero-quote p {
  margin: 0;
}

.collection-hero-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  padding: 12px 28px;
  border: 2px solid var(--accent, #DFB23D);
  background: var(--accent, #DFB23D);
  color: #111;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: .3px;
  text-decoration: none;
  border-radius: 6px;
  align-self: flex-start;
  transition: background .2s ease, border-color .2s ease, color .2s ease, transform .2s ease, box-shadow .2s ease;
}

.collection-hero-cta:hover {
  background: #111;
  border-color: #111;
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(223, 178, 61, .25);
}

/* Theme single page - Gridstack layout */
.theme-single-page {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.theme-single-page .themes-wrap {
  justify-content: center;
  gap: 28px;
  padding-bottom: 48px;
}

.theme-single-page .theme-template-card {
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  box-shadow: none;
}

.theme-single-page .theme-template-list {
  width: 100%;
  margin-inline: auto;
}

.theme-single-page .theme-template-canvas {
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  padding: .5rem;
  border-radius: 14px;
}

.theme-single-page .theme-template-grid .card {
  display: flex;
  flex-direction: column;
}

.theme-single-page .theme-template-pagination {
  width: 100%;
  margin: 28px auto 0;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 0;
}

.theme-single-page .theme-template-pagination-pages {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.theme-single-page .theme-template-pagination-page {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1ch;
  padding: 0 0 10px;
  color: #111;
  text-decoration: none;
  font-size: clamp(20px, 1.8vw, 32px);
  line-height: 1;
  font-weight: 500;
}

.theme-single-page .theme-template-pagination-page::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform .18s ease;
}

.theme-single-page .theme-template-pagination-page:hover::after,
.theme-single-page .theme-template-pagination-page.is-current::after {
  transform: scaleX(1);
}

.theme-single-page .theme-template-pagination-page.is-current {
  font-weight: 700;
}

.theme-single-page .theme-template-pagination-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-left: auto;
}

.theme-single-page .theme-template-pagination-button {
  min-width: 120px;
  min-height: 46px;
  border-radius: 999px;
  padding: 8px 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
  font-size: clamp(15px, 1.1vw, 19px);
  font-weight: 600;
  letter-spacing: -.02em;
  transition: transform .18s ease, opacity .18s ease, box-shadow .18s ease, background .18s ease;
}

.theme-single-page .theme-template-pagination-button:hover {
  transform: translateY(-1px);
}

.theme-single-page .theme-template-pagination-button--back {
  border: 2px solid rgba(17, 17, 17, .35);
  background: rgba(255, 255, 255, .75);
  color: rgba(17, 17, 17, .58);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .32);
}

.theme-single-page .theme-template-pagination-button--next {
  border: 2px solid #090909;
  background: #090909;
  color: #fff;
  box-shadow: 0 16px 32px rgba(9, 9, 9, .18);
}

.theme-single-page .theme-template-pagination-button.is-disabled {
  opacity: .42;
  pointer-events: none;
}

.theme-single-page .theme-template-pagination-ellipsis {
  color: rgba(17, 17, 17, .44);
  font-size: 22px;
  line-height: 1;
}

.theme-grid-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.theme-grid-btn {
  border: 0;
  border-radius: 10px;
  padding: 10px 16px;
  font-weight: 700;
  letter-spacing: .2px;
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease;
}

.theme-grid-btn:hover {
  transform: translateY(-1px);
}

.theme-grid-btn-save {
  background: #1f7a4f;
  color: #fff;
  box-shadow: 0 8px 20px rgba(31, 122, 79, .3);
}

.theme-grid-btn-reset {
  background: #253858;
  color: #fff;
  box-shadow: 0 8px 20px rgba(37, 56, 88, .28);
}

.theme-grid-container {
  width: 100%;
  border-radius: 18px;
  padding: var(--space-block-sm);
  background: rgba(255, 255, 255, .42);
  border: 1px solid rgba(0, 0, 0, .1);
  backdrop-filter: blur(6px);
}

.theme-gridstack {
  min-height: 460px;
}

.theme-gridstack .grid-stack-item-content {
  border-radius: 0;
  overflow: hidden;
  box-shadow: none;
  background: transparent;
}

.theme-gridstack .card {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: none;
  border-radius: 0;
  background: transparent;
}

.theme-gridstack .card-media {
  flex: 1;
  min-height: 0;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.theme-gridstack .card-media img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
}

.theme-gridstack .card-body {
  display: none;
}

.theme-gridstack .grid-stack-placeholder>.placeholder-content {
  border-radius: 16px;
  border: 2px dashed rgba(17, 17, 17, .25);
  background: rgba(223, 178, 61, .14);
}

.theme-gridstack>.grid-stack-item>.ui-resizable-se::after {
  content: "";
  position: absolute;
  right: 6px;
  bottom: 6px;
  width: 10px;
  height: 10px;
  border-right: 2px solid rgba(255, 255, 255, .85);
  border-bottom: 2px solid rgba(255, 255, 255, .85);
}

.theme-grid-footer {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: var(--space-block-xs) var(--space-inline-md);
  border-radius: 999px;
  background: rgba(0, 0, 0, .06);
  font-size: 14px;
  font-weight: 700;
  width: fit-content;
}

.theme-grid-toast {
  position: fixed;
  right: var(--space-inline-lg);
  bottom: var(--space-inline-lg);
  z-index: 90;
  background: #1f7a4f;
  color: #fff;
  font-weight: 700;
  padding: var(--space-block-sm) var(--space-inline-md);
  border-radius: 10px;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .2s ease, transform .2s ease;
  pointer-events: none;
}

.theme-grid-toast.show {
  opacity: 1;
  transform: translateY(0);
}

.theme-grid-toast.is-error {
  background: #9b2c2c;
}

.theme-grid-empty {
  width: 100%;
  padding: var(--space-block-xl);
  border-radius: 12px;
  background: rgba(255, 255, 255, .7);
  font-weight: 700;
}

.theme-template-list {
  display: grid;
  gap: var(--space-gap-xl);
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  width: 100%;
}

.theme-template-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-gap-md);
}

.theme-template-title {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: .2px;
}

.theme-template-canvas {
  width: 100%;
  overflow: hidden;
}

.theme-template-canvas.is-public {
  padding: 0;
}

.theme-template-canvas.is-public .theme-template-grid {
  min-height: 380px;
}

.theme-template-grid .grid-stack-item-content {
  border-radius: 0;
  overflow: hidden;
  background: transparent;
  box-shadow: none;
}

.theme-template-grid .card {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: stretch;
  justify-content: stretch;
  box-shadow: none;
  border-radius: 0;
  background: transparent;
  position: relative;
  overflow: hidden;
}

.theme-template-grid .card-media {
  width: 100%;
  height: 100%;
  overflow: hidden;
  display: block;
}

.theme-template-grid .card-media img {
  width: 100%;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  display: block;
  object-fit: contain;
}

.theme-template-canvas.is-public .theme-template-grid .card-body {
  display: none;
}



.theme-template-pagination {
  width: 100%;
  display: flex;
  justify-content: center;
  margin-top: 4px;
}

.theme-template-pagination-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.theme-template-pagination-link,
.theme-template-pagination-current,
.theme-template-pagination-ellipsis {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 34px;
  border-radius: 10px;
  padding: 0 10px;
  text-decoration: none;
  font-weight: 700;
  color: #111;
  background: rgba(255, 255, 255, .7);
  border: 1px solid rgba(0, 0, 0, .1);
}

.theme-template-pagination-link:hover {
  background: #fff;
  transform: translateY(-1px);
}

.theme-template-pagination-current {
  background: #DFB23D;
  border-color: #DFB23D;
}

.theme-template-pagination-ellipsis {
  pointer-events: none;
  background: transparent;
  border-color: transparent;
  min-width: auto;
  padding: 0 4px;
}

.theme-layout-editor-page .themes-wrap {
  max-width: 1600px;
}

.theme-editor-alert {
  width: fit-content;
  padding: 10px 14px;
  border-radius: 10px;
  background: rgba(16, 185, 129, .14);
  border: 1px solid rgba(16, 185, 129, .25);
  font-weight: 700;
}

.theme-editor-shell {
  display: grid;
  grid-template-columns: minmax(280px, 320px) minmax(0, 1fr);
  gap: 18px;
  width: 100%;
  align-items: start;
}

.theme-editor-sidebar,
.theme-editor-main {
  background: rgba(255, 255, 255, .54);
  border: 1px solid rgba(0, 0, 0, .1);
  border-radius: 18px;
  padding: 16px;
  backdrop-filter: blur(4px);
}

.theme-editor-links {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
}

.theme-editor-links a {
  text-decoration: none;
  color: #243b63;
  font-weight: 700;
  background: rgba(255, 255, 255, .8);
  border: 1px solid rgba(0, 0, 0, .09);
  border-radius: 10px;
  padding: 8px 10px;
  display: inline-flex;
  align-items: center;
}

.theme-editor-links a:hover {
  background: #fff;
}

.theme-editor-create-form {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
}

.theme-editor-create-form label {
  font-size: 14px;
  font-weight: 700;
}

.theme-editor-create-form input {
  border-radius: 10px;
  border: 1px solid rgba(0, 0, 0, .16);
  padding: 8px 10px;
  background: rgba(255, 255, 255, .95);
}

.theme-editor-create-form button {
  border: 0;
  border-radius: 10px;
  padding: 9px 12px;
  background: #253858;
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}

.theme-editor-template-list {
  display: grid;
  gap: 8px;
}

.theme-editor-template-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  border-radius: 12px;
  border: 1px solid rgba(0, 0, 0, .12);
  background: rgba(255, 255, 255, .8);
  padding: 6px;
}

.theme-editor-template-item.is-active {
  border-color: #DFB23D;
  box-shadow: 0 0 0 2px rgba(223, 178, 61, .28);
}

.theme-editor-template-link {
  text-decoration: none;
  color: inherit;
  padding: 6px 8px;
  display: grid;
  gap: 3px;
}

.theme-editor-template-name {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
}

.theme-editor-template-meta {
  font-size: 12px;
  opacity: .72;
  line-height: 1.1;
}

.theme-editor-template-delete {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  border: 0;
  background: rgba(185, 28, 28, .16);
  color: #7f1d1d;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}

.theme-editor-main {
  display: grid;
  gap: 14px;
}

.theme-editor-fields {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  align-items: end;
}

.theme-editor-fields label {
  display: grid;
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
}

.theme-editor-fields input[type="text"],
.theme-editor-fields input[type="number"] {
  border-radius: 10px;
  border: 1px solid rgba(0, 0, 0, .16);
  padding: 9px 10px;
  background: rgba(255, 255, 255, .95);
}

.theme-editor-checkbox {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 10px;
}

.theme-editor-checkbox input {
  width: 18px;
  height: 18px;
}

/* Exhibitions Page */
.galleries-page {
  min-height: var(--page-vh);
  display: flex;
  flex-direction: column;
  position: relative;
  background:
    linear-gradient(90deg, rgba(242, 237, 227, 0.94) 0%, rgba(246, 241, 235, 0.84) 48%, rgba(241, 231, 236, 0.78) 100%),
    var(--page-bg-color, #f6f1eb);
  overflow: hidden;
  isolation: isolate;
}

.exhibitions-page {
  height: auto;
  min-height: 100vh;
  overflow-x: hidden;
  overflow-y: visible;
}

.galleries-page::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--page-bg-url, url("../theme.jpg")) center center / cover no-repeat fixed;
  opacity: var(--page-bg-opacity, 0.14);
  mix-blend-mode: multiply;
  pointer-events: none;
  z-index: -2;
}

.exhibitions-page::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 10% 18%, rgba(255, 255, 255, 0.72), transparent 28%),
    radial-gradient(circle at 84% 12%, rgba(255, 255, 255, 0.38), transparent 20%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.26) 0%, rgba(255, 255, 255, 0) 44%, rgba(255, 255, 255, 0.22) 100%);
  pointer-events: none;
  z-index: -1;
}

.galleries-wrap {
  margin: 0 auto;
  width: 100%;
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 28px;
  padding: calc(var(--nav-h) + 28px) 36px 56px;
}

.exhibitions-wrap {
  min-height: 0;
  justify-content: flex-start;
}

.galleries-intro {
  max-width: 640px;
}

.galleries-title {
  margin: 0;
}

.galleries-copy {
  margin: 0;
  line-height: 1.55;
  color: rgba(17, 17, 17, .9);
}

.exhibitions-hero {
  display: grid;
  gap: 18px;
  max-width: 1180px;
}

.exhibitions-kicker {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: rgba(17, 17, 17, .62);
}

.exhibitions-kicker-sep {
  color: rgba(17, 17, 17, .34);
}

.exhibitions-title {
  max-width: 1120px;
}

.exhibitions-summary {
  max-width: 1360px;
  font-size: 24px;
  font-weight: 500;
}

.exhibitions-layout {
  width: 100%;
  flex: none;
  min-height: auto;
}

.exhibitions-layout .theme-template-canvas {
  flex: none;
  min-height: auto;
  padding: 0;
  border-radius: 0;
  background: transparent;
  border: none;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}


.exhibitions-layout .theme-template-canvas.is-public .theme-template-grid {
  min-height: auto;
}

.exhibition-template-grid .grid-stack-item-content {
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  cursor: zoom-in;
}

.exhibition-template-grid .card {
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  display: flex;
  align-items: stretch;
  justify-content: stretch;
  width: 100%;
  height: 100%;
}

.exhibition-template-grid .card-media,
.exhibition-grid .card-media {
  display: block;
  width: 100%;
  height: 100%;
}

.exhibition-template-grid .card-media img,
.exhibition-grid .card-media img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
}

.exhibition-template-grid .card-body,
.exhibition-grid .card-body {
  display: none;
}

.exhibitions-layout--empty {
  min-height: 360px;
  display: grid;
  place-items: center;
  border: 1px dashed rgba(17, 17, 17, .18);
  background: rgba(255, 255, 255, .24);
  font-size: 18px;
  color: rgba(17, 17, 17, .68);
  text-align: center;
  padding: 32px;
}

.ex-lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  /* Backdrop gray by default; per-exhibition "Page Background Color"
     (Admin > Exhibition > Media & Background) overrides via --ex-lightbox-bg. */
  background: var(--ex-lightbox-bg, rgb(166, 156, 156));
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.ex-lightbox.open {
  display: flex;
}

.ex-lightbox-inner {
  position: relative;
  width: fit-content;
  max-width: calc(100vw - 120px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}

.ex-lightbox-img-wrap {
  width: fit-content;
  max-width: 100%;
  max-height: calc(100vh - 160px);
  display: flex;
  align-items: center;
  justify-content: center;
  touch-action: pan-y;
}

.ex-lightbox-img-wrap img {
  max-width: 100%;
  max-height: calc(100vh - 160px);
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .5);
  display: block;
}

.ex-lightbox-caption {
  color: rgba(255, 255, 255, .92);
  font-size: 15px;
  font-weight: 500;
  text-align: center;
  text-shadow: 0 1px 4px rgba(0, 0, 0, .55);
}

.ex-lightbox-counter {
  color: rgba(255, 255, 255, .7);
  font-size: 13px;
  text-shadow: 0 1px 4px rgba(0, 0, 0, .55);
}

.ex-lightbox-close {
  position: fixed;
  top: 18px;
  right: 22px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 0;
  background: rgba(0, 0, 0, .45);
  color: #fff;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .15s;
  z-index: 1001;
}

.ex-lightbox-close:hover {
  background: rgba(0, 0, 0, .62);
}

.ex-lightbox-prev,
.ex-lightbox-next {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 0;
  background: rgba(0, 0, 0, .45);
  color: #fff;
  font-size: 22px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .15s;
  z-index: 1001;
}

.ex-lightbox-prev {
  left: 14px;
}

.ex-lightbox-next {
  right: 14px;
}

.ex-lightbox-prev:hover,
.ex-lightbox-next:hover {
  background: rgba(0, 0, 0, .62);
}

.ex-lightbox-prev:disabled,
.ex-lightbox-next:disabled {
  opacity: .3;
  pointer-events: none;
}

.exhibition-grid .grid-stack-item-content,
.exhibition-template-grid .grid-stack-item-content {
  cursor: pointer;
}

.exhibition-grid .grid-stack-item-content:hover,
.exhibition-template-grid .grid-stack-item-content:hover {
  box-shadow: none;
}

.exhibitions-pagination {
  width: 100%;
  margin: 28px auto 0;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 0;
}

.exhibitions-pagination-pages {
  display: flex;
  align-items: center;
  gap: 22px;
  flex-wrap: wrap;
}

.exhibitions-pagination-page {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 0 12px;
  color: #111;
  text-decoration: none;
  font-size: 21px;
  line-height: 1;
  font-weight: 500;
  min-width: 1ch;
}

.exhibitions-pagination-page::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform .18s ease;
}

.exhibitions-pagination-page:hover::after,
.exhibitions-pagination-page.is-current::after {
  transform: scaleX(1);
}

.exhibitions-pagination-page.is-current {
  font-weight: 700;
}

.exhibitions-pagination-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-left: auto;
}

.exhibitions-pagination-button {
  min-width: 120px;
  min-height: 46px;
  border-radius: 999px;
  padding: 8px 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-decoration: none;
  font-size: clamp(16px, 1.2vw, 22px);
  font-weight: 600;
  letter-spacing: -.02em;
  transition: transform .18s ease, opacity .18s ease, box-shadow .18s ease, background .18s ease;
}

.exhibitions-pagination-button:hover {
  transform: translateY(-1px);
}

.exhibitions-pagination-button--back {
  border: 2px solid rgba(17, 17, 17, .35);
  background: rgba(255, 255, 255, .44);
  color: rgba(17, 17, 17, .58);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .32);
}

.exhibitions-pagination-button--next {
  border: 2px solid #090909;
  background: #090909;
  color: #fff;
  box-shadow: 0 16px 32px rgba(9, 9, 9, .18);
}

.exhibitions-pagination-button.is-disabled {
  opacity: .42;
  pointer-events: none;
}

.exhibitions-empty {
  display: grid;
  gap: 16px;
}

.modal {
  position: fixed;
  inset: 0;
  display: none;
  place-items: center;
  background: rgba(0, 0, 0, .75);
  z-index: 999;
  padding: 18px;
  overflow: auto;
}

.modal.open {
  display: grid;
}

.modal-card {
  position: relative;
  width: fit-content;
  min-width: min(758px, calc(100vw - 36px));
  max-width: min(1180px, calc(100vw - 36px));
  max-height: calc(100vh - 36px);
  border-radius: 22px;
  overflow: hidden;
  background: #f2ede4;
  box-shadow: 0 30px 90px rgba(0, 0, 0, .35);
  display: grid;
  grid-template-columns: minmax(320px, 1fr) minmax(280px, 340px);
  align-items: center;
  justify-content: center;
  gap: 28px;
  padding: 26px;
  isolation: isolate;
}

.modal-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: var(--modal-bg, none);
  background-size: cover;
  background-position: center;
  background-attachment: scroll;
  opacity: .08;
  filter: blur(10px);
  transform: scale(1.06);
  pointer-events: none;
  z-index: 0;
}

.modal-card>* {
  position: relative;
  z-index: 1;
}

.modal-card.is-portrait {
  width: min(720px, calc(100vw - 36px));
  min-width: min(720px, calc(100vw - 36px));
  max-width: min(720px, calc(100vw - 36px));
  grid-template-columns: minmax(220px, 280px) minmax(260px, 1fr);
  align-items: center;
  gap: 24px;
  overflow: hidden;
}

.modal-media {
  display: grid;
  place-items: center;
  align-self: center;
  justify-self: center;
  width: 100%;
  max-width: min(760px, calc(100vw - 440px));
  min-height: min(360px, calc(100vh - 96px));
}

.modal-media img {
  width: auto;
  max-width: min(760px, calc(100vw - 440px));
  height: auto;
  max-height: min(360px, calc(100vh - 96px));
  object-fit: contain;
  display: block;
  margin: auto;
  transition: opacity .18s ease, filter .18s ease;
}

.modal-media[style*="aspect-ratio"] {
  min-height: 0;
}

.modal-card.is-portrait .modal-media {
  width: min(100%, 280px);
  max-width: 280px;
  min-height: 0;
  justify-self: start;
}

.modal-card.is-portrait .modal-media img {
  width: 100%;
  max-width: 280px;
  max-height: min(74vh, calc(100vh - 120px));
}

.modal-media img.is-loading {
  opacity: 0;
  visibility: hidden;
  filter: none;
}

.modal-media.is-loading {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #e8dcc8, #d4c4a8);
  border-radius: 10px;
}

.modal-media.is-loading::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 10px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(223, 178, 61, 0.25) 45%,
    rgba(255, 225, 130, 0.4) 50%,
    rgba(223, 178, 61, 0.25) 55%,
    transparent 100%
  );
  background-size: 250% 100%;
  animation: modal-shimmer 1.6s ease-in-out infinite;
  pointer-events: none;
  z-index: 1;
}

@keyframes modal-shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.modal-info {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 18px;
  width: min(340px, 32vw);
  min-width: 260px;
  max-width: 340px;
  padding: 6px 6px 6px 0;
}

.modal-card.is-portrait .modal-info {
  width: 100%;
  min-width: 0;
  max-width: 340px;
  padding: 6px 6px 6px 0;
}

.modal-title {
  margin: 0;
  font-size: 28px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: .3px;
}

.modal-card.is-portrait .modal-title {
  font-size: clamp(24px, 2.6vw, 34px);
}

.modal-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.chip {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  background: rgba(0, 0, 0, .08);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: .2px;
}

.chip-status.is-available {
  background: rgba(40, 170, 90, .15);
  color: #1c6a3a;
}

.chip-status.is-reserved {
  background: rgba(219, 161, 57, .18);
  color: #7a5514;
}

.chip-status.is-sold {
  background: rgba(200, 71, 61, .18);
  color: #7a2b24;
}

.modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 8px;
}

.modal-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 18px;
  background: #DFB23D;
  color: #111;
  text-decoration: none;
  font-weight: 800;
  box-shadow: 0 10px 26px rgba(217, 165, 49, .35);
}

.modal-cta-secondary {
  background: rgba(0, 0, 0, .08);
  box-shadow: none;
}

.modal-cta-secondary:hover {
  background: rgba(0, 0, 0, .14);
}

.close-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 12px;
  background: rgba(255, 255, 255, .7);
  color: #2b2b2b;
  font-size: 22px;
  cursor: pointer;
  backdrop-filter: blur(6px);
  z-index: 2;
}

.close-btn:hover {
  background: rgba(255, 255, 255, .9);
}

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

  .tile img {
    transition: opacity .01s linear, transform .01s linear, filter .01s linear;
  }
}

@media (max-width: 980px) {
  :root {
    --tile: 150px;
    --gap: 0px;
    --space-container-x: 16px;
    --space-topbar-y: 10px;
    --space-topbar-top: 14px;
    --space-page-top: 18px;
    --space-page-bottom: 10px;
  }

  .gallery {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

  .topbar {
    padding: var(--space-topbar-y) 0;
  }

  .topbar-inner {
    gap: var(--space-gap-lg);
  }

  .container {
    padding: 0 var(--space-container-x);
  }

  .nav {
    gap: 14px;
    padding: 8px 0;
  }

  .nav a {
    font-size: 15px;
  }

  .brand {
    width: 90px;
    height: auto;
  }

  .cta {
    padding: var(--space-block-xs) var(--space-inline-md);
    margin-left: 0;
  }

  .detail-wrap {
    grid-template-columns: 1fr;
  }

  

  .modal-card {
    width: min(92vw, 720px);
    min-width: 0;
    max-width: min(92vw, 720px);
    grid-template-columns: 1fr;
    height: auto;
    max-height: calc(100vh - 36px);
    overflow: auto;
  }

  .modal-media {
    width: 100%;
    max-width: 100%;
    min-height: min(360px, 56vh);
  }

  .modal-media img {
    width: auto;
    max-width: 100%;
    max-height: min(360px, 56vh);
  }

  .modal-info {
    width: 100%;
    min-width: 0;
    max-width: none;
    padding: 0 4px 8px;
    align-items: flex-start;
  }

  .modal-card.is-portrait {
    width: min(92vw, 720px);
    min-width: 0;
    max-width: min(92vw, 720px);
    grid-template-columns: 1fr;
    gap: 16px;
    overflow: auto;
  }

  .modal-card.is-portrait .modal-media {
    width: 100%;
    max-width: 100%;
    justify-self: center;
  }

  .modal-card.is-portrait .modal-media img {
    width: auto;
    max-width: 100%;
    max-height: min(360px, 56vh);
  }

  .modal-card.is-portrait .modal-info {
    max-width: none;
    padding: 0 4px 8px;
  }

  .contact-page {
    padding: calc(var(--nav-h) + 24px) 20px 42px;
    overflow-y: auto;
  }

  .contact-container {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .contact-info {
    order: -1;
  }

  .contact-card {
    padding: 18px 16px 16px;
  }

  .themes-page {
    padding: 0;
  }

  .themes-intro {
    max-width: 100%;
  }

  .themes-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
  }

  .theme-card {
    align-items: flex-start;
  }

  .theme-icon {
    aspect-ratio: 1 / 1.8;
    max-height: 260px;
  }

  .theme-name {
    font-size: 18px;
  }

  .theme-count {
    font-size: 14px;
  }

  .themes-wrap {
    padding: calc(var(--nav-h) + 24px) 20px 56px;
  }

  .themes-page:not(.theme-single-page) .themes-wrap {
    padding-top: calc(var(--nav-h) + 10px);
    padding-bottom: 8px;
  }


  .theme-single-page .themes-wrap {
    padding-bottom: 120px;
  }

  .theme-artworks-grid {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 18px;
  }

  .theme-grid-container {
    padding: var(--space-gap-md);
  }

  .theme-grid-toolbar {
    gap: var(--space-gap-md);
  }

  .theme-grid-btn {
    padding: 8px 12px;
  }

  .theme-template-list {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  }

  .theme-editor-shell {
    grid-template-columns: 1fr;
  }

  .theme-editor-fields {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .galleries-intro {
    max-width: 100%;
  }



  .exhibitions-wrap {
    gap: 24px;
    padding: calc(var(--nav-h) + 20px) 20px 64px;
  }

  .exhibitions-hero {
    max-width: 100%;
    gap: 16px;
  }

  .exhibitions-layout .theme-template-canvas {
    padding: 0;
    border-radius: 14px;
  }

  .theme-single-page .theme-template-pagination,
  .exhibitions-pagination {
    width: 100%;
    padding: 16px 0;
  }
}

@media (max-width: 720px) {
  :root {
    --tile: 130px;
    --gap: 0px;
    --home-gallery-drift-duration: var(--home-gallery-drift-duration-mobile);
    --space-container-x: 14px;
    --space-topbar-y: 8px;
    --space-topbar-top: 10px;
    --space-page-top: 16px;
    --space-page-bottom: 8px;
  }

  .gallery {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .topbar {
    min-height: 0;
    height: auto;
    padding: var(--space-topbar-y) 0 0;
  }

  .topbar-inner {
    width: min(100%, 100%);
    display: grid;
    gap: var(--space-gap-md);
    justify-items: center;
    justify-content: center;
  }

  .brand {
    width: min(100%, 80px);
    height: auto;
    margin: 0 auto;
  }

  .brand-images img {
    width: 100%;
    height: 76px;
  }

  .nav {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: 14px;
    padding: 10px 14px;
  }

  .nav::-webkit-scrollbar {
    display: none;
  }

  .nav a {
    font-size: 14px;
    letter-spacing: .2px;
  }

  /* ── Mobile (JS-enhanced) ── */

  .has-js .topbar {
    padding: var(--space-topbar-y) 0;
  }

  .has-js .topbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  .has-js .brand {
    width: min(100%, 80px);
    margin: 0;
  }

  .has-js .nav-desktop {
    display: none;
  }

  /* Hamburger */
  .has-js .nav-toggle {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 44px;
    height: 44px;
    background: none;
    color: #222;
  }

  .nav-toggle-bar {
    display: block;
    width: 22px;
    height: 2px;
    background: currentColor;
    border-radius: 1px;
    transition: transform .24s ease, opacity .2s ease;
  }

  /* Backdrop */
  .has-js .nav-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 20;
    border: 0;
    padding: 0;
    background: rgba(0, 0, 0, 0.3);
    opacity: 0;
    pointer-events: none;
    transition: opacity .3s ease;
  }

  /* Drawer */
  .has-js .nav-mobile {
    display: flex;
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    z-index: 21;
    width: min(80vw, 320px);
    flex-direction: column;
    background: #fff;
    transform: translateX(100%);
    visibility: hidden;
    transition: transform .3s cubic-bezier(.22, 1, .36, 1), visibility .3s ease;
  }

  /* Drawer head */
  .has-js .nav-mobile-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    flex-shrink: 0;
  }

  .has-js .nav-mobile-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: #222;
  }

  .has-js .nav-mobile-brand img {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    object-fit: cover;
  }

  /* Close */
  .has-js .nav-close {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: none;
    color: rgba(0, 0, 0, 0.4);
  }

  .nav-close-bar {
    position: absolute;
    width: 18px;
    height: 2px;
    background: currentColor;
    border-radius: 1px;
  }

  .nav-close-bar:first-child {
    transform: rotate(45deg);
  }

  .nav-close-bar:last-child {
    transform: rotate(-45deg);
  }

  /* Links */
  .has-js .nav-links {
    display: flex;
    flex-direction: column;
    flex: 1;
  }

  .has-js .nav-links a {
    display: flex;
    align-items: center;
    padding: 14px 24px;
    color: #222;
    font-size: 18px;
    text-decoration: none;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  }

  .has-js .nav-links a.active,
  .has-js .nav-links a[aria-current="page"] {
    color: #DFB23D;
  }

  .has-js .nav-links .nav-cta {
    margin-top: 8px;
    padding: 14px 24px;
    border-bottom: none;
    font-weight: 500;
    color: #FFF;
    justify-content: center;
  }

  /* Social footer */
  .has-js .nav-mobile-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    padding: 16px 20px;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    margin-top: auto;
    flex-shrink: 0;
  }

  .has-js .nav-social {
    display: flex;
    color: rgba(0, 0, 0, 0.3);
  }

  .has-js .nav-social svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
  }

  /* Focus */
  .has-js .nav-toggle:focus-visible {
    outline: 2px solid #DFB23D;
    outline-offset: 2px;
  }

  .has-js .nav-close:focus-visible,
  .has-js .nav-mobile a:focus-visible {
    outline: 2px solid #DFB23D;
    outline-offset: 2px;
  }

  /* ── Open states ── */

  body.nav-open .nav-backdrop {
    opacity: 1;
    pointer-events: auto;
  }

  body.nav-open .nav-mobile {
    transform: translateX(0);
    visibility: visible;
  }

  body.nav-open .topbar .brand {
    opacity: 0;
    pointer-events: none;
  }

  body.nav-open .nav-toggle-bar:first-child {
    transform: translateY(4px) rotate(45deg);
  }

  body.nav-open .nav-toggle-bar:last-child {
    transform: translateY(-4px) rotate(-45deg);
  }

  .cta {
    padding: 8px 12px;
    box-shadow: 0 6px 16px rgba(217, 165, 49, .22);
  }

  .modal-card {
    padding: 18px;
    gap: 16px;
    border-radius: 16px;
  }

  .footer-bar--floating {
    inset: auto 12px 12px 12px;
    padding: 0 0 calc(8px + env(safe-area-inset-bottom, 0px));
    gap: 10px;
  }

  .footer-inner {
    width: 100%;
    padding: 12px 14px;
    flex-direction: column-reverse;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border-radius: 16px;
  }

  .footer-icons {
    justify-content: center;
    gap: 8px;
  }

  .social {
    width: 30px;
    height: 30px;
    font-size: 13px;
  }

  .footer-text {
    max-width: 28rem;
    text-align: center;
    line-height: 1.4;
    font-size: 12px;
  }

  .themes-page {
    padding: 0;
  }

  .themes-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
  }

  .theme-card {
    align-items: flex-start;
    text-align: left;
  }

  .theme-icon {
    aspect-ratio: 1 / 1.8;
    max-height: 220px;
  }

  .theme-name {
    font-size: 16px;
  }

  .theme-count {
    font-size: 13px;
  }

  .themes-wrap {
    padding: calc(var(--nav-h) + 20px) 16px 48px;
  }

  .themes-page:not(.theme-single-page) .themes-wrap {
    padding-top: calc(var(--nav-h) + 8px);
    padding-bottom: 6px;
  }

  .themes-page:not(.theme-single-page) .footer-bar {
    padding: 4px 0 calc(4px + env(safe-area-inset-bottom, 0px));
  }

  .theme-single-page .themes-wrap {
    padding-bottom: 118px;
  }

  .collection-hero {
    grid-template-columns: 1fr;
    gap: 24px;
    align-items: start;
  }

  .collection-hero-media {
    width: min(100%, 340px);
    margin: 0 auto;
    padding: 10px;
  }

  .collection-hero-media img {
    aspect-ratio: 4 / 5;
  }

  .collection-hero-body {
    gap: 16px;
  }

  .collection-hero-quote {
    font-size: 16px;
    line-height: 1.75;
  }

  .collection-hero-cta {
    width: 100%;
    min-height: 48px;
    padding: 12px 18px;
    font-size: 15px;
  }

  .theme-artworks-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
  }

  .theme-grid-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .theme-grid-btn {
    width: 100%;
  }

  .theme-grid-container {
    padding: 8px;
  }

  .theme-gridstack {
    min-height: 420px;
  }

  .theme-grid-toast {
    left: 12px;
    right: 12px;
    bottom: 12px;
  }

  .theme-template-list {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .theme-template-card {
    padding: .5rem;
  }

  .theme-template-canvas {
    padding: .5rem;
  }

  .theme-template-canvas.is-public .theme-template-grid {
    min-height: 380px;
  }

  .theme-editor-sidebar,
  .theme-editor-main {
    padding: 12px;
  }

  .theme-editor-fields {
    grid-template-columns: 1fr;
  }

  .exhibitions-wrap {
    gap: 20px;
    padding: calc(var(--nav-h) + 16px) 14px 56px;
  }

  .exhibitions-kicker {
    gap: 8px;
    font-size: 12px;
    letter-spacing: .14em;
  }

  .exhibitions-summary {
    font-size: 18px;
    line-height: 1.6;
  }

  .exhibitions-layout .theme-template-canvas {
    padding: 0;
    border-radius: 14px;
  }

  .theme-single-page .theme-template-pagination,
  .exhibitions-pagination {
    flex-wrap: wrap;
  }

  .theme-single-page .theme-template-pagination-pages,
  .exhibitions-pagination-pages {
    gap: 14px;
  }

  .theme-single-page .theme-template-pagination-page,
  .exhibitions-pagination-page {
    font-size: 20px;
    padding-bottom: 8px;
  }

  .theme-single-page .theme-template-pagination-actions,
  .exhibitions-pagination-actions {
    margin-left: auto;
  }

  .theme-single-page .theme-template-pagination-button,
  .exhibitions-pagination-button {
    min-width: 100px;
    min-height: 42px;
    padding: 8px 14px;
    font-size: 15px;
  }
}

@media (max-width: 520px) {
  :root {
    --tile: 118px;
    --gap: 0px;
    --footer-flow-space: 108px;
    --space-container-x: 12px;
    --space-topbar-y: 8px;
    --space-topbar-top: 8px;
    --space-page-top: 16px;
    --space-page-bottom: 8px;
  }

  .gallery {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .about-page {
    --timeline-marker-col: 70px;
    padding: calc(var(--nav-h) + 16px) 10px 60px;
  }

  .about-title {
    margin-bottom: 18px;
  }

  .about-timeline {
    gap: 18px;
  }

  .about-timeline::before {
    left: 35px;
    top: 18px;
    bottom: 18px;
  }

  .timeline-entry {
    column-gap: var(--space-gap-sm);
    row-gap: var(--space-gap-sm);
  }


  .exhibition-template-grid .card-media,
  .exhibition-grid .card-media {
    display: inline-flex;
    width: 100%;
    height: auto;
  }


  .timeline-anchor {
    width: var(--timeline-marker-col);
    min-height: 70px;
    gap: 6px;
  }

  .timeline-event-text {
    font-size: 16px;
  }

  .timeline-year {
    font-size: 14px;
  }

  .timeline-label {
    font-size: 16px;
  }

  .timeline-body {
    font-size: 14px;
  }

  .topbar {
    padding-top: var(--space-topbar-top);
  }

  .topbar-inner {
    gap: var(--space-gap-sm);
  }

  .brand {
    width: min(100%, 80px);
  }

  .has-js .brand {
    width: min(100%, 80px);
  }

  .has-js .nav-toggle {
    width: 40px;
    height: 40px;
    gap: 5px;
  }

  .has-js .nav-mobile {
    width: min(85vw, 300px);
  }

  .nav {
    gap: 12px;
    padding: 8px 12px;
  }

  .nav a {
    font-size: 13px;
  }

  .cta {
    padding: 7px 11px;
  }

  .footer-inner {
    padding: var(--space-block-sm) var(--space-inline-md);
    gap: var(--space-gap-sm);
  }

  .footer-icons {
    gap: 6px;
  }

  .footer-text {
    max-width: 22rem;
    font-size: 11px;
  }

  .exhibitions-wrap {
    gap: 24px;
    padding: calc(var(--nav-h) + 18px) 14px 56px;
  }

  .theme-single-page .themes-wrap {
    padding: calc(var(--nav-h) + 18px) 14px 48px;
  }

  .collection-hero {
    gap: 20px;
  }

  .collection-hero-media {
    width: min(100%, 300px);
    padding: 8px;
  }

  .collection-hero-quote {
    font-size: 15px;
  }

  .exhibitions-layout .theme-template-canvas {
    padding: 0;
    border-radius: 0;
  }

  .theme-single-page .theme-template-pagination-pages,
  .exhibitions-pagination-pages {
    gap: 10px;
  }

  .theme-single-page .theme-template-pagination-page,
  .exhibitions-pagination-page {
    font-size: 18px;
  }

  .theme-single-page .theme-template-pagination-actions,
  .exhibitions-pagination-actions {
    gap: 8px;
  }

  .theme-single-page .theme-template-pagination-button,
  .exhibitions-pagination-button {
    min-width: 90px;
    min-height: 38px;
    padding: 6px 12px;
    font-size: 14px;
  }

  .themes-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }

  .theme-icon {
    max-height: 280px;
  }

  .contact-page {
    padding: calc(var(--nav-h) + 18px) 14px 40px;
  }

  .phone-row {
    grid-template-columns: 1fr;
  }

  .submit-btn {
    width: 100%;
    align-self: stretch;
  }
}

@media (max-width: 360px) {
  .gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.theme-single-page {
  height: auto;
  min-height: 100vh;
  overflow-x: hidden;
  overflow-y: visible;
  justify-content: flex-start;
}

.theme-single-page+.footer-bar {
  background: linear-gradient(135deg, rgba(250, 247, 241, 0.96), rgba(242, 235, 224, 0.96));
  color: #3b2d1f;
  padding: 20px 0;
  margin-top: 0;
  position: relative;
  overflow: hidden;
}

.theme-single-page+.footer-bar::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--page-bg-url, url("../theme.jpg"));
  background-size: cover;
  background-position: center;
  opacity: calc(var(--page-bg-opacity, 0.2) * 0.55);
  pointer-events: none;
  z-index: 0;
}

.theme-single-page+.footer-bar .footer-inner {
  position: relative;
  z-index: 1;
}

.theme-single-page .themes-wrap {
  min-height: 0;
  padding-bottom: 24px;
  gap: 24px;
}

.theme-single-page .theme-template-list {
  flex: none;
  min-height: auto;
  grid-template-rows: none;
}

.theme-single-page .theme-template-card {
  height: auto;
  display: flex;
  flex-direction: column;
}

.theme-single-page .theme-template-canvas {
  flex: none;
  min-height: auto;
  display: flex;
  flex-direction: column;
}

.theme-single-page .theme-template-canvas .theme-template-grid {
  flex: none;
  min-height: auto;
}

.theme-single-page .theme-template-canvas.is-public .theme-template-grid {
  min-height: 0;
}

.theme-single-page .theme-template-pagination {
  margin-top: 8px;
  padding: 10px 0;
}

/* ── Small screens: disable fixed 100vh on all full-page layouts ── */
@media (max-width: 720px) {

  .artwork-detail-page,
  .theme-single-page,
  .exhibitions-page,
  .contact-page {
    height: auto;
    min-height: 100svh;
    overflow-y: auto;
  }

  /* Reset flex-1 height chain — let content flow naturally on mobile */
  .theme-single-page .theme-template-list,
  .theme-single-page .theme-template-canvas,
  .theme-single-page .theme-template-canvas .theme-template-grid {
    flex: none;
    min-height: auto;
  }

  .theme-single-page .theme-template-card {
    height: auto;
  }

  .theme-single-page .theme-template-canvas.is-public .theme-template-grid {
    min-height: 300px;
  }
}
