/* Moon Jump title card (title-card.js): a frosted glass card over the live title scene with your players (the Motions
   cast), a moving explainer of the squat-depth meter, the Moon shop and START. Replaces Unity's start sheet. */
#mj-title { position: fixed; inset: 0; z-index: 5; pointer-events: none; font-family: 'Fredoka', system-ui, sans-serif; color: #f3f5ff;
  opacity: 0; transition: opacity .35s ease; }
#mj-title.is-on { opacity: 1; }
#mj-title.is-on .mjt-card, #mj-title.is-on .mjt-hero { pointer-events: auto; }
#mj-title * { box-sizing: border-box; }

.mjt-hero { position: absolute; left: 0; right: 0; top: calc(26px + env(safe-area-inset-top)); text-align: center; pointer-events: none; }
.mjt-logo { margin: 0; font-weight: 700; font-size: clamp(44px, 9vw, 74px); letter-spacing: .02em; line-height: .95;
  background: linear-gradient(180deg, #fff 30%, #c9d6ff 70%, #8fb4ff); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 4px 0 rgba(23, 20, 80, .55)) drop-shadow(0 0 26px rgba(120, 170, 255, .45)); }
.mjt-tag { margin: 6px 0 0; font-weight: 600; font-size: 17px; letter-spacing: .14em; text-transform: uppercase; color: rgba(233, 238, 255, .78); }

.mjt-card { position: absolute; left: 50%; bottom: calc(14px + env(safe-area-inset-bottom)); transform: translate(-50%, 18px) scale(.98);
  width: min(388px, calc(100vw - 20px)); max-height: calc(100vh - 150px); overflow: auto; scrollbar-width: none;
  padding: 14px 14px 12px; border-radius: 26px;
  background: linear-gradient(160deg, rgba(64, 78, 170, .34), rgba(18, 20, 64, .42));
  -webkit-backdrop-filter: blur(20px) saturate(150%); backdrop-filter: blur(20px) saturate(150%);
  border: 1px solid rgba(255, 255, 255, .2);
  box-shadow: 0 24px 60px rgba(4, 6, 30, .55), inset 0 1px 0 rgba(255, 255, 255, .22), inset 0 -1px 0 rgba(0, 0, 0, .25);
  transition: transform .45s cubic-bezier(.2, .9, .25, 1.2); }
.mjt-card::-webkit-scrollbar { display: none; }
#mj-title.is-on .mjt-card { transform: translate(-50%, 0) scale(1); }
/* Laptops (landscape): the card sits on the left so the astronaut stays in view in the middle. */
@media (min-aspect-ratio: 1/1) and (min-width: 700px) {
  .mjt-card { left: 28px; top: 50%; bottom: auto; transform: translate(-16px, -44%); width: 360px; max-height: calc(100vh - 40px); }
  #mj-title.is-on .mjt-card { transform: translate(0, -44%); }
  .mjt-hero { top: calc(22px + env(safe-area-inset-top)); }
}
/* Small laptop windows: a slimmer card, so the start rock (left of centre) stays clear. */
@media (min-aspect-ratio: 1/1) and (min-width: 700px) and (max-width: 1180px) {
  .mjt-card { left: 14px; width: 292px; padding: 12px 11px 10px; }
  .mjt-player { flex-basis: 80px; } .mjt-player__art { width: 80px; height: 90px; }
  .mjt-meter { grid-template-columns: 46px 22px 1fr; } .mjt-meter__copy b { font-size: 15px; } .mjt-meter__copy span { font-size: 12px; }
  .mjt-item { flex-basis: 88px; } .mjt-start { font-size: 20px; padding: 12px 0; }
}

.mjt-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 2px 2px 8px; }
.mjt-label { font-size: 12px; font-weight: 700; letter-spacing: .16em; color: rgba(233, 238, 255, .7); text-transform: uppercase; }
.mjt-bucks { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px 4px 5px; border-radius: 999px; font-weight: 700; font-size: 15px;
  background: linear-gradient(180deg, rgba(255, 214, 102, .28), rgba(255, 170, 40, .16)); border: 1px solid rgba(255, 210, 100, .45); color: #ffe9a8; text-decoration: none; }
.mjt-bucks img { width: 22px; height: 22px; }
.mjt-bucks small { font-size: 11px; color: rgba(255, 233, 168, .75); font-weight: 600; }

/* ---- your players */
.mjt-players { display: flex; gap: 10px; overflow-x: auto; padding: 2px 2px 6px; scrollbar-width: none; }
.mjt-players::-webkit-scrollbar { display: none; }
.mjt-player { position: relative; flex: 0 0 92px; border: 0; padding: 0; background: none; color: inherit; font: inherit; cursor: pointer; text-align: center; }
.mjt-player__art { position: relative; display: block; width: 92px; height: 104px; border-radius: 18px; overflow: hidden;
  background: radial-gradient(120% 90% at 50% 10%, #2b3a96, #0d1240); box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .16); transition: transform .18s, box-shadow .18s; }
.mjt-player__art img { width: 100%; height: 100%; object-fit: cover; display: block; transition: filter .2s; }
.mjt-player:hover .mjt-player__art { transform: translateY(-2px); }
.mjt-player.is-on .mjt-player__art { box-shadow: inset 0 0 0 2.5px #5ee8ff, 0 0 22px rgba(94, 232, 255, .55); }
.mjt-player.is-locked .mjt-player__art img { filter: saturate(.55) brightness(.62); }
.mjt-player__name { display: block; margin-top: 5px; font-weight: 700; font-size: 14px; }
.mjt-player__state { position: absolute; left: 50%; bottom: 26px; transform: translateX(-50%); white-space: nowrap; padding: 2px 8px; border-radius: 999px;
  font-size: 11px; font-weight: 700; letter-spacing: .04em; background: rgba(9, 12, 40, .78); border: 1px solid rgba(255, 255, 255, .18); }
.mjt-player.is-on .mjt-player__state { color: #0b0f2b; background: #5ee8ff; border-color: #5ee8ff; }
.mjt-player.is-locked .mjt-player__state { color: #ffe9a8; border-color: rgba(255, 210, 100, .5); }
.mjt-player__lock { position: absolute; right: 7px; top: 7px; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(9, 12, 40, .7); border: 1px solid rgba(255, 255, 255, .25); }
.mjt-player__lock svg { width: 13px; height: 13px; fill: #fff; }

/* ---- the meter explainer */
.mjt-meter { display: grid; grid-template-columns: 54px 26px 1fr; align-items: center; gap: 10px; margin: 8px 0 10px; padding: 10px 12px;
  border-radius: 18px; background: rgba(8, 10, 40, .32); border: 1px solid rgba(255, 255, 255, .1); }
.mjt-fig { width: 54px; height: 66px; overflow: visible; }
.mjt-fig .body { animation: mjt-squat 3.4s cubic-bezier(.45, 0, .3, 1) infinite; transform-origin: 27px 64px; }
.mjt-fig .legs { animation: mjt-legs 3.4s cubic-bezier(.45, 0, .3, 1) infinite; transform-origin: 27px 64px; }
.mjt-gauge { position: relative; width: 22px; height: 66px; border-radius: 11px; background: rgba(0, 0, 0, .45); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .14); overflow: visible; }
.mjt-gauge__fill { position: absolute; left: 3px; right: 3px; bottom: 3px; border-radius: 8px; background: linear-gradient(0deg, #5ee8ff, #ffcc44);
  animation: mjt-fill 3.4s linear infinite; }
.mjt-gauge__ceil { position: absolute; left: -5px; right: -5px; height: 4px; border-radius: 3px; background: #fff; box-shadow: 0 0 10px #fff;
  animation: mjt-ceil 3.4s cubic-bezier(.45, 0, .3, 1) infinite; }
.mjt-gauge__lock { position: absolute; left: 3px; right: 3px; top: 3px; border-radius: 8px; background: repeating-linear-gradient(135deg, rgba(255, 255, 255, .08) 0 3px, transparent 3px 6px);
  animation: mjt-lock 3.4s cubic-bezier(.45, 0, .3, 1) infinite; }
.mjt-meter__copy b { display: block; font-size: 17px; line-height: 1.1; }
.mjt-meter__copy b em { font-style: normal; color: #ffcc44; }
.mjt-meter__copy span { display: block; margin-top: 3px; font-size: 13px; color: rgba(233, 238, 255, .72); }
.mjt-zones { display: flex; gap: 4px; margin-top: 6px; }
.mjt-zones i { font-style: normal; font-size: 10px; font-weight: 700; letter-spacing: .08em; padding: 1px 6px; border-radius: 6px; opacity: .35; animation: mjt-zone 3.4s steps(1) infinite; }
.mjt-zones i:nth-child(1) { color: #ff8c33; background: rgba(255, 140, 51, .15); animation-name: mjt-z1; }
.mjt-zones i:nth-child(2) { color: #5ee8ff; background: rgba(94, 232, 255, .15); animation-name: mjt-z2; }
.mjt-zones i:nth-child(3) { color: #ffcc44; background: rgba(255, 204, 68, .18); animation-name: mjt-z3; }
@keyframes mjt-squat { 0%, 6% { transform: translateY(0) } 40%, 70% { transform: translateY(15px) } 78% { transform: translateY(-9px) } 88%, 100% { transform: translateY(0) } }
@keyframes mjt-legs { 0%, 6% { transform: scaleY(1) } 40%, 70% { transform: scaleY(.55) } 78% { transform: scaleY(1.06) } 88%, 100% { transform: scaleY(1) } }
@keyframes mjt-ceil { 0%, 6% { bottom: 9% } 40%, 72% { bottom: 87% } 88%, 100% { bottom: 9% } }
@keyframes mjt-lock { 0%, 6% { bottom: 12% } 40%, 72% { bottom: 90% } 88%, 100% { bottom: 12% } }
@keyframes mjt-fill { 0%, 10% { height: 0 } 22% { height: 18% } 40% { height: 45% } 68% { height: 86%; filter: none } 72% { height: 86%; filter: brightness(1.6) } 80%, 100% { height: 0 } }
@keyframes mjt-z1 { 0%, 18% { opacity: 1 } 19%, 100% { opacity: .35 } }
@keyframes mjt-z2 { 0%, 18% { opacity: .35 } 19%, 34% { opacity: 1 } 35%, 100% { opacity: .35 } }
@keyframes mjt-z3 { 0%, 34% { opacity: .35 } 35%, 74% { opacity: 1; transform: scale(1.08) } 75%, 100% { opacity: .35 } }

/* ---- the Moon shop */
.mjt-shop { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 4px; scrollbar-width: none; }
.mjt-shop::-webkit-scrollbar { display: none; }
.mjt-item { flex: 0 0 104px; display: block; text-decoration: none; color: inherit; border-radius: 16px; overflow: hidden; background: rgba(8, 10, 40, .38);
  border: 1px solid rgba(255, 255, 255, .12); transition: transform .18s, border-color .18s; }
.mjt-item:hover { transform: translateY(-2px); border-color: rgba(255, 210, 100, .55); }
.mjt-item img { width: 100%; height: 64px; object-fit: cover; display: block; }
.mjt-item b { display: block; padding: 5px 7px 0; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mjt-item span { display: flex; align-items: center; gap: 4px; padding: 2px 7px 7px; font-size: 12px; font-weight: 700; color: #ffe9a8; }
.mjt-item span img { width: 14px; height: 14px; }
.mjt-item.is-owned span { color: #5ee8ff; }

/* ---- start */
.mjt-start { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; margin-top: 12px; padding: 14px 0; border: 0; border-radius: 999px; cursor: pointer;
  font: 700 22px 'Fredoka', system-ui; letter-spacing: .06em; color: #08112e;
  background: linear-gradient(180deg, #a6f5ff, #5ee8ff 55%, #38c4e6); box-shadow: 0 10px 26px rgba(94, 232, 255, .38), inset 0 2px 0 rgba(255, 255, 255, .6);
  transition: transform .12s, filter .12s; }
.mjt-start:hover { filter: brightness(1.06); transform: translateY(-1px); }
.mjt-start:active { transform: translateY(1px) scale(.99); }
.mjt-start:disabled { filter: grayscale(.5) brightness(.8); cursor: default; }
.mjt-start svg { width: 18px; height: 18px; fill: currentColor; }
.mjt-links { display: flex; justify-content: center; gap: 16px; margin-top: 9px; }
.mjt-links button, .mjt-links a { border: 0; background: none; color: rgba(233, 238, 255, .78); font: 600 13px 'Fredoka', system-ui; text-decoration: none; cursor: pointer; padding: 2px 0; }
.mjt-links button:hover, .mjt-links a:hover { color: #fff; }
.mjt-error { margin: 8px 0 0; text-align: center; color: #ff8f8f; font-size: 13px; }
.mjt-fine { margin: 8px 0 0; text-align: center; font-size: 11px; color: rgba(233, 238, 255, .5); }
@media (prefers-reduced-motion: reduce) { .mjt-fig .body, .mjt-fig .legs, .mjt-gauge__fill, .mjt-gauge__ceil, .mjt-gauge__lock, .mjt-zones i { animation: none; } }
/* Phones (portrait): a compact bottom sheet that stops below the astronaut (the scene's middle stays in view). */
@media (max-aspect-ratio: 1/1) {
  .mjt-hero { top: calc(18px + env(safe-area-inset-top)); }
  .mjt-logo { font-size: 44px; } .mjt-tag { font-size: 13px; margin-top: 3px; }
  .mjt-card { max-height: 46vh; padding: 10px 10px 8px; border-radius: 22px; }
  .mjt-row { margin: 0 2px 6px; } .mjt-label { font-size: 11px; }
  .mjt-players { gap: 8px; } .mjt-player { flex-basis: 70px; }
  .mjt-player__art { width: 70px; height: 76px; border-radius: 14px; } .mjt-player__name { font-size: 12px; margin-top: 3px; }
  .mjt-player__state { bottom: 21px; font-size: 9px; padding: 1px 6px; }
  .mjt-meter { grid-template-columns: 34px 16px 1fr; gap: 8px; margin: 6px 0 8px; padding: 7px 10px; border-radius: 14px; }
  .mjt-fig { width: 34px; height: 42px; } .mjt-gauge { width: 14px; height: 42px; }
  .mjt-meter__copy b { font-size: 14px; } .mjt-meter__copy span { display: none; } .mjt-zones { margin-top: 4px; }
  .mjt-item { flex-basis: 84px; } .mjt-item img { height: 46px; } .mjt-item b { font-size: 11px; padding-top: 3px; }
  .mjt-start { margin-top: 8px; padding: 11px 0; font-size: 19px; }
  .mjt-links { margin-top: 6px; } .mjt-fine { display: none; }
  [data-shopwrap] { display: none !important; }   /* the shop lives one tap away (Locker Room) on phones: START stays in view */
}
