/* Shared look for the redesign: the live motions.fun sky, frosted glass, glossy icons, indigo type. */
:root {
  --ink: #22195c;
  --ink-2: #4b4380;
  --muted: #6b6493;
  --glass: rgba(255, 255, 255, 0.58);
  --glass-strong: rgba(255, 255, 255, 0.84);
  --glass-edge: rgba(255, 255, 255, 0.9);
  --card: #ffffff;
  --soft: #f4f3ff;
  --shadow: 0 24px 60px -24px rgba(36, 30, 110, 0.45), 0 2px 0 rgba(255, 255, 255, 0.6) inset;
  --card-shadow: 0 10px 30px -18px rgba(30, 22, 100, 0.35);
  --brand: linear-gradient(135deg, #6b3cf2 0%, #5426e0 55%, #4318c4 100%);   /* Sky Glass: Motions dark violet, no pink */
  --brand-solid: #4318c4;
  --gold: #ffd84d;
  --good: #13965f;
  --sky: #8fc6ff;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-drawer: cubic-bezier(0.32, 0.72, 0, 1);
  font-family: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { min-height: 100%; }
body {
  margin: 0; color: var(--ink); -webkit-font-smoothing: antialiased;
  /* one continuous sky: each tab shows the next slice of a seamless panorama, so the camera pan between tabs lines up */
  background: var(--sky) url("/next/assets/sky-pan.webp") repeat-x fixed;
  background-size: auto 100vh; background-position: calc(var(--pan, 0) * -100vw) top;
  overflow-x: hidden;
}
button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; }
a { color: inherit; }
img { display: block; max-width: 100%; }
:focus-visible { outline: 3px solid #7b4dff; outline-offset: 2px; border-radius: 10px; }
.tabular { font-variant-numeric: tabular-nums; }

/* ---------- sponsor bar + top bar ---------- */
.sponsor {
  min-height: 28px; display: flex; align-items: center; justify-content: center; gap: 8px; flex-wrap: wrap;
  padding: 4px max(16px, env(safe-area-inset-right, 0px)) 4px max(16px, env(safe-area-inset-left, 0px));
  background: #141a3d; color: #fff; font-size: 12.5px; font-weight: 600; text-decoration: none;
}
.sponsor u { opacity: .85; text-underline-offset: 2px; }
.ad-tag { font-size: 10px; font-weight: 700; padding: 1px 5px; border-radius: 4px; background: rgba(255,255,255,.18); }
.nav {
  position: relative; z-index: 20;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px;
  padding: 12px max(clamp(16px, 4vw, 48px), env(safe-area-inset-right, 0px)) 0 max(clamp(16px, 4vw, 48px), env(safe-area-inset-left, 0px));
  font-family: Inter, system-ui, -apple-system, "Segoe UI", sans-serif; letter-spacing: -.025em;
}
.nav:not(.nav--stage):not(.nav--parents) { grid-template-rows: auto auto; column-gap: 12px; row-gap: 15px; padding-top: 20px; }
.nav:not(.nav--stage):not(.nav--parents) .logo { grid-column: 2; grid-row: 1; justify-self: center; }
.nav:not(.nav--stage):not(.nav--parents) .tabs { grid-column: 2; grid-row: 2; justify-self: center; }
.nav:not(.nav--stage):not(.nav--parents) .right { grid-column: 3; grid-row: 1; align-self: center; }
.nav .logo img { height: 34px; width: auto; }
.nav .logo { display: inline-flex; align-items: baseline; gap: 10px; text-decoration: none; }
.nav .logo span { font-size: 22px; font-weight: 800; color: var(--ink); }
.nav .tester-link {
  grid-area: 1 / 1; justify-self: start; max-width: 100%; padding: 10px 14px;
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  text-decoration: none; text-align: center; text-wrap: balance; color: #fff;
  font: inherit; font-weight: 700; line-height: 1.15;
}
.nav .tester-link svg { width: 20px; flex: none; }
.nav .tester-link:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
/* The shell keeps its header when switching tabs. Only Home shows the invite. */
.nav:not(:has(.tabs a:first-of-type[aria-current="page"])) .tester-link { display: none; }
@media (min-width:641px) and (max-width:850px) {
  .nav:has(.tester-link:not([hidden])):has(.tabs a:first-of-type[aria-current="page"]) {
    grid-template-columns: minmax(0,1fr) auto minmax(0,1fr);
  }
  .nav:has(.tester-link:not([hidden])):has(.tabs a:first-of-type[aria-current="page"]) .tabs { grid-column: 1 / -1; }
  .nav:has(.tester-link:not([hidden])):has(.tabs a:first-of-type[aria-current="page"]) .logo img { height: 26px; }
}
@media (max-width:640px) {
  .nav:has(.tester-link:not([hidden])):has(.tabs a:first-of-type[aria-current="page"]) .right {
    display: flex; justify-self: end; align-items: center; gap: 4px;
  }
  .nav:has(.tester-link:not([hidden])):has(.tabs a:first-of-type[aria-current="page"]) .logo img {
    width: clamp(78px, 29vw, 165px); height: auto;
  }
  .nav .tester-link { width: 44px; height: 44px; padding: 0; }
  .nav .tester-link svg { width: 22px; }
  .nav .tester-link span { display: none; }
}
.tabs {
  display: flex; gap: 4px; padding: 5px; border: 1px solid rgba(255, 255, 255, .78); border-radius: 14px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .76), rgba(236, 232, 255, .56));
  backdrop-filter: blur(16px) saturate(1.18); -webkit-backdrop-filter: blur(16px) saturate(1.18);
  box-shadow: 0 10px 24px rgba(34, 25, 92, .16), 0 2px 5px rgba(34, 25, 92, .08),
    inset 0 1px 0 rgba(255, 255, 255, .94), inset 0 -1px 0 rgba(55, 38, 120, .12);
}
.tabs a { padding: 8px 20px; border: 1px solid transparent; border-radius: 9px; font-family: Inter, system-ui, -apple-system, "Segoe UI", sans-serif; font-weight: 700; font-size: 15px; letter-spacing: -.025em; color: var(--ink-2); text-decoration: none; transition: background-color 160ms ease, color 160ms ease, box-shadow 160ms ease, transform 140ms var(--ease-out); }
.tabs a[aria-current="page"] {
  border-color: rgba(255, 255, 255, .88); color: var(--ink);
  background: linear-gradient(180deg, #fff, rgba(246, 244, 255, .96));
  box-shadow: 0 4px 10px rgba(34, 25, 92, .13), inset 0 1px 0 #fff, inset 0 -1px 0 rgba(55, 38, 120, .08);
}
.tabs a:not([aria-current]):hover { background: rgba(255,255,255,.5); }
/* Hide shopping shortcuts while the Store shows Coming soon. */
span.coins { cursor: default; }
html:not(.store-open) [data-store-link] { display: none !important; }
.tabs a:active { transform: scale(.97); }
.nav .right { display: flex; justify-content: flex-end; gap: 10px; align-items: center; }
.coins {
  display: inline-flex; align-items: center; gap: 7px; padding: 5px 13px 5px 5px; border: 1px solid rgba(255, 255, 255, .82); border-radius: 13px; text-decoration: none;
  background: linear-gradient(180deg, rgba(255, 245, 184, .98), rgba(255, 205, 55, .97));
  font-family: Inter, system-ui, -apple-system, "Segoe UI", sans-serif; font-weight: 800; letter-spacing: -.025em; font-variant-numeric: tabular-nums;
  box-shadow: 0 10px 24px rgba(91, 58, 0, .18), 0 2px 5px rgba(91, 58, 0, .10),
    inset 0 1px 0 rgba(255, 255, 255, .94), inset 0 -1px 0 rgba(125, 77, 0, .16);
  transition: transform 140ms var(--ease-out), box-shadow 180ms ease;
}
.coins img { width: 26px; height: 26px; filter: drop-shadow(0 2px 3px rgba(91, 58, 0, .18)); }
.coins:hover { box-shadow: 0 13px 28px rgba(91, 58, 0, .22), 0 3px 7px rgba(91, 58, 0, .11), inset 0 1px 0 #fff, inset 0 -1px 0 rgba(125, 77, 0, .16); }
.coins:active { transform: scale(.97); }
.pass-chip { padding: 8px 14px; border-radius: 999px; font-weight: 900; font-size: 14px; text-decoration: none; color: #3b2a00; background: linear-gradient(180deg, #ffe680, #ffc21a); box-shadow: 0 6px 16px -8px rgba(200,140,0,.8), inset 0 1px 0 rgba(255,255,255,.7); transition: transform 120ms var(--ease-out); }
.pass-chip:active { transform: scale(.96); }
@media (max-width: 420px) { .pass-chip { padding: 8px 10px; } }
.pill-btn { padding: 9px 18px; border-radius: 999px; font-family: Inter, system-ui, -apple-system, "Segoe UI", sans-serif; font-weight: 700; letter-spacing: -.025em; background: var(--glass-strong); box-shadow: var(--shadow); text-decoration: none; transition: transform 120ms var(--ease-out); }
.nav #navMe { padding: 9px 16px; }
.nav #navMe, .nav .tester-link {
  border: 1px solid rgba(255, 255, 255, .82); border-radius: 13px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .94), rgba(238, 234, 255, .82));
  backdrop-filter: blur(16px) saturate(1.15); -webkit-backdrop-filter: blur(16px) saturate(1.15);
  box-shadow: 0 10px 24px rgba(34, 25, 92, .16), 0 2px 5px rgba(34, 25, 92, .08),
    inset 0 1px 0 var(--nav-highlight, #fff), inset 0 -1px 0 rgba(55, 38, 120, .11);
  transition: transform 140ms var(--ease-out), box-shadow 180ms ease;
}
.nav .tester-link {
  --nav-highlight: transparent;
  border-color: transparent;
  background: linear-gradient(180deg, #5865f2, #505bdc) border-box;
}
.nav #navMe:hover, .nav .tester-link:hover { box-shadow: 0 13px 28px rgba(34, 25, 92, .20), 0 3px 7px rgba(34, 25, 92, .10), inset 0 1px 0 var(--nav-highlight, #fff), inset 0 -1px 0 rgba(55, 38, 120, .11); }
.nav #navMe:active, .nav .tester-link:active { transform: scale(.97); }
.nav-avatar { display: none; }
.press:active, .pill-btn:active { transform: scale(0.96); }

/* ---------- shared controls ---------- */
.play {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 22px; border-radius: 999px;
  background: var(--brand); color: #fff; font-weight: 800; font-size: 16px; text-decoration: none;
  box-shadow: 0 12px 24px -10px rgba(177,61,255,.85); transition: transform 120ms var(--ease-out);
}
.play:active { transform: scale(.96); }
.ghost { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 12px 18px; border-radius: 999px; background: #fff; font-weight: 800; text-decoration: none; transition: transform 120ms var(--ease-out); }
.ghost.soft { background: #f0eefc; }
.ghost:active { transform: scale(.96); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { font-size: 12.5px; font-weight: 700; padding: 5px 10px; border-radius: 999px; background: #eef0ff; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.card { background: var(--card); border-radius: 22px; padding: 16px; box-shadow: var(--card-shadow); }
.card h3 { margin: 0 0 12px; font-size: 16px; font-weight: 900; }
.close { width: 38px; height: 38px; border-radius: 50%; background: #fff; font-size: 18px; font-weight: 800; box-shadow: 0 4px 12px -6px rgba(0,0,0,.3); transition: transform 120ms var(--ease-out); }
.close:active { transform: scale(.92); }
.board { display: grid; gap: 6px; }
.row { display: grid; grid-template-columns: 26px 1fr auto; gap: 8px; align-items: center; padding: 8px 10px; border-radius: 12px; background: #f6f7ff; font-weight: 700; font-size: 14px; font-variant-numeric: tabular-nums; }
.row.you { background: #fde9fb; color: #8a1f7a; }
.coin-i { width: 18px; height: 18px; display: inline-block; vertical-align: -3px; }

/* ---------- footer, toast ---------- */
.foot { display: flex; justify-content: center; gap: 4px 14px; flex-wrap: wrap; font-size: 12.5px; color: var(--ink-2); font-weight: 600; padding: 6px 14px; }
.foot a { text-decoration: none; }
.foot a:hover { text-decoration: underline; }
.toast {
  position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); z-index: 90; transform: translate(-50%, 16px); opacity: 0;
  background: #1f1747; color: #fff; padding: 10px 16px; border-radius: 12px; font-weight: 600; font-size: 14px; max-width: calc(100vw - 32px);
  transition: transform 260ms var(--ease-out), opacity 200ms ease; pointer-events: none;
}
.toast.show { transform: translate(-50%, 0); opacity: 1; }
.test-note { font-size: 11.5px; color: var(--muted); font-weight: 600; }

@media (max-width: 640px) {
  .nav { grid-template-columns: 1fr auto; row-gap: 10px; }
  .nav:not(.nav--stage):not(.nav--parents) {
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); grid-template-rows: auto auto;
    column-gap: 8px; row-gap: 10px; padding: 12px 14px 0;
  }
  .nav:not(.nav--stage):not(.nav--parents) .logo { grid-column: 2; grid-row: 1; }
  .nav:not(.nav--stage):not(.nav--parents) .tabs { grid-column: 1 / -1; grid-row: 2; }
  .nav:not(.nav--stage):not(.nav--parents) .right { display: contents; }
  .nav:not(.nav--stage):not(.nav--parents) .coins {
    grid-column: 1; grid-row: 1; justify-self: start;
    gap: 4px; padding: 3px 8px 3px 3px; border-radius: 10px; font-size: 12px;
  }
  .nav:not(.nav--stage):not(.nav--parents) .coins img { width: 22px; height: 22px; }
  .nav:not(.nav--stage):not(.nav--parents) #navMe {
    grid-column: 3; grid-row: 1; justify-self: end; display: grid; place-items: center;
    width: 32px; height: 32px; padding: 3px; border-radius: 10px;
  }
  .nav:not(.nav--stage):not(.nav--parents) #navMe [data-nav-name] { display: none; }
  .nav:not(.nav--stage):not(.nav--parents) .nav-avatar {
    display: block; width: 24px; height: 24px; border-radius: 7px; object-fit: cover;
  }
  .tabs a { padding: 8px 14px; font-size: 14px; }
  .nav .logo img { height: 26px; }
  .sponsor .long { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; }
}

/* the home sky behind any page: a fixed layer the 3D blimps draw into (sky-bg.js) */
.sky-bg { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }

/* ---------- camera pan between tabs (pan.js): Home | Feed | League | Store sit side by side ---------- */
body[data-page="feed"] { --pan: 1; }
body[data-page="league"] { --pan: 2; }
body[data-page="store"] { --pan: 3; }
body[data-page="profile"] { --pan: 4; }
/* the cross-page opt-in (@view-transition) is added by pan.js on the tab pages only: the one-page canvas never opts
   in, so leaving it for a game on the same site (motions.games/g/...) starts no transition the game would see fail */
.sponsor { view-transition-name: site-sponsor; }
.nav { view-transition-name: site-nav; }
.tabs a[aria-current="page"] { view-transition-name: tab-pill; }
html:active-view-transition-type(leg-only) { --pan-d: 780ms; --pan-e: cubic-bezier(.65, 0, .35, 1); }
html:active-view-transition-type(leg-first) { --pan-d: 520ms; --pan-e: cubic-bezier(.55, 0, 1, .45); }
html:active-view-transition-type(leg-mid) { --pan-d: 420ms; --pan-e: linear; }
html:active-view-transition-type(leg-last) { --pan-d: 620ms; --pan-e: cubic-bezier(0, .55, .45, 1); }
html:active-view-transition-type(pan-next, pan-prev)::view-transition-group(*) { animation-duration: var(--pan-d); animation-timing-function: var(--pan-e); }
html:active-view-transition-type(pan-next, pan-prev)::view-transition-old(root),
html:active-view-transition-type(pan-next, pan-prev)::view-transition-new(root) { animation-duration: var(--pan-d); animation-timing-function: var(--pan-e); animation-fill-mode: both; mix-blend-mode: normal; }
html:active-view-transition-type(pan-next)::view-transition-old(root) { animation-name: pan-out-left; }
html:active-view-transition-type(pan-next)::view-transition-new(root) { animation-name: pan-in-right; }
html:active-view-transition-type(pan-prev)::view-transition-old(root) { animation-name: pan-out-right; }
html:active-view-transition-type(pan-prev)::view-transition-new(root) { animation-name: pan-in-left; }
@keyframes pan-out-left { to { transform: translateX(-100vw); } }
@keyframes pan-in-right { from { transform: translateX(100vw); } }
@keyframes pan-out-right { to { transform: translateX(100vw); } }
@keyframes pan-in-left { from { transform: translateX(-100vw); } }
@media (prefers-reduced-motion: reduce) { ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; } }

/* a tab inside the one-page shell: room for the shell's sponsor bar and top bar */
.shell-gap { flex: none; height: var(--shell-top, 106px); }

/* a tab inside the shell: the shell paints one sky and one fleet behind every tab, so the page is see-through and
   shows no scrollbar (a scrollbar at each tab's edge read as a divider). Glass inside a frame can't blur the shell's
   sky, so it is a little more opaque here. */
html.embedded, html.embedded body { background: transparent !important; scrollbar-width: none; }
html.embedded ::-webkit-scrollbar { display: none; }
html.embedded .panel-glass, html.embedded .cf-glass .vf-card:not(.vf-next), html.embedded .cf-glass .vf-target,
html.embedded .cf-glass .vf-left, html.embedded .cf-glass .vf-skins-card, html.embedded body[data-page="store"] .panel,
html.embedded .wallet { background: rgba(255, 255, 255, .74); }

/* only in preview builds (html.preview, set by common.js): sample-data notes and demo switches */
.preview-only { display: none !important; }
html.preview .preview-only { display: revert !important; }
/* Season pass: off for v1 (common.js, window.MOTIONS_SEASON_PASS). Every way into it carries data-season-pass;
   data-season-pass-off is what shows in its place while it's off. After .preview-only, so it wins over preview builds. */
html:not(.season-pass) [data-season-pass], html.season-pass [data-season-pass-off] { display: none !important; }
/* The Feed: off for now (common.js, window.MOTIONS_FEED). Links into it carry data-feed. */
html:not(.feed-on) [data-feed] { display: none !important; }

/* ---------- player progress (progress.js: MotionsProgress.ui): daily challenges, the week, the weekly badge ---------- */
.mp-games { display: grid; gap: 10px; }
.mp-game { background: #fff; border-radius: 20px; padding: 12px 14px; box-shadow: 0 8px 20px -16px rgba(30,22,100,.55); }
.mp-game.mp-all { background: linear-gradient(135deg, #e9faf1, #fff 70%); }
.mp-game header { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; margin-bottom: 8px; }
.mp-game header img { width: 44px; height: 44px; border-radius: 13px; }
.mp-game header b { display: block; font-size: 16px; font-weight: 900; }
.mp-game header small { font-size: 12.5px; font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; }
.mp-play { padding: 8px 14px; border-radius: 999px; background: var(--brand); color: #fff; font-weight: 800; font-size: 14px; text-decoration: none; box-shadow: 0 8px 18px -10px rgba(177,61,255,.85); transition: transform 120ms var(--ease-out); }
.mp-play:active { transform: scale(.96); }
.mp-game ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.mp-game li { display: grid; grid-template-columns: 24px minmax(0, 1fr) auto auto; gap: 10px; align-items: center; padding: 7px 10px; border-radius: 12px; background: #f6f7ff; font-weight: 700; font-size: 14px; }
.mp-game li.mp-done { background: #e6f7ee; }
.mp-tick { width: 22px; height: 22px; border-radius: 50%; border: 2px solid #d4d0f0; display: grid; place-items: center; font-size: 13px; font-weight: 900; color: #fff; }
.mp-game li.mp-done .mp-tick { border-color: var(--good); background: var(--good); }
.mp-label { min-width: 0; display: grid; gap: 4px; }
.mp-bar { display: block; height: 5px; border-radius: 99px; background: #e3e0f7; overflow: hidden; }
.mp-bar i { display: block; height: 100%; border-radius: inherit; background: var(--brand); transform-origin: left; transition: transform 600ms var(--ease-out); }
.mp-game li.mp-done .mp-bar i { background: var(--good); }
.mp-num { font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.mp-game li.mp-done .mp-num { color: var(--good); }
.mp-pay { font-size: 12.5px; font-weight: 800; color: #8a5a00; white-space: nowrap; font-variant-numeric: tabular-nums; }
.mp-pay .coin-i, .mp-plus .coin-i { width: 15px; height: 15px; vertical-align: -2px; }
.mp-empty { display: grid; gap: 10px; justify-items: start; padding: 14px; border-radius: 16px; background: #f6f7ff; color: var(--ink-2); font-weight: 700; font-size: 14px; }
.mp-signin { padding: 9px 16px; border-radius: 999px; background: var(--brand); color: #fff; font-weight: 800; font-size: 14px; box-shadow: 0 8px 18px -10px rgba(177,61,255,.85); transition: transform 120ms var(--ease-out); }
.mp-signin:active { transform: scale(.96); }
.mp-pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; background: #efe5ff; color: #6a2bc4; font-size: 12.5px; font-weight: 900; font-variant-numeric: tabular-nums; white-space: nowrap; }
.mp-pill.earned { background: #fff1b8; color: #7a5200; }
.mp-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 5px; }
.mp-day { position: relative; display: grid; justify-items: center; gap: 2px; padding: 8px 2px 10px; border-radius: 14px; background: #f6f7ff; font-size: 11.5px; font-weight: 800; color: var(--muted); }
.mp-day b { font-size: 17px; color: var(--ink); font-variant-numeric: tabular-nums; }
.mp-day.mp-today { background: #fff; outline: 2px solid #c04dff; color: #8a2bd6; }
.mp-day.mp-future { opacity: .5; }
.mp-day.mp-done { background: #e6f7ee; color: var(--good); }
.mp-stamp { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-size: 13px; font-weight: 900; color: #fff; border: 2px dashed #d4d0f0; }
.mp-day.mp-done .mp-stamp { border: 0; background: var(--good); box-shadow: 0 4px 10px -4px rgba(19,150,95,.7); animation: mp-stamp 420ms var(--ease-out) both; }
@keyframes mp-stamp { from { transform: scale(1.8) rotate(-18deg); opacity: 0; } to { transform: none; opacity: 1; } }
.mp-badge { display: grid; grid-template-columns: 88px 1fr; gap: 14px; align-items: center; padding: 12px 14px; border-radius: 18px; background: linear-gradient(135deg, #f5ecff, #fff 70%); }
.mp-badge > div { display: grid; gap: 4px; justify-items: start; min-width: 0; }
.mp-badge b { font-size: 18px; font-weight: 900; line-height: 1.2; }
.mp-art { position: relative; display: block; container-type: inline-size; }
.mp-art img { width: 100%; }
/* the week's date, written on the badge's blank ribbon */
.mp-week { position: absolute; left: 18%; right: 18%; top: 74%; height: 11%; display: grid; place-items: center; color: #fff; font-weight: 900; font-size: 12.5cqw; letter-spacing: .04em; line-height: 1; white-space: nowrap;
  text-shadow: 0 1px 0 rgba(0, 0, 0, .35), 0 0 6px rgba(0, 0, 0, .25); }
/* the Perfect Week badge's ribbon is gold and sits a little lower: the date in dark ink */
.mp-perfect-art .mp-week { left: 16%; right: 16%; top: 77.5%; height: 10%; color: #5a3a00; text-shadow: 0 1px 0 rgba(255, 244, 196, .7); }
.mp-badge-art { width: 88px; filter: drop-shadow(0 10px 14px rgba(110,40,180,.35)); transition: filter 300ms ease, opacity 300ms ease; }
.mp-badge-art.locked { filter: grayscale(1); opacity: .45; }
.mp-badge-art.half { filter: grayscale(.55) drop-shadow(0 8px 12px rgba(110,40,180,.25)); opacity: .8; }
.mp-badge.earned { background: linear-gradient(135deg, #fff1b8, #fff 70%); }
.mp-badge.earned .mp-badge-art { animation: mp-pop 700ms var(--ease-out) both; }
@keyframes mp-pop { 0% { transform: scale(.6) rotate(-12deg); } 60% { transform: scale(1.08) rotate(3deg); } 100% { transform: none; } }
.mp-eyebrow { font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: #8a2bd6; }
.mp-sub { font-size: 13px; color: var(--muted); font-weight: 600; }
.mp-plus { font-weight: 900; color: #8a5a00; white-space: nowrap; }
.mp-meter { display: flex; gap: 5px; margin: 2px 0; }
.mp-meter i { width: 34px; height: 8px; border-radius: 99px; background: #e3e0f7; }
.mp-meter i.on { background: var(--brand); }
.mp-shelf { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 12px; }
.mp-shelf-b { position: relative; margin: 0; display: grid; justify-items: center; gap: 6px; text-align: center; font-weight: 800; font-size: 13px; }
.mp-shelf-b .mp-art { width: min(96px, 100%); filter: drop-shadow(0 10px 14px rgba(60,30,120,.3)); }
.mp-shelf-b.new::before { content: "NEW"; position: absolute; top: -4px; right: 8%; z-index: 1; padding: 2px 8px; border-radius: 999px; background: #4318c4; color: #fff; font-size: 11px; font-weight: 900; }
@media (max-width: 520px) {
  .mp-game li { grid-template-columns: 22px minmax(0, 1fr) auto; }
  .mp-game li .mp-pay { grid-column: 2 / -1; justify-self: start; margin-top: -2px; }
  .mp-badge { grid-template-columns: 64px 1fr; } .mp-badge-art { width: 64px; }
  .mp-day { padding: 6px 1px 8px; font-size: 10.5px; } .mp-day b { font-size: 15px; }
}
@media (prefers-reduced-motion: reduce) {
  .mp-day.mp-done .mp-stamp, .mp-badge.earned .mp-badge-art { animation: none; }
  .mp-bar i, .mp-badge-art { transition: none; }
}
/* ---------- the Challenge of the Day (progress.js cotdHero, streakFlame, perfectSlot, bonusGoals) ---------- */
.mp-cotd { position: relative; overflow: hidden; display: grid; gap: 14px; padding: 18px 20px 16px; border-radius: 26px; color: #fff;
  background: radial-gradient(120% 140% at 100% 0%, rgba(255, 216, 77, .35), transparent 45%), linear-gradient(135deg, #6b3cf2 0%, #5426e0 52%, #4318c4 100%);
  box-shadow: 0 22px 44px -22px rgba(110, 30, 200, .75), inset 0 1px 0 rgba(255, 255, 255, .35); }
.mp-cotd.mp-cotd-done { background: radial-gradient(120% 140% at 100% 0%, rgba(255, 216, 77, .3), transparent 45%), linear-gradient(135deg, #18b277 0%, #10956a 50%, #2a7fd0 100%);
  box-shadow: 0 22px 44px -22px rgba(16, 120, 90, .75), inset 0 1px 0 rgba(255, 255, 255, .35); }
.mp-cotd-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.mp-cotd .mp-cotd-eyebrow { color: #fff; font-size: 12.5px; letter-spacing: .1em; padding: 5px 11px; border-radius: 999px; background: rgba(255, 255, 255, .2); }
.mp-cotd-body { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 16px; align-items: center; }
.mp-cotd-icon { width: 92px; height: 92px; border-radius: 24px; box-shadow: 0 14px 26px -12px rgba(30, 10, 80, .7), 0 0 0 3px rgba(255, 255, 255, .55); }
.mp-cotd-what { display: grid; gap: 6px; min-width: 0; }
.mp-cotd-game { font-size: 14px; font-weight: 800; opacity: .9; }
.mp-cotd-label { margin: 0; font-size: clamp(22px, 3vw, 30px); font-weight: 900; letter-spacing: -.02em; line-height: 1.1; text-wrap: balance; }
.mp-cotd .mp-sub { color: rgba(255, 255, 255, .88); }
.mp-cotd-prog { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 10px; align-items: center; margin-top: 2px; }
.mp-cotd-prog .mp-bar { height: 10px; background: rgba(255, 255, 255, .28); }
.mp-cotd-prog .mp-bar i { background: #fff; }
.mp-cotd .mp-num { color: #fff; font-size: 14px; font-weight: 900; }
.mp-cotd .mp-pay { color: #3a2400; background: var(--gold); padding: 3px 9px; border-radius: 999px; font-size: 13px; }
.mp-cotd-foot { display: flex; align-items: center; gap: 10px 14px; flex-wrap: wrap; }
.mp-cotd-play { display: inline-flex; align-items: center; gap: 8px; padding: 12px 22px; border-radius: 999px; background: #fff; color: var(--ink); font-weight: 900; font-size: 16px; text-decoration: none;
  box-shadow: 0 12px 24px -12px rgba(30, 10, 80, .7); transition: transform 120ms var(--ease-out); }
.mp-cotd-play:active { transform: scale(.96); }
.mp-cotd .mp-signin { background: #fff; color: var(--ink); box-shadow: 0 12px 24px -12px rgba(30, 10, 80, .7); }
.mp-cotd-doneline { display: inline-flex; align-items: center; gap: 8px; font-weight: 800; font-size: 15px; }
.mp-cotd-doneline i { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: #fff; color: var(--good); font-style: normal; font-weight: 900; }
.mp-cotd-ends:empty { display: none; }
.mp-cotd-ends { padding: 5px 11px; border-radius: 999px; background: rgba(20, 8, 60, .25); font-size: 13px; font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
.mp-cotd-streak { flex-basis: 100%; font-size: 13px; font-weight: 700; opacity: .92; }
/* the streak flame: dim until today's challenge is done */
.mp-flame { display: inline-flex; align-items: center; gap: 4px; padding: 4px 12px 4px 6px; border-radius: 999px; background: rgba(20, 8, 60, .28); color: #fff; font-weight: 900; font-size: 15px; font-variant-numeric: tabular-nums; }
.mp-flame svg { width: 26px; height: 26px; fill: #ffb27a; opacity: .75; }
.mp-flame .mp-flame-core { fill: #ffe08a; }
.mp-flame span { font-size: 12px; font-weight: 800; opacity: .85; }
.mp-flame.lit { background: rgba(255, 255, 255, .95); color: #b2410c; }
.mp-flame.lit svg { fill: #ff6a1f; opacity: 1; filter: drop-shadow(0 2px 6px rgba(255, 106, 31, .6)); animation: mp-flicker 1.6s ease-in-out infinite alternate; }
.mp-flame.zero svg { fill: rgba(255, 255, 255, .55); }
.mp-flame.zero .mp-flame-core { fill: rgba(255, 255, 255, .35); }
@keyframes mp-flicker { from { transform: scale(1) rotate(-2deg); } to { transform: scale(1.08) rotate(2deg); } }
/* the secret Perfect Week slot */
.mp-perfect { display: grid; grid-template-columns: 88px 1fr; gap: 14px; align-items: center; padding: 12px 14px; border-radius: 18px; background: #f3f1fb; border: 2px dashed #d6d0f0; }
.mp-perfect > div { display: grid; gap: 4px; min-width: 0; }
.mp-perfect b { font-size: 18px; font-weight: 900; line-height: 1.2; }
.mp-perfect-q { width: 76px; height: 76px; justify-self: center; border-radius: 50%; display: grid; place-items: center; font-size: 40px; font-weight: 900; color: #9a90c8;
  background: radial-gradient(circle at 35% 30%, #fff, #e4e0f6 70%); box-shadow: inset 0 -4px 0 rgba(90, 70, 160, .15), 0 8px 18px -10px rgba(60, 30, 120, .45); }
.mp-perfect.earned { border: 0; background: linear-gradient(135deg, #fff1b8, #ece6ff 55%, #fff 90%); }
.mp-perfect .mp-perfect-art { width: 88px; }
.mp-perfect.earned .mp-perfect-art { animation: mp-pop 700ms var(--ease-out) both; }
.mp-shelf-perfect .mp-perfect-art { width: min(96px, 100%); }
/* bonus goals: the per-game challenges, compact and collapsible */
.mp-bonus { border-radius: 20px; background: rgba(255, 255, 255, .7); box-shadow: 0 8px 20px -16px rgba(30, 22, 100, .55); }
.mp-bonus > summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 16px; border-radius: 20px; }
.mp-bonus > summary::-webkit-details-marker { display: none; }
.mp-bonus-t { display: grid; gap: 1px; }
.mp-bonus-t b { font-size: 17px; font-weight: 900; }
.mp-bonus-t small { font-size: 12.5px; font-weight: 700; color: var(--muted); }
.mp-chev { width: 30px; height: 30px; flex: none; border-radius: 50%; background: #efeaff; position: relative; transition: transform 200ms var(--ease-out); }
.mp-chev::before { content: ""; position: absolute; left: 10px; top: 8px; width: 8px; height: 8px; border-right: 2.5px solid #6a2bc4; border-bottom: 2.5px solid #6a2bc4; transform: rotate(45deg); }
.mp-bonus[open] .mp-chev { transform: rotate(180deg); }
.mp-bonus-list { padding: 0 10px 10px; }
.mp-bonus-bare { background: transparent; box-shadow: none; }
.mp-bonus-bare > summary { padding: 4px 4px 10px; }
.mp-bonus-bare .mp-bonus-list { padding: 0; }
.mp-compact { gap: 8px; }
.mp-compact .mp-game { padding: 8px 10px; border-radius: 16px; box-shadow: none; background: #fff; }
.mp-compact .mp-game header { margin-bottom: 4px; }
.mp-compact .mp-game header img { width: 32px; height: 32px; border-radius: 10px; }
.mp-compact .mp-game header b { font-size: 14px; }
.mp-compact .mp-game li { padding: 5px 8px; font-size: 13px; }
.mp-compact .mp-play { padding: 6px 12px; font-size: 13px; }
/* the boards' period toggle: This week | All-time */
.mp-period { display: inline-flex; gap: 3px; padding: 3px; border-radius: 999px; background: #eef0fa; }
.mp-period button { padding: 6px 12px; border-radius: 999px; font-weight: 800; font-size: 13px; color: var(--ink-2); }
.mp-period button[aria-pressed="true"] { background: #fff; color: var(--ink); box-shadow: 0 3px 10px -5px rgba(36, 30, 110, .45); }
@media (max-width: 520px) {
  .mp-cotd { padding: 14px 14px 14px; border-radius: 22px; }
  .mp-cotd-icon { width: 64px; height: 64px; border-radius: 18px; }
  .mp-cotd-body { gap: 12px; }
  .mp-cotd-play { flex: 1 1 100%; justify-content: center; }
  .mp-cotd-prog { grid-template-columns: minmax(0, 1fr) auto; } .mp-cotd-prog .mp-bar { grid-column: 1 / -1; }
  .mp-perfect { grid-template-columns: 64px 1fr; } .mp-perfect .mp-perfect-art { width: 64px; } .mp-perfect-q { width: 58px; height: 58px; font-size: 30px; }
}
@media (prefers-reduced-motion: reduce) {
  .mp-flame.lit svg, .mp-perfect.earned .mp-perfect-art { animation: none; }
  .mp-chev { transition: none; }
}
/* the top bar's name (progress.js puts the player's handle in the Sign in pill): never wider than its share */
#navMe { max-width: 34vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; transition: transform 120ms var(--ease-out), box-shadow 160ms ease; }
/* the account tile while the Profile is open (it's the Profile's way in; no tab is current then) */
#navMe[aria-current="page"] { background: #fff; box-shadow: 0 0 0 2px #4318c4, var(--shadow); }
.pass-chip { white-space: nowrap; }

/* The teacher site is a separate destination, outside the game tab ring. */
.nav .school-link { grid-column: 3; grid-row: 2; justify-self: end; color: var(--ink); font-size: 13px; font-weight: 700; text-decoration: none; padding: 9px 12px; border: 1px solid rgba(255,255,255,.7); border-radius: 12px; background: rgba(255,255,255,.65); }
.nav .school-link:hover { background: #fff; }
.nav .school-link:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
@media(max-width:850px) { .nav .school-link { grid-column: 1 / -1; grid-row: 3; justify-self: center; padding: 5px 12px; } }
