/* Korekuta – Holo-Effekt fuer seltene Karten (eigene Umsetzung, Programm 1.31).
 * Stufe 1 Holo: Kippen + Glanzpunkt · Stufe 2 Ultra: zusaetzlich Regenbogen-Schimmer · Stufe 3 Gold: goldener
 * Schimmer + Funken. Steuerung (Zeigerposition, Kippwinkel) per CSS-Variablen aus holo.js. */
.holo {
  --rx: 0deg; --ry: 0deg; --mx: 50%; --my: 50%; --px: 50%; --py: 50%; --o: 0;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  /* 1.32.5: ohne Vergroessern und ohne dauerhaftes will-change – sonst rechnet der Browser das fertig
   * gezeichnete Bild hoch und die Karte wird beim Kippen unscharf */
  transform: perspective(900px) rotateX(var(--rx)) rotateY(var(--ry));
  transition: transform .45s cubic-bezier(.2, .8, .2, 1), box-shadow .3s ease;
  backface-visibility: hidden;
}
.holo.holo-an { transition: transform .08s linear, box-shadow .3s ease; }
.holo > img { display: block; }
.holo[data-holo-finger] { touch-action: none; }
.holo::before, .holo::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  z-index: 2;
  transition: opacity .35s ease;
}
/* Glanzlicht am Zeiger */
.holo::before {
  background: radial-gradient(circle at var(--mx) var(--my), rgba(255, 255, 255, .7) 0%,
              rgba(255, 255, 255, .18) 26%, rgba(255, 255, 255, 0) 55%);
  mix-blend-mode: soft-light;
  opacity: var(--o);
}
/* Holo-Schimmer */
.holo::after {
  background: linear-gradient(115deg, transparent 18%, rgba(255, 70, 150, .55) 32%, rgba(70, 200, 255, .55) 44%,
              rgba(120, 255, 140, .5) 56%, rgba(255, 225, 90, .55) 68%, transparent 82%);
  background-size: 260% 260%;
  background-position: var(--px) var(--py);
  mix-blend-mode: color-dodge;
  opacity: calc(var(--o) * .22);
}
.holo-2::after { opacity: calc(var(--o) * .38); }
.holo-3::after {
  background: linear-gradient(115deg, transparent 12%, rgba(255, 210, 60, .65) 30%, rgba(255, 255, 255, .5) 42%,
              rgba(255, 170, 40, .6) 56%, rgba(170, 130, 255, .45) 70%, transparent 88%);
  background-size: 260% 260%;
  background-position: var(--px) var(--py);
  opacity: calc(var(--o) * .5);
}
/* Funken (Stufe 3) */
.holo .funke {
  position: absolute;
  z-index: 3;
  width: 9%;
  aspect-ratio: 1;
  border-radius: 50%;
  pointer-events: none;
  background: radial-gradient(circle, #fff 0, rgba(255, 255, 255, .85) 18%, rgba(255, 240, 200, .25) 40%, transparent 62%);
  opacity: 0;
  animation: holo-funke 2.6s ease-in-out infinite;
}
.holo .funke:nth-of-type(1) { top: 12%; left: 18%; animation-delay: 0s; }
.holo .funke:nth-of-type(2) { top: 30%; left: 74%; animation-delay: .7s; }
.holo .funke:nth-of-type(3) { top: 58%; left: 30%; animation-delay: 1.4s; }
.holo .funke:nth-of-type(4) { top: 78%; left: 66%; animation-delay: 2s; }
.holo .funke:nth-of-type(5) { top: 44%; left: 50%; animation-delay: 1s; width: 6%; }
.holo .funke:nth-of-type(6) { top: 86%; left: 14%; animation-delay: 1.8s; width: 6%; }
@keyframes holo-funke {
  0%, 100% { opacity: 0; transform: scale(.3) rotate(0deg); }
  50% { opacity: .9; transform: scale(1) rotate(45deg); }
}
/* Geraete ohne Maus: ruhiges Schimmern, bis die Karte bewegt wird */
.holo-auto:not(.holo-an)::after { animation: holo-wandern 7s ease-in-out infinite; }
.holo-auto.holo-1:not(.holo-an)::after { --o: .55; }
.holo-auto.holo-2:not(.holo-an)::after, .holo-auto.holo-3:not(.holo-an)::after { --o: .75; }
@keyframes holo-wandern {
  0%, 100% { background-position: 0% 0%; }
  50% { background-position: 100% 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .holo { transform: none !important; transition: none; }
  .holo .funke { animation: none; opacity: .35; }
  .holo-auto:not(.holo-an)::after { animation: none; }
}

/* ---- Slab-Rahmen fuer bewertete Karten (Programm 1.32): eigenes, neutrales Design – Etikett mit
 * Grading-Firma (Etikettfarbe aus dem Karten-Manager), Notenbezeichnung und Note; darunter das Kartenbild. */
.holo-slab {
  aspect-ratio: 100 / 160;
  container-type: inline-size;
  border-radius: 5.5% / 3.3%;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .22);
}
.holo-slab .slab {
  position: absolute;
  inset: 0;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 3.5cqw;
  padding: 5cqw;
  border-radius: inherit;
  background: linear-gradient(155deg, #f8fafc 0%, #e2e8f0 38%, #f1f5f9 62%, #cbd5e1 100%);
  box-shadow: inset 0 0 0 1px rgba(148, 163, 184, .9), inset 0 0 0 2.4cqw rgba(255, 255, 255, .55),
              inset 0 0 0 2.8cqw rgba(148, 163, 184, .35);
}
.holo-slab .slab-etikett {
  flex: 0 0 auto;
  height: 23cqw;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 3cqw;
  padding: 0 4cqw;
  background: #fff;
  border: 1.1cqw solid var(--slab-farbe, #475569);
  border-radius: 2.2cqw;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  line-height: 1.05;
  text-align: left;
}
.holo-slab .slab-links { display: flex; flex-direction: column; min-width: 0; }
.holo-slab .slab-firma {
  color: var(--slab-farbe, #475569);
  font-size: 8.5cqw;
  font-weight: 800;
  letter-spacing: .04em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.holo-slab .slab-text {
  margin-top: 1cqw;
  color: #1f2937;
  font-size: 5.2cqw;
  font-weight: 700;
  letter-spacing: .05em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.holo-slab .slab-note { color: #111827; font-size: 14cqw; font-weight: 800; line-height: 1; }
.holo-slab .slab-note.slab-auth { font-size: 9cqw; white-space: nowrap; }   /* ohne Note: „Auth.“ */
.holo-slab .slab-fenster {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2.5cqw;
  border-radius: 2.5cqw;
  background: linear-gradient(160deg, rgba(255, 255, 255, .6), rgba(203, 213, 225, .45));
  box-shadow: inset 0 0 0 1px rgba(100, 116, 139, .35), inset 0 2px 6px rgba(15, 23, 42, .12);
}
.holo-slab .slab-fenster img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  padding: 0;
  object-fit: contain;
  border-radius: 4.5% / 3.2%;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .25);
}
