body.gallery-view main {
  position: relative;
}

body.gallery-view .shell {
  width: min(1180px, 94vw);
}

.gallery-hero {
  padding-top: 1.25rem;
  padding-bottom: 1rem;
}

.gallery-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.84fr) minmax(0, 1.16fr);
  gap: 0.9rem;
  align-items: stretch;
}

.gallery-logo-shell,
.gallery-copy,
.gallery-toolbar,
.gallery-card,
.gallery-empty {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(17, 245, 255, 0.26);
  background:
    linear-gradient(160deg, rgba(8, 14, 22, 0.94), rgba(17, 10, 21, 0.9));
  box-shadow: 0 12px 32px rgba(3, 10, 18, 0.42);
}

.gallery-logo-shell::before,
.gallery-copy::before,
.gallery-toolbar::before,
.gallery-card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(140% 110% at 0% 100%, rgba(17, 245, 255, 0.12), transparent 58%),
    radial-gradient(120% 110% at 100% 0%, rgba(255, 46, 161, 0.14), transparent 58%),
    repeating-linear-gradient(
      90deg,
      rgba(17, 245, 255, 0.032) 0,
      rgba(17, 245, 255, 0.032) 1px,
      transparent 1px,
      transparent 16px
    );
}

.gallery-logo-shell {
  border-radius: 0.62rem;
  display: grid;
  place-items: center;
  padding: 0.72rem;
  min-height: 320px;
}

.gallery-logo-shell img {
  width: min(100%, 430px);
  height: auto;
  max-height: 66vh;
  object-fit: contain;
  border-radius: 0.46rem;
  border: 1px solid rgba(17, 245, 255, 0.2);
  z-index: 1;
}

.gallery-copy {
  border-radius: 0.62rem;
  padding: 0.86rem;
}

.gallery-copy > * {
  position: relative;
  z-index: 1;
}

.gallery-copy h1 {
  margin: 0;
  font-size: clamp(1.6rem, 4.4vw, 2.8rem);
  letter-spacing: 0.03em;
  text-shadow: 0 0 20px rgba(17, 245, 255, 0.2);
}

.collection-meta-line {
  margin-top: 0.75rem;
  margin-bottom: 0.38rem;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.6;
}

.collection-meta-line code {
  color: var(--cyan);
  background: rgba(6, 11, 17, 0.86);
  border: 1px solid rgba(17, 245, 255, 0.32);
  border-radius: 0.38rem;
  padding: 0.18rem 0.34rem;
}

.collection-sales-line {
  margin: 0 0 0.9rem;
  color: rgba(197, 241, 255, 0.9);
  font-size: 0.76rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.collection-sales-line.is-ready {
  color: rgba(17, 245, 255, 0.92);
}

.collection-sales-line.is-error {
  color: #ff9bb2;
}

.gallery-body {
  padding-top: 0.1rem;
}

.gallery-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.58rem;
  margin-bottom: 0.72rem;
  border-radius: 0.58rem;
  padding: 0.6rem;
}

.gallery-toolbar > * {
  position: relative;
  z-index: 1;
}

.gallery-toolbar label {
  color: rgba(223, 242, 255, 0.74);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

#gallery-search {
  min-width: min(20rem, 90vw);
  border: 1px solid rgba(17, 245, 255, 0.34);
  border-radius: 0.4rem;
  background: rgba(6, 10, 17, 0.94);
  color: var(--text);
  padding: 0.5rem 0.72rem;
  font: inherit;
}

#gallery-search:focus-visible {
  outline: 1px solid rgba(17, 245, 255, 0.62);
  border-color: rgba(17, 245, 255, 0.62);
}

#gallery-status {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
}

#gallery-status.is-ready {
  color: rgba(17, 245, 255, 0.92);
}

#gallery-status.is-error {
  color: #ff9bb2;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(192px, 1fr));
  gap: 0.56rem;
}

.gallery-card {
  border-radius: 0.54rem;
  transition: transform 170ms ease, border-color 170ms ease, box-shadow 170ms ease;
}

.gallery-card:hover,
.gallery-card:focus-within {
  transform: translateY(-2px);
  border-color: rgba(255, 46, 161, 0.5);
  box-shadow:
    0 0 0 1px rgba(17, 245, 255, 0.18) inset,
    0 12px 28px rgba(4, 11, 19, 0.56);
}

.gallery-media {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  background: rgba(5, 9, 15, 0.94);
  border-bottom: 1px solid rgba(17, 245, 255, 0.2);
}

.gallery-media img,
.gallery-media video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.gallery-card-content {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 0.26rem;
  padding: 0.56rem 0.62rem 0.62rem;
}

.gallery-card-content h2 {
  margin: 0;
  font-size: 0.86rem;
  line-height: 1.2;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.token-line {
  margin: 0;
  font-size: 0.64rem;
  color: rgba(223, 242, 255, 0.62);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.open-link {
  display: inline-flex;
  width: fit-content;
  text-decoration: none;
  font-size: 0.7rem;
  color: var(--cyan);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.open-link:hover,
.open-link:focus-visible {
  color: #68fdff;
}

.gallery-empty {
  border-style: dashed;
  border-radius: 0.58rem;
  padding: 0.9rem;
  color: var(--muted);
  font-size: 0.82rem;
}

body.gallery-view .site-footer {
  margin-top: 0.5rem;
}

@media (max-width: 980px) {
  .gallery-hero-grid {
    grid-template-columns: 1fr;
  }

  .gallery-logo-shell {
    min-height: 230px;
  }
}

/* Clean-cut pass to match landing page geometry */
body.gallery-view .button {
  border-radius: 0.34rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.7rem;
  padding: 0.44rem 0.66rem;
}

.gallery-logo-shell,
.gallery-copy,
.gallery-toolbar,
.gallery-card,
.gallery-empty {
  border-radius: 0.34rem;
  box-shadow: 0 8px 20px rgba(3, 10, 18, 0.34);
}

.gallery-logo-shell::before,
.gallery-copy::before,
.gallery-toolbar::before,
.gallery-card::before {
  opacity: 0.62;
}

.gallery-media {
  border-radius: 0.34rem 0.34rem 0 0;
}

.wallet-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.46rem;
  align-items: center;
}

.wallet-status {
  flex: 1 1 100%;
  margin: 0.05rem 0 0;
  color: rgba(197, 241, 255, 0.86);
  font-size: 0.62rem;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.wallet-status.is-ready {
  color: rgba(17, 245, 255, 0.9);
}

.wallet-status.is-error {
  color: #ff9bb2;
}
