.edm-home .edm-coverflow {
  padding: 12px 0 16px;
  border: 1px solid rgba(255, 243, 209, .22);
  border-radius: 20px;
  background: rgba(5, 33, 34, .55);
  box-shadow: 0 12px 32px rgba(0, 0, 0, .2);
}

.edm-home .edm-viewport {
  position: relative;
  overflow: hidden;
  perspective: 1100px;
  touch-action: pan-y pinch-zoom;
}

.edm-home .edm-coverflow.is-ready .edm-viewport { aspect-ratio: 1 / 1.12; }

.edm-home .edm-card {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 68%;
  height: auto;
  aspect-ratio: var(--edm-ratio, .869);
  max-height: 94%;
  margin: 0;
  border-radius: 10px;
  overflow: hidden;
  background: #123936;
  box-shadow: 0 10px 28px rgba(0, 0, 0, .4);
  transform: translate(-50%, -50%) scale(.65);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: transform .4s ease, opacity .4s ease, filter .4s ease, visibility .4s;
}

.edm-home .edm-card img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
}

.edm-home .edm-card.is-current,
.edm-home .edm-card.is-previous,
.edm-home .edm-card.is-next {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
}

.edm-home .edm-card.is-current {
  z-index: 3;
  transform: translate(-50%, -50%);
}

.edm-home .edm-card.is-previous {
  z-index: 2;
  transform: translate(-50%, -50%) translateX(-72%) scale(.8) rotateY(32deg);
  filter: brightness(.7);
}

.edm-home .edm-card.is-next {
  z-index: 2;
  transform: translate(-50%, -50%) translateX(72%) scale(.8) rotateY(-32deg);
  filter: brightness(.7);
}

.edm-home .edm-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 4px 12px;
  padding: 4px 12px 0;
}

.edm-home .edm-arrow,
.edm-home .edm-dot {
  display: inline-grid;
  place-items: center;
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  border: 0;
  color: var(--edm-cream);
  background: transparent;
  cursor: pointer;
}

.edm-home .edm-arrow { font-size: 30px; border-radius: 50%; }
.edm-home .edm-arrow:hover { background: rgba(255, 243, 209, .12); }
.edm-home .edm-dots { display: flex; flex-wrap: wrap; justify-content: center; max-width: 100%; }
.edm-home .edm-dot { min-width: 28px; border-radius: 8px; }
.edm-home .edm-dot::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 243, 209, .35);
  transition: background-color .2s, transform .2s;
}
.edm-home .edm-dot[aria-current="true"]::before {
  background: var(--edm-sand, #ffc970);
  transform: scale(1.3);
}
.edm-home .edm-status { min-width: 72px; color: var(--edm-cream); text-align: center; font-size: 14px; }
.edm-home .edm-coverflow :is(a, button):focus-visible { outline: 3px solid var(--edm-cream); outline-offset: -3px; }
.edm-home .edm-coverflow [hidden] { display: none; }
.edm-home .edm-empty { padding: 32px 16px; color: var(--edm-cream); text-align: center; }

@media (max-width: 640px) {
  .edm-home .edm-coverflow { border-radius: 14px; }
  .edm-home .edm-controls { gap: 0 4px; }
}

@media (prefers-reduced-motion: reduce) {
  .edm-home .edm-card, .edm-home .edm-dot::before { transition: none; }
}

.edm-home .edm-card.is-current { cursor: zoom-in; }

.edm-home .edm-viewer {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100%;
  height: 100dvh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  overflow: hidden;
  background: rgba(0, 0, 0, .88);
}
.edm-home .edm-viewer::backdrop { background: transparent; }
.edm-home .edm-viewer-canvas {
  position: absolute;
  inset: max(64px, env(safe-area-inset-top)) 48px max(32px, env(safe-area-inset-bottom));
  overflow: hidden;
  touch-action: none;
}
.edm-home .edm-viewer-image {
  position: absolute;
  left: 50%;
  top: 0;
  width: 100%;
  height: auto;
  max-width: none;
  max-height: none;
  user-select: none;
  -webkit-user-drag: none;
  cursor: grab;
}
.edm-home .edm-viewer-image.is-dragging { cursor: grabbing; }
.edm-home .edm-viewer-close {
  position: absolute;
  top: max(8px, env(safe-area-inset-top));
  left: max(8px, env(safe-area-inset-left));
  z-index: 1;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  color: white;
  font: 36px/1 sans-serif;
  text-shadow: 0 1px 6px black;
  cursor: pointer;
  touch-action: manipulation;
}
.edm-home .edm-viewer :focus-visible { outline: 2px solid white; outline-offset: -2px; }
@media (max-width: 640px) {
  .edm-home .edm-viewer-canvas { left: 24px; right: 24px; }
}
