.world-green { --world-accent: #c7ee9b; --world-image-position: 23% 56%; }
.world-blue { --world-accent: #b8e5ff; --world-image-position: 18% 36%; }
.world-gold { --world-accent: #ffe39d; --world-image-position: 40% 79%; }
.world-violet { --world-accent: #eed1ff; --world-image-position: 89% 28%; }

body:not(.access-contrast32) .world-entrance,
body:not(.access-contrast32) .world-entrance.top {
  position: relative;
  isolation: isolate;
  box-sizing: border-box;
  padding: clamp(9px, 1.7vw, 20px);
  border: 2px solid var(--world-accent, #ffe39d);
  border-radius: 19px;
  background: #173762;
  background-image: linear-gradient(270deg, #0b2144 0%, #102c50f8 46%, #173762a0 100%),
    url("assets/age-learning-path.webp?v=45b8ed1d36");
  background-size: cover;
  background-position: center, var(--world-image-position, center);
  color: #fff9e8;
  box-shadow: 0 4px 0 #70572e, 0 9px 20px #10234b40;
}

body:not(.access-contrast32) .world-entrance :is(h1, p) {
  color: inherit;
}

.world-entrance > .world-spark {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  overflow: hidden;
  pointer-events: none;
}

.world-entrance > .world-spark::before,
.world-entrance > .world-spark::after {
  position: absolute;
  inset-block: 0;
  width: 50%;
  border: 2px solid var(--world-accent, #ffe39d);
  box-sizing: border-box;
  background: repeating-linear-gradient(90deg, #fff2 0 1px, transparent 1px 26px),
    linear-gradient(145deg, #294f7d, #142c55);
  visibility: hidden;
  content: "";
}

.world-spark::before { left: 0; --world-exit: -103%; }
.world-spark::after { right: 0; --world-exit: 103%; }

@media (prefers-reduced-motion: no-preference) and (min-height: 580px) {
  body:not(.answer-round, .access-contrast32) .world-entrance > .world-spark::before,
  body:not(.answer-round, .access-contrast32) .world-entrance > .world-spark::after {
    animation: world-door-open 520ms ease-out both;
  }
}

@keyframes world-door-open {
  from { visibility: visible; transform: none; }
  to { visibility: visible; transform: translateX(var(--world-exit)); }
}

body.world-play:not(.access-contrast32) :is(.motor-card, .patterns-round, #playing, #play, #screen > section) {
  border-color: var(--world-accent, #ffe39d);
  box-shadow: 0 4px 0 #77603f, 0 9px 20px #10234b33;
}

@media (max-width: 420px), (max-height: 650px) {
  body:not(.access-contrast32) .world-entrance,
  body:not(.access-contrast32) .world-entrance.top { padding: 9px; }
}
@media(max-width:700px){body:not(.access-contrast32) .world-entrance,body:not(.access-contrast32) .world-entrance.top{background-image:linear-gradient(270deg,#0b2144 0%,#102c50f8 46%,#173762a0 100%),url("assets/age-learning-path-768.webp?v=f1554506b8")}}
