/*
 * PRANATARA Controlled Forward Plane v003 — chat-169.
 *
 * A restrained centre-out scale makes each card project toward the viewer.
 * The plane never translates, tilts, rotates, springs, loops, or follows the
 * pointer, so its centre and its click target remain stationary.  This
 * successor also restores the full-card transparent button on every gallery
 * card (including the four Relics), restores the dialog toolbar's sticky\n * contract, and keeps modal cards below that toolbar.
 */

body[data-card-forward-depth="scale-plane-v003"]
  #grid
  > article.holo-card,
body[data-card-forward-depth="scale-plane-v003"]
  #cardDialog
  .collectible-card.holo-card,
body[data-card-forward-depth="scale-plane-v003"]
  .museum-feature-image.reference-feature-card,
body[data-card-forward-depth="scale-plane-v003"]
  > article.holo-card {
  --pranatara-forward-scale: 1.01;
  scale: 1;
  transform: none !important;
  transform-origin: 50% 50%;
  transition:
    scale 190ms cubic-bezier(.22, 1, .36, 1),
    border-color 180ms ease,
    outline-color 180ms ease,
    box-shadow 190ms cubic-bezier(.22, 1, .36, 1) !important;
}

/* The earlier Relic frame layer made its inherited transparent button 0 x 0.
 * Reassert the same full-card interaction plane used by all non-Relic cards;
 * this changes no visible frame, text, emblem, artwork, or hologram. */
body[data-card-forward-depth="scale-plane-v003"]
  #grid
  > article.holo-card
  .view-card-button {
  display: block !important;
  position: absolute !important;
  inset: 0 !important;
  z-index: 30 !important;
  width: auto !important;
  height: auto !important;
  min-width: 0 !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  color: transparent !important;
  box-shadow: none !important;
  opacity: 0 !important;
  pointer-events: auto !important;
  cursor: pointer;
}


/* A legacy Relic selector also changed the dialog toolbar from sticky to
 * relative. Restore the original sticky contract so ID / EN / Tutup remain
 * visible and operable while the enlarged card scrolls underneath. */
body[data-card-forward-depth="scale-plane-v003"]
  #cardDialog
  > .card-dialog-toolbar {
  position: sticky !important;
  top: 0 !important;
  z-index: 10 !important;
}
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  body[data-card-forward-depth="scale-plane-v003"]
    #grid
    > article.holo-card:hover {
    z-index: 8;
    scale: var(--pranatara-forward-scale);
    will-change: scale;
  }

  body[data-card-forward-depth="scale-plane-v003"]
    #cardDialog
    .collectible-card.holo-card:hover {
    z-index: 2;
    scale: var(--pranatara-forward-scale);
    will-change: scale;
  }

  body[data-card-forward-depth="scale-plane-v003"]
    > article.holo-card:hover {
    z-index: 1;
    scale: var(--pranatara-forward-scale);
    will-change: scale;
  }

  body[data-card-forward-depth="scale-plane-v003"]
    .museum-feature:hover
    .museum-feature-image.reference-feature-card {
    z-index: 2;
    scale: var(--pranatara-forward-scale);
    will-change: scale;
    box-shadow:
      0 2px 0 color-mix(in srgb, var(--frame-light, #e6d4ae) 58%, transparent),
      0 8px 0 -2px color-mix(in srgb, var(--frame-dark, #211912) 94%, #000),
      0 22px 30px -13px color-mix(in srgb, var(--frame-shadow, #09070a) 90%, transparent),
      0 44px 66px -25px color-mix(in srgb, var(--frame-shadow, #09070a) 94%, transparent),
      0 0 0 2px color-mix(in srgb, var(--frame-metal, #ae8f55) 58%, transparent),
      0 0 25px -9px color-mix(in srgb, var(--frame-accent, #a07a3b) 58%, transparent),
      inset 1px 1px 0 color-mix(in srgb, var(--frame-light, #e6d4ae) 42%, transparent),
      inset -2px -3px 0 color-mix(in srgb, var(--frame-dark, #211912) 86%, transparent) !important;
  }
}

@media (hover: none), (pointer: coarse) {
  body[data-card-forward-depth="scale-plane-v003"]
    #grid
    > article.holo-card,
  body[data-card-forward-depth="scale-plane-v003"]
    #cardDialog
    .collectible-card.holo-card,
  body[data-card-forward-depth="scale-plane-v003"]
    .museum-feature-image.reference-feature-card,
  body[data-card-forward-depth="scale-plane-v003"]
    > article.holo-card {
    scale: 1 !important;
    will-change: auto !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  body[data-card-forward-depth="scale-plane-v003"]
    #grid
    > article.holo-card,
  body[data-card-forward-depth="scale-plane-v003"]
    #cardDialog
    .collectible-card.holo-card,
  body[data-card-forward-depth="scale-plane-v003"]
    .museum-feature-image.reference-feature-card,
  body[data-card-forward-depth="scale-plane-v003"]
    > article.holo-card {
    scale: 1 !important;
    transform: none !important;
    transition: none !important;
    will-change: auto !important;
  }
}

@media (forced-colors: active) {
  body[data-card-forward-depth="scale-plane-v003"]
    #grid
    > article.holo-card,
  body[data-card-forward-depth="scale-plane-v003"]
    #cardDialog
    .collectible-card.holo-card,
  body[data-card-forward-depth="scale-plane-v003"]
    .museum-feature-image.reference-feature-card,
  body[data-card-forward-depth="scale-plane-v003"]
    > article.holo-card {
    scale: 1 !important;
    transform: none !important;
    transition: none !important;
    will-change: auto !important;
  }
}

