/* Era Derby phone mock-ups, used on the homepage and on /era-derby.
   Inside the phones go the plain app screens (raw-ui, 390×844 at 3×), never the finished 01–08 store graphics.
   Floating cut-out cards sit on top, tilted, with a soft shadow, like the store art. */
.ed-stage {
  position: relative;
  display: grid; grid-template-columns: 1fr 1.2fr 1fr; align-items: center;
  padding: 6% 6% 10%;
}
.ed-phone {
  position: relative; margin: 0;
  aspect-ratio: 390 / 844;
  padding: 3.4%;
  border-radius: 15% / 6.9%;                      /* about 15% of the width, as a share of the height */
  background: #0c1517;
  box-shadow: inset 0 0 0 1.5px #2a3a3c, inset 0 0 0 4px #0c1517, 0 34px 60px -20px rgba(0, 0, 0, .75);
}
.ed-screen {
  position: relative; overflow: hidden;
  width: 100%; height: 100%;
  border-radius: 12% / 5.5%;
  background: #E5F6F5;                            /* the app's own background, so a short screen runs on cleanly */
}
.ed-screen img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: top; }
.ed-screen.is-short img { height: auto; }         /* online.png is cropped shorter: keep it at the top, never stretch it */
.ed-screen::after {                               /* the camera cut-out */
  content: ''; position: absolute; top: 1.8%; left: 50%; width: 28%; height: 3.2%;
  translate: -50% 0; border-radius: 999px; background: #050808;
}
.ed-phone--left  { rotate: -8deg; translate: 16% 7%; z-index: 1; }
.ed-phone--main  { z-index: 2; }
.ed-phone--right { rotate: 8deg; translate: -16% 7%; z-index: 1; }

.ed-card {
  position: absolute; z-index: 3; display: block; height: auto;
  border-radius: var(--r, 4%);                    /* clips the cut-out's square corners */
  box-shadow: 0 22px 40px -16px rgba(0, 0, 0, .6), 0 3px 8px rgba(0, 0, 0, .18);
}
.ed-card--goal   { --r: 4.1% / 9.6%;  width: 44%; left: 0;    bottom: 16%; rotate: -6deg; }
.ed-card--code   { --r: 4.2% / 12.5%; width: 40%; right: 0;   top: 60%;    rotate: 5deg; }
.ed-card--rival  { --r: 5.2% / 18%;   width: 36%; left: 34%;  bottom: 3%;  rotate: -3deg; }
.ed-card--room   { --r: 4.2% / 7%;    width: 40%; right: -1%; top: 52%;    rotate: 5deg; }
.ed-card--era    { --r: 4.2% / 11.1%; width: 44%; left: -2%;  bottom: 14%; rotate: -6deg; }
.ed-card--tactics{ --r: 4.6% / 11.3%; width: 38%; left: 35%;  bottom: 2%;  rotate: 3deg; }
@media (prefers-reduced-motion: no-preference) {
  .ed-card { transition: translate .5s var(--ease-soft, ease); }
  .ed-stage:hover .ed-card { translate: 0 -4px; }
}
