.gallery-view {
  display: grid;
  grid-template-columns: repeat(var(--cols), minmax(0, 1fr));
  gap: 14px;
}

.pairs-view {
  display: grid;
  grid-template-columns: repeat(var(--cols), minmax(0, 1fr));
  gap: 14px;
}

/* Standard Karte */
.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 8px;
  box-shadow: var(--shadow);
  min-width: 0;
  overflow: hidden;
}

/* ---------- GALERIE ---------- */

.gallery-card {
  cursor: pointer;
}

.gallery-card.intro {
  animation: flyIn .55s ease forwards;
  opacity: 0;
}

.card-inner {
  position: relative;
  aspect-ratio: 1 / 1;
  transform-style: preserve-3d;
  transition: transform .42s ease;
}

.card.flip .card-inner {
  transform: rotateY(180deg);
}

.face {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: transparent;
  border: 0;
  backface-visibility: hidden;
  overflow: hidden;
  padding: 4px;
}

.face.back {
  transform: rotateY(180deg);
}

.face img {
  width: 90%;
  height: 90%;
  max-width: 90%;
  max-height: 90%;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 8px 10px rgba(0,0,0,.28));
}

.face.fallback {
  color: var(--muted);
  font-weight: 800;
  text-align: center;
}

/* Galerie ohne Text */
.gallery-view:not(.gallery-info-view) .card h4,
.gallery-view:not(.gallery-info-view) .card .meta {
  display: none;
}

/* Galerie mit Text */
.card h4 {
  margin: 6px 2px 2px;
  font-size: .96rem;
  line-height: 1.2;
}

.card .meta {
  color: var(--muted);
  font-size: .88rem;
}

/* ---------- PAARBILDER ---------- */

.pair-media {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.pair-face {
  aspect-ratio: 1 / 1;
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: 4px;
}

.pair-face img {
  width: 90%;
  height: 90%;
  max-width: 90%;
  max-height: 90%;
  object-fit: contain;
  filter: drop-shadow(0 8px 10px rgba(0,0,0,.28));
}

.pair-label {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 6px;
  color: var(--muted);
  font-size: .82rem;
}

.pair-title {
  margin-top: 8px;
  font-weight: 800;
}

.pair-meta {
  color: var(--muted);
  font-size: .88rem;
}

/* ---------- LISTE SEPARAT ---------- */

.list-view,
.table-wrap,
.table,
.plek-table {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

.table {
  border-collapse: collapse;
  border-spacing: 0;
  overflow: visible;
}

.table th,
.table td {
  border-left: 0 !important;
  border-right: 0 !important;
}

.table img,
.list-view img {
  border: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
}

/* Falls Mini-Bilder in eigenen kleinen Rahmen-Containern sitzen */
.thumb,
.mini-thumb,
.table-thumb,
.list-thumb {
  border: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
}

/* ---------- ANIMATION ---------- */

@keyframes flyIn {
  from {
    opacity: 0;
    transform: translateY(38px) scale(.96);
  }

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