/* R3 palette adaptation only; original silent welcome-parade motion and accessibility hooks retained. */
/* Shared shell and Skip layout retained from the current R1 dependency. */
.mogar-intro {
  display: none;
}

.mogar-intro[hidden] {
  display: none !important;
}

.mogar-intro.is-active {
  display: grid;
  grid-template-rows: minmax(0, 1fr);
  place-items: center;
  position: fixed;
  inset: 0;
  z-index: 1000;
  box-sizing: border-box;
  padding: 64px 24px;
  padding-top: max(64px, calc(env(safe-area-inset-top, 0px) + 16px));
  padding-right: max(24px, calc(env(safe-area-inset-right, 0px) + 16px));
  padding-bottom: calc(64px + env(safe-area-inset-bottom, 0px));
  padding-left: max(24px, calc(env(safe-area-inset-left, 0px) + 16px));
  overflow: hidden;
  pointer-events: auto;
  background: #101310;
}

.mogar-intro__skip {
  font-family: Arial, Helvetica, sans-serif;
  position: absolute;
  z-index: 2;
  right: clamp(24px, 5.4vw, 88px);
  right: max(clamp(24px, 5.4vw, 88px), calc(env(safe-area-inset-right, 0px) + 16px));
  bottom: 24px;
  bottom: max(24px, calc(env(safe-area-inset-bottom, 0px) + 12px));
  min-width: 44px;
  min-height: 44px;
  box-sizing: border-box;
  pointer-events: auto;
  background: transparent;
  border: 0;
  border-bottom: 1px solid #859877;
  padding: 12px 8px;
  color: #F0EDDF;
  font-size: 10px;
  line-height: 18px;
  letter-spacing: .13em;
  text-transform: uppercase;
  cursor: pointer;
}

.mogar-intro__skip:focus-visible {
  outline: 2px solid #D6D094;
  outline-offset: 4px;
}

.mogar-intro__skip span {
  margin-left: 12px;
  color: #F0EDDF;
  font-size: 9px;
}

/* Welcome parade r1. Original illustration, silent and decorative. */
.mogar-intro { --mogar-intro-ready: welcome-parade-r1; }
.mogar-intro.is-active {
  background: #101310;
  padding: 24px;
  padding-top: max(24px, env(safe-area-inset-top, 0px));
  padding-bottom: max(76px, calc(env(safe-area-inset-bottom, 0px) + 60px));
  animation: mogar-welcome-shell 4100ms linear both;
}
.mogar-welcome {
  position: relative;
  width: min(680px, 100%);
  min-width: 0;
  display: grid;
  justify-items: center;
  gap: 18px;
  color: #F0EDDF;
  font-family: Arial, Helvetica, sans-serif;
  text-align: center;
  pointer-events: none;
  transform-origin: 50% 28%;
}
.mogar-welcome::before {
  content: "";
  position: absolute;
  width: min(520px, 100%);
  height: 340px;
  top: -20px;
  border-radius: 50%;
  background: radial-gradient(ellipse, #55734A35, transparent 70%);
  pointer-events: none;
}
.mogar-welcome__brand { position: relative; width: 210px; max-width: 48vw; }
.mogar-welcome__logo { display: block; width: 100%; height: auto; overflow: visible; }
.mogar-welcome {
  animation: mogar-welcome-zoom 600ms cubic-bezier(.55, .05, .2, 1) 3300ms both;
}
.mogar-welcome__professor {
  position: absolute;
  width: 104px;
  height: auto;
  right: -62px;
  bottom: -6px;
}
.mogar-welcome__professor .bits-arrival { animation: bits-arrive 420ms ease-out 100ms both; }
.mogar-welcome__professor .bits-wave { transform-origin: 110px 111px; animation: bits-wave 480ms ease-in-out 550ms 4 alternate both; }
.mogar-welcome__copy { position: relative; max-width: 480px; min-height: 72px; padding: 0 8px; }
.mogar-welcome__speaker { margin: 0 0 8px; color: #F0EDDF; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; }
.mogar-welcome__greeting { margin: 0; color: #F0EDDF; font: 17px/1.45 Georgia, serif; text-wrap: balance; }
.mogar-welcome__parade { --parade-width: min(680px, 90vw); width: var(--parade-width); height: 92px; position: relative; overflow: hidden; }
.mogar-welcome__actor { position: absolute; left: 0; top: 4px; width: 80px; height: 80px; transform: translateX(calc(var(--parade-width) + 90px)); animation: chin-cross 2600ms linear 100ms both; }
.mogar-welcome__actor--two { top: 18px; animation-delay: 430ms; animation-duration: 2350ms; }
.mogar-welcome__actor--three { top: 1px; animation-delay: 760ms; animation-duration: 2200ms; }
.mogar-welcome__chin { display: block; width: 80px; height: 80px; animation: chin-pop 2600ms linear 100ms both; }
.mogar-welcome__actor--two .mogar-welcome__chin { animation-delay: 430ms; animation-duration: 2350ms; }
.mogar-welcome__actor--three .mogar-welcome__chin { animation-delay: 760ms; animation-duration: 2200ms; }
.mogar-welcome__chin .chin-body { animation: chin-step 240ms ease-in-out 100ms 11 alternate; }
.mogar-welcome__chin .chin-foot { transform-origin: 38px 63px; animation: chin-foot 240ms ease-in-out 100ms 11 alternate; }
.mogar-welcome__chin .chin-foot--back { animation-direction: alternate-reverse; }
.mogar-welcome__puff { position: absolute; inset: -8px; width: 96px; height: 96px; opacity: 0; animation: chin-puff 2600ms linear 100ms both; }
.mogar-welcome__actor--two .mogar-welcome__puff { animation-delay: 430ms; animation-duration: 2350ms; }
.mogar-welcome__actor--three .mogar-welcome__puff { animation-delay: 760ms; animation-duration: 2200ms; }
.mogar-intro__skip { color: #F0EDDF; background: #101310; border: 1px solid #859877; border-radius: 4px; font-size: 11px; letter-spacing: .08em; }
.mogar-intro__skip span { color: #F0EDDF; }
.mogar-intro__skip:focus-visible { outline: 3px solid #D6D094; outline-offset: 4px; }
body.mogar-welcome-reveal{overflow-x:clip;}
body.mogar-welcome-reveal > main {
  animation: mogar-site-settle 650ms cubic-bezier(.2, .6, .3, 1) backwards;
  transform-origin: 50% 20%;
}
@keyframes bits-arrive { from { transform: translateY(28px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
@keyframes bits-wave { from { transform: rotate(-12deg); } to { transform: rotate(20deg); } }
@keyframes chin-cross { from { transform: translateX(calc(var(--parade-width) + 90px)); } to { transform: translateX(-90px); } }
@keyframes chin-step { from { transform: translateY(0); } to { transform: translateY(-2px); } }
@keyframes chin-foot { from { transform: rotate(-12deg); } to { transform: rotate(12deg); } }
@keyframes chin-pop { 0%, 66% { opacity: 1; } 71%, 100% { opacity: 0; } }
/* One soft, coloured cartoon cloud per creature. No flashing or screen shake. */
@keyframes chin-puff { 0%, 66% { opacity: 0; transform: scale(.45); } 72% { opacity: .95; transform: scale(.8); } 90%, 100% { opacity: 0; transform: scale(1.18); } }
@keyframes mogar-welcome-zoom { from { transform: scale(1); opacity: 1; } to { transform: scale(9); opacity: 0; } }
@keyframes mogar-site-settle { from { transform: translateY(4px) scale(1.012); } to { transform: translateY(0) scale(1); } }
/* CSS independently releases the overlay even if JavaScript stops running. */
@keyframes mogar-welcome-shell {
  0%, 80.48% { opacity: 1; visibility: visible; pointer-events: auto; }
  99.99% { opacity: 0; visibility: visible; pointer-events: auto; }
  100% { opacity: 0; visibility: hidden; pointer-events: none; }
}
@media (max-height: 560px) {
  .mogar-welcome { gap: 6px; }
  .mogar-welcome__brand { width: 120px; }
  .mogar-welcome__professor { width: 76px; right: -45px; }
  .mogar-welcome__copy { min-height: 56px; }
  .mogar-welcome__greeting { font-size: 14px; }
  .mogar-welcome__parade { height: 70px; }
}
@media (max-width: 400px) {
  .mogar-welcome__brand { width: 166px; }
  .mogar-welcome__professor { width: 88px; right: -48px; }
  .mogar-welcome__greeting { font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .mogar-intro, .mogar-intro.is-active { display: none !important; visibility: hidden !important; pointer-events: none !important; }
  .mogar-intro, .mogar-intro * { animation: none !important; transition: none !important; }
  body.mogar-welcome-reveal > main { animation: none !important; transition: none !important; transform: none !important; }
}

.mogar-welcome__brand{aspect-ratio:6/7;display:grid;place-items:center}
.mogar-welcome__logo{object-fit:contain}
