/*
 * The games hub (/games/challenges), the play pages and "Dynamics 365 news of the day".
 * Ported from SAP Hub (Oct 2026) so the two sites carry the same features; loaded only by
 * the pages that use it, never site-wide. Every animation stops under
 * prefers-reduced-motion.
 *
 * Each card has a tone: a light accent (--t1) and a dark shade (--t2) that carries white text.
 */
/* ------------------------------------------------- /games/challenges ("the arena") */
/* Nine cards, nine colours: each tone is a light accent and a dark one that carries white
   text at AA. Accents sit around the brand navy + teal; gold stays for gamification. */
.arena-tone-1 { --t1: #0070f2; --t2: #0057b8; }
.arena-tone-2 { --t1: #ff7a00; --t2: #b34700; }
.arena-tone-3 { --t1: #7858ff; --t2: #5232d4; }
.arena-tone-4 { --t1: #0899a7; --t2: #066b75; }
.arena-tone-5 { --t1: #df1278; --t2: #a80c5a; }
.arena-tone-6 { --t1: #3d5afe; --t2: #2a3fbf; }
.arena-tone-7 { --t1: #1aa35c; --t2: #12733f; }
.arena-tone-8 { --t1: #3b8fe0; --t2: #1e5f9e; }
.arena-tone-9 { --t1: #e0a100; --t2: #855c00; }
.arena-board  { --t1: #f5b400; --t2: #855c00; }

.arena-hero {
  position: relative; overflow: hidden; color: #fff;
  padding: 3rem 0 2.75rem;
  background: linear-gradient(120deg, var(--primary-navy-dark), var(--primary-navy) 40%, var(--primary-teal-dark) 75%, var(--primary-teal));
  background-size: 220% 220%;
  animation: arena-sky 18s ease-in-out infinite;
}
@keyframes arena-sky { 0%, 100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }
.arena-codes { position: absolute; inset: 0; pointer-events: none; }
.arena-code {
  white-space: nowrap;
  position: absolute; font: 600 .8rem/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  padding: .3rem .55rem; border-radius: 99px; color: rgba(255, 255, 255, .3);
  border: 1px solid rgba(255, 255, 255, .12); background: rgba(255, 255, 255, .04);
  animation: arena-float calc(9s + var(--i) * .7s) ease-in-out infinite alternate;
  animation-delay: calc(var(--i) * -1.3s);
}
@keyframes arena-float { from { transform: translateY(0) rotate(-3deg); } to { transform: translateY(-22px) rotate(3deg); } }
.arena-eyebrow { display: inline-block; font-size: .8rem; font-weight: 600; letter-spacing: .02em; padding: .3rem .75rem; border-radius: 99px; background: rgba(255, 255, 255, .14); margin-bottom: .9rem; }
.arena-title { color: inherit; font-weight: 800; font-size: clamp(1.9rem, 4vw, 2.8rem); margin-bottom: .6rem; }
.arena-lead { color: rgba(255, 255, 255, .85); max-width: 40rem; }
.arena-progress { display: flex; align-items: center; gap: 1rem; padding: 1rem 1.25rem; border-radius: var(--radius-lg); background: rgba(255, 255, 255, .1); backdrop-filter: blur(6px); }
.arena-progress-guest { display: block; }
.arena-ring { width: 92px; height: 92px; flex-shrink: 0; transform: rotate(-90deg); }
.arena-ring circle { fill: none; stroke-width: 10; stroke-linecap: round; }
.arena-ring-track { stroke: rgba(255, 255, 255, .18); }
.arena-ring-fill { stroke: #f5b400; stroke-dasharray: var(--pct) 100; animation: arena-ring 1.2s ease-out both; }
@keyframes arena-ring { from { stroke-dasharray: 0 100; } }
.arena-progress-text { display: flex; flex-direction: column; line-height: 1.25; }
.arena-progress-text strong { font-size: 1.6rem; }
.arena-progress-text span { font-size: .85rem; color: rgba(255, 255, 255, .8); }
.arena-progress-text .arena-streak { color: #ffd27a; font-weight: 600; margin-top: .2rem; }

.arena-card {
  position: relative; height: 100%; display: flex; flex-direction: column; align-items: center; text-align: center;
  padding: 1.75rem 1.5rem 1.5rem; border-radius: var(--radius-lg); background: #fff;
  border: 1px solid var(--border-color); overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 38, 91, .06);
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
  animation: arena-in .5s ease-out both;
}
.arena-grid > div:nth-child(2) .arena-card { animation-delay: 60ms; }
.arena-grid > div:nth-child(3) .arena-card { animation-delay: 120ms; }
.arena-grid > div:nth-child(4) .arena-card { animation-delay: 180ms; }
.arena-grid > div:nth-child(5) .arena-card { animation-delay: 240ms; }
.arena-grid > div:nth-child(6) .arena-card { animation-delay: 300ms; }
.arena-grid > div:nth-child(7) .arena-card { animation-delay: 360ms; }
.arena-grid > div:nth-child(8) .arena-card { animation-delay: 420ms; }
.arena-grid > div:nth-child(9) .arena-card { animation-delay: 480ms; }
.arena-grid > div:nth-child(10) .arena-card { animation-delay: 540ms; }
.arena-card::before { content: ""; position: absolute; inset: 0 0 auto; height: 5px; background: linear-gradient(90deg, var(--t1), var(--t2)); }
.arena-card:hover, .arena-card:focus-within { transform: translateY(-6px); border-color: var(--t1); box-shadow: 0 14px 32px -12px var(--t1); }
@keyframes arena-in { from { opacity: 0; transform: translateY(14px); } }
.arena-icon {
  width: 68px; height: 68px; border-radius: 20px; display: grid; place-items: center; font-size: 1.75rem; color: #fff;
  background: linear-gradient(135deg, var(--t1), var(--t2)); margin-bottom: 1rem;
  box-shadow: 0 8px 18px -8px var(--t1);
  transition: transform .3s ease;
}
.arena-card:hover .arena-icon { transform: translateY(-4px) rotate(-6deg) scale(1.05); }
.arena-icon-gold { background: linear-gradient(135deg, #ffcf3f, #e08a00); }
.arena-flame i { animation: arena-flicker 1.6s ease-in-out infinite; display: inline-block; }
@keyframes arena-flicker { 0%, 100% { transform: scale(1) rotate(-2deg); } 50% { transform: scale(1.12) rotate(3deg); } }
.arena-name { font-size: 1.15rem; font-weight: 700; margin-bottom: .35rem; }
.arena-blurb { font-size: .9rem; color: var(--text-medium); margin-bottom: .75rem; }
.arena-meta { display: flex; gap: .9rem; justify-content: center; font-size: .78rem; color: var(--text-light); margin-bottom: 1rem; }
.arena-meta i { color: var(--t2); }
.arena-cta {
  position: relative; overflow: hidden; margin-top: auto; display: inline-flex; align-items: center;
  padding: .5rem 1.25rem; border-radius: 99px; font-weight: 600; font-size: .9rem; text-decoration: none;
  color: #fff; background: var(--t2);
}
.arena-cta::after { content: ""; position: absolute; top: 0; left: -60%; width: 40%; height: 100%; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .35), transparent); transform: skewX(-20deg); transition: left .5s ease; }
.arena-cta:hover { color: #fff; }
.arena-cta:hover::after { left: 120%; }
.arena-cta-done { background: transparent; color: var(--t2); border: 2px solid var(--t2); }
.arena-cta-done:hover { color: var(--t2); }
.arena-card.is-played .arena-icon::after { content: "\F26B"; font-family: bootstrap-icons; position: absolute; transform: translate(26px, -26px); font-size: 1.1rem; color: #1aa35c; background: #fff; border-radius: 50%; line-height: 1; }
.arena-streak-count { font-size: 2.6rem; font-weight: 800; color: var(--t2); line-height: 1; margin-bottom: .4rem; }
.arena-streak-count span { font-size: 1rem; font-weight: 600; color: var(--text-light); }
.arena-week { display: flex; gap: .35rem; margin-top: auto; }
.arena-week span { width: 22px; height: 8px; border-radius: 99px; background: var(--border-color); }
.arena-week span.on { background: linear-gradient(90deg, var(--t1), var(--t2)); }
.arena-ranks { list-style: none; padding: 0; margin: 0; width: 100%; text-align: left; font-size: .88rem; }
.arena-ranks li { display: flex; align-items: center; gap: .6rem; padding: .4rem .5rem; border-radius: 8px; }
.arena-ranks li:nth-child(odd) { background: rgba(0, 38, 91, .035); }
.arena-rank { width: 1.5rem; text-align: center; font-weight: 700; color: var(--text-light); }
.medal-1 .arena-rank { color: #c99400; }
.medal-2 .arena-rank { color: #7a8794; }
.medal-3 .arena-rank { color: #a35d2b; }
.arena-who { flex: 1; min-width: 0; }
.arena-score { font-weight: 700; font-variant-numeric: tabular-nums; }

/* The game's own colour on its play page. */
.arena-band { height: 6px; background: linear-gradient(90deg, var(--t1), var(--t2)); }

@media (prefers-reduced-motion: reduce) {
  .arena-hero, .arena-code, .arena-ring-fill, .arena-card, .arena-flame i { animation: none; }
  .arena-card, .arena-icon, .arena-cta::after { transition: none; }
}
.arena-resources a { display: flex; align-items: center; padding: .7rem .9rem; border-radius: 12px; font-weight: 600; text-decoration: none; color: var(--text-dark); background: rgba(0, 38, 91, .035); border: 1px solid transparent; transition: border-color .2s ease, transform .2s ease; }
.arena-resources a i { width: 2rem; height: 2rem; border-radius: 10px; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, var(--t1), var(--t2)); }
.arena-resources a:hover { border-color: var(--t1); transform: translateX(3px); }
@media (prefers-reduced-motion: reduce) { .arena-resources a { transition: none; } }

/* Topic challenges: full-colour cards, one subject each. */
.arena-tone-10 { --t1: #4f46e5; --t2: #2e2a9e; }  /* Power Platform */
.arena-tone-11 { --t1: #0f766e; --t2: #0b4f4a; }  /* Dataverse */
.arena-tone-12 { --t1: #1e40af; --t2: #0b1f6b; }  /* Business Central */
.arena-tone-13 { --t1: #9333ea; --t2: #5b1a99; }  /* Copilot & agents */
.arena-section { font-size: 1.25rem; font-weight: 800; color: var(--primary-navy); }
.arena-topic {
  position: relative; overflow: hidden; height: 100%; display: flex; flex-direction: column;
  padding: 1.5rem; border-radius: var(--radius-lg); color: #fff;
  background: linear-gradient(150deg, var(--t1), var(--t2));
  box-shadow: 0 12px 28px -14px var(--t2);
  transition: transform .25s ease, box-shadow .25s ease;
  animation: arena-in .5s ease-out both;
}
.arena-topic:hover, .arena-topic:focus-within { transform: translateY(-6px) scale(1.01); box-shadow: 0 22px 40px -16px var(--t2); }
.arena-topic-glow { position: absolute; width: 180px; height: 180px; right: -60px; top: -60px; border-radius: 50%; background: radial-gradient(circle, rgba(255, 255, 255, .28), transparent 70%); animation: arena-pulse 4s ease-in-out infinite; }
@keyframes arena-pulse { 0%, 100% { transform: scale(1); opacity: .8; } 50% { transform: scale(1.25); opacity: 1; } }
.arena-topic-icon { position: relative; width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; font-size: 1.5rem; background: rgba(255, 255, 255, .18); margin-bottom: 1rem; transition: transform .3s ease; }
.arena-topic:hover .arena-topic-icon { transform: rotate(-8deg) scale(1.08); }
.arena-topic-name { color: #fff; font-size: 1.2rem; font-weight: 800; margin-bottom: .4rem; }
.arena-topic-blurb { font-size: .88rem; color: rgba(255, 255, 255, .88); margin-bottom: 1.1rem; }
.arena-topic-cta { margin-top: auto; align-self: flex-start; display: inline-flex; align-items: center; padding: .45rem 1.1rem; border-radius: 99px; font-weight: 700; font-size: .88rem; text-decoration: none; background: #fff; color: var(--t2); transition: transform .2s ease; }
.arena-topic-cta:hover { color: var(--t2); transform: translateX(3px); }
.arena-topic-cta.is-done { background: rgba(255, 255, 255, .16); color: #fff; border: 1px solid rgba(255, 255, 255, .5); }
.arena-topic-cta.is-done:hover { color: #fff; }

/* The step-by-step quiz on a multiple-choice game. Without scripting every question shows. */
.quiz-stepper [data-mcq-step][hidden] { display: none; }
.quiz-progress-bar { height: 8px; border-radius: 99px; background: var(--border-color); overflow: hidden; }
.quiz-progress-bar span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--t1, var(--primary-teal)), var(--t2, var(--primary-navy))); transition: width .3s ease; }
.quiz-stepper .form-check { padding: .7rem .9rem .7rem 2.4rem; border: 1px solid var(--border-color); border-radius: 12px; transition: border-color .15s ease, background .15s ease; }
.quiz-stepper .form-check:hover { border-color: var(--t1, var(--primary-teal)); }
.quiz-stepper .form-check:has(input:checked) { border-color: var(--t1, var(--primary-teal)); background: rgba(0, 169, 157, .07); }
.quiz-step-in { animation: arena-in .3s ease-out both; }
.share-linkedin { display: inline-flex; align-items: center; gap: .4rem; padding: .5rem 1.1rem; border-radius: 99px; font-weight: 700; text-decoration: none; color: #fff; background: #0a66c2; }
.share-linkedin:hover { color: #fff; background: #004182; }

@media (prefers-reduced-motion: reduce) {
  .arena-topic, .arena-topic-glow, .quiz-step-in { animation: none; }
  .arena-topic, .arena-topic-icon, .arena-topic-cta, .quiz-progress-bar span { transition: none; }
}

/* ------------------------------------------------- Dynamics 365 news of the day (home feed) */
.hub-news { position: relative; padding: 2px; border-radius: calc(var(--radius-lg) + 2px); background: linear-gradient(120deg, #00a99d, #1e3a5f, #2dd4bf, #00a99d); background-size: 300% 300%; animation: arena-sky 12s ease-in-out infinite; box-shadow: 0 14px 34px -18px rgba(0, 38, 91, .5); }
.hub-news-inner { border-radius: var(--radius-lg); background: #fff; padding: 1.25rem 1.4rem 1.1rem; }
.hub-news-head { display: flex; align-items: center; justify-content: space-between; gap: .75rem; margin-bottom: .75rem; }
.hub-news-badge { display: inline-flex; align-items: center; gap: .45rem; font-size: .78rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: var(--primary-navy); background: rgba(0, 169, 157, .08); padding: .3rem .7rem; border-radius: 99px; }
.hub-news-dot { width: 8px; height: 8px; border-radius: 50%; background: #e0261b; box-shadow: 0 0 0 0 rgba(224, 38, 27, .6); animation: hub-news-live 1.8s ease-out infinite; }
@keyframes hub-news-live { 0% { box-shadow: 0 0 0 0 rgba(224, 38, 27, .55); } 100% { box-shadow: 0 0 0 9px rgba(224, 38, 27, 0); } }
.hub-news-controls { display: inline-flex; align-items: center; gap: .4rem; }
.hub-news-nav { width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--border-color); background: #fff; color: var(--primary-navy); display: grid; place-items: center; transition: background .15s ease, border-color .15s ease; }
.hub-news-nav:hover { border-color: var(--primary-teal); background: rgba(0, 169, 157, .07); }
.hub-news-count { color: var(--text-light); font-variant-numeric: tabular-nums; min-width: 2.6rem; text-align: center; }
.hub-news-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .45rem; font-size: .78rem; margin-bottom: .4rem; }
.hub-news-new { font-weight: 800; color: #fff; background: #e0261b; padding: .1rem .5rem; border-radius: 99px; }
.hub-news-chip { font-weight: 700; color: #5232d4; background: rgba(120, 88, 255, .1); padding: .1rem .55rem; border-radius: 99px; }
.hub-news-source { color: var(--text-light); }
.hub-news-title { font-size: 1.2rem; font-weight: 800; line-height: 1.3; margin-bottom: .45rem; }
.hub-news-title a { color: var(--primary-navy); text-decoration: none; }
.hub-news-title a:hover { color: var(--primary-teal); text-decoration: underline; }
.hub-news-summary { color: var(--text-medium); font-size: .93rem; margin-bottom: .8rem; }
.hub-news-actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.hub-news-read { display: inline-flex; align-items: center; gap: .4rem; font-weight: 700; font-size: .88rem; padding: .45rem 1rem; border-radius: 99px; color: #fff; background: var(--primary-teal); text-decoration: none; }
.hub-news-read:hover { color: #fff; background: var(--primary-navy); }
.hub-news-share { display: inline-flex; align-items: center; gap: .35rem; font-weight: 700; font-size: .88rem; padding: .45rem .9rem; border-radius: 99px; color: #0a66c2; border: 1px solid rgba(10, 102, 194, .35); text-decoration: none; }
.hub-news-share:hover { color: #004182; background: rgba(10, 102, 194, .06); }
.hub-news-slide.is-entering { animation: hub-news-in .35s ease-out both; }
@keyframes hub-news-in { from { opacity: 0; transform: translateX(14px); } }
.hub-news-dots { display: flex; justify-content: center; gap: .35rem; margin-top: .9rem; }
.hub-news-dots button { width: 8px; height: 8px; padding: 0; border: 0; border-radius: 99px; background: var(--border-color); transition: width .2s ease, background .2s ease; }
.hub-news-dots button.on { width: 22px; background: var(--primary-teal); }
.hub-news-list { margin-top: .8rem; padding-left: 1.1rem; }
@media (prefers-reduced-motion: reduce) {
  .hub-news, .hub-news-dot, .hub-news-slide.is-entering { animation: none; }
  .hub-news-dots button, .hub-news-nav { transition: none; }
}

/* ------------------------------------------------- arcade games */
.arcade { position: relative; }
.arcade-practice { font-weight: 600; color: var(--t2); background: rgba(0, 38, 91, .05); border-radius: 12px; padding: .6rem .9rem; }
.arcade-hud { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; font-size: .9rem; margin-bottom: .75rem; }
.arcade-hud i { color: var(--t2); }
.arcade-result { position: relative; text-align: center; margin-top: 1rem; padding: 1.25rem; border-radius: var(--radius-lg); background: #fff; border: 2px solid var(--t1); }
.arcade-result-score { font-size: 2.6rem; font-weight: 800; color: var(--t2); }
.arcade-confetti { position: absolute; left: 50%; top: 40%; width: 9px; height: 9px; border-radius: 2px; animation: arcade-confetti 1.1s ease-out forwards; }
@keyframes arcade-confetti { to { transform: translate(var(--dx), var(--dy)) rotate(260deg); opacity: 0; } }

/* Memory */
.mem-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: .7rem; perspective: 900px; }
@media (max-width: 575.98px) { .mem-grid { grid-template-columns: repeat(3, 1fr); } }
.mem-card { position: relative; aspect-ratio: 4 / 3; border: 0; padding: 0; background: none; border-radius: 14px; cursor: pointer; }
.mem-inner { position: absolute; inset: 0; transform-style: preserve-3d; transition: transform .45s cubic-bezier(.2, .8, .3, 1.2); border-radius: 14px; }
.mem-card.is-up .mem-inner { transform: rotateY(180deg); }
.mem-back, .mem-front { position: absolute; inset: 0; display: grid; place-items: center; border-radius: 14px; backface-visibility: hidden; padding: .4rem; text-align: center; }
.mem-back { background: linear-gradient(135deg, var(--t1), var(--t2)); color: rgba(255, 255, 255, .85); font-size: 1.6rem; box-shadow: 0 8px 18px -10px var(--t2); }
.mem-card:hover .mem-back { filter: brightness(1.1); }
.mem-front { transform: rotateY(180deg); background: #fff; border: 2px solid var(--border-color); font-size: .8rem; font-weight: 600; color: var(--text-dark); line-height: 1.25; }
.mem-card.is-code .mem-front { font: 800 1.15rem/1 ui-monospace, Menlo, monospace; color: var(--t2); }
.mem-card.is-matched .mem-front { border-color: #1aa35c; background: rgba(26, 163, 92, .08); }
.mem-card.is-matched { cursor: default; animation: mem-pop .4s ease-out; }
.mem-card.is-miss .mem-front { border-color: #e0261b; animation: mem-shake .35s; }
@keyframes mem-pop { 50% { transform: scale(1.06); } }
@keyframes mem-shake { 25% { transform: rotateY(180deg) translateX(-5px); } 75% { transform: rotateY(180deg) translateX(5px); } }

/* Lightning */
.lightning-start { text-align: center; padding: 2.5rem 1rem; border-radius: var(--radius-lg); background: #fff; border: 1px solid var(--border-color); }
.lightning-bolt { width: 84px; height: 84px; margin: 0 auto 1rem; border-radius: 50%; display: grid; place-items: center; font-size: 2.4rem; color: #fff; background: linear-gradient(135deg, #ffcf3f, #e08a00); animation: lt-pulse 1.6s ease-in-out infinite; }
@keyframes lt-pulse { 50% { transform: scale(1.08); box-shadow: 0 0 0 14px rgba(224, 161, 0, .15); } }
.lightning-timer { height: 12px; border-radius: 99px; background: var(--border-color); overflow: hidden; }
.lightning-timer span { display: block; height: 100%; width: 100%; background: linear-gradient(90deg, #1aa35c, #e0a100); transition: width .2s linear; }
.lightning-timer span.is-low { background: linear-gradient(90deg, #e0261b, #ff7a00); }
.lightning-card { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: .75rem; min-height: 150px; margin: 1rem 0; padding: 1.5rem; border-radius: var(--radius-lg); background: #fff; border: 3px solid var(--border-color); text-align: center; transition: border-color .2s, background .2s; }
.lightning-card.is-in { animation: lt-in .25s ease-out; }
@keyframes lt-in { from { opacity: 0; transform: scale(.94); } }
.lightning-card.is-right { border-color: #1aa35c; background: rgba(26, 163, 92, .07); }
.lightning-card.is-wrong { border-color: #e0261b; background: rgba(224, 38, 27, .06); animation: lt-shake .35s; }
@keyframes lt-shake { 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }
.lightning-code { font: 800 2rem/1 ui-monospace, Menlo, monospace; color: var(--t2); }
.lightning-eq { font-size: 1.6rem; color: var(--text-light); }
.lightning-shown { font-size: 1.15rem; font-weight: 600; max-width: 28rem; }
.lightning-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
.lightning-btn { border: 0; border-radius: 16px; padding: 1rem; font-size: 1.15rem; font-weight: 800; color: #fff; transition: transform .1s; }
.lightning-btn:active { transform: scale(.96); }
.lightning-btn.is-true { background: #12733f; }
.lightning-btn.is-false { background: #b3261e; }
.lightning-feedback { min-height: 1.5rem; margin-top: .75rem; text-align: center; font-weight: 600; }

/* Snake */
.snake-top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: .5rem; margin-bottom: .6rem; }
.snake-prompt { display: flex; flex-direction: column; padding: .55rem .9rem; border-radius: 12px; background: linear-gradient(135deg, var(--t1), var(--t2)); color: #fff; max-width: 100%; }
.snake-prompt span { opacity: .8; font-size: .7rem; letter-spacing: .05em; }
.snake-prompt strong { font-size: 1.05rem; }
.snake-stage { position: relative; border-radius: var(--radius-lg); overflow: hidden; box-shadow: 0 16px 34px -18px rgba(0, 23, 57, .7); }
.snake-canvas { display: block; width: 100%; height: auto; touch-action: none; }
.snake-overlay { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(0, 23, 57, .72); color: #fff; text-align: center; padding: 1rem; }
.snake-overlay[hidden] { display: none; }
.snake-overlay-inner { max-width: 26rem; }
.snake-logo { font-size: 2.6rem; margin-bottom: .5rem; animation: lt-pulse 1.8s ease-in-out infinite; display: inline-block; }
.snake-pad { display: grid; grid-template-areas: ". up ." "left down right"; grid-template-columns: repeat(3, 56px); gap: .35rem; justify-content: center; margin-top: .75rem; }
.snake-pad button { height: 48px; border: 0; border-radius: 12px; background: rgba(0, 38, 91, .08); color: var(--primary-navy); font-size: 1.3rem; }
.snake-pad button:active { background: rgba(0, 38, 91, .18); }
.snake-pad [data-sn-dir="up"] { grid-area: up; } .snake-pad [data-sn-dir="left"] { grid-area: left; }
.snake-pad [data-sn-dir="down"] { grid-area: down; } .snake-pad [data-sn-dir="right"] { grid-area: right; }
@media (hover: hover) and (pointer: fine) { .snake-pad { display: none; } }
.snake-feedback { min-height: 1.5rem; margin-top: .6rem; font-weight: 600; }

/* The arcade row on /games/challenges */
.arena-arcade { position: relative; overflow: hidden; height: 100%; display: flex; flex-direction: column; padding: 1.5rem; border-radius: var(--radius-lg); color: #fff; background: radial-gradient(circle at 85% 15%, rgba(255, 255, 255, .22), transparent 45%), linear-gradient(150deg, var(--t1), var(--t2)); box-shadow: 0 14px 30px -14px var(--t2); transition: transform .25s ease; animation: arena-in .5s ease-out both; }
.arena-arcade:hover, .arena-arcade:focus-within { transform: translateY(-6px) rotate(-.4deg); }
.arena-arcade .arena-topic-icon { font-size: 1.9rem; width: 64px; height: 64px; animation: arcade-bob 2.6s ease-in-out infinite; }
@keyframes arcade-bob { 50% { transform: translateY(-6px); } }
.arena-arcade .arcade-tag { position: absolute; top: 1rem; right: 1rem; font-size: .7rem; font-weight: 800; letter-spacing: .06em; padding: .2rem .55rem; border-radius: 99px; background: rgba(255, 255, 255, .2); }

@media (prefers-reduced-motion: reduce) {
  .mem-inner, .lightning-card, .lightning-timer span, .lightning-btn, .arena-arcade { transition: none; }
  .mem-card.is-matched, .mem-card.is-miss .mem-front, .lightning-card.is-in, .lightning-card.is-wrong,
  .lightning-bolt, .snake-logo, .arena-arcade, .arena-arcade .arena-topic-icon, .arcade-confetti { animation: none; }
}

/* The play page's header: the hero, shorter, with the way back above the title. */
.arena-hero-slim { padding: 1.75rem 0 1.6rem; }
.arena-hero-slim .arena-title { font-size: clamp(1.5rem, 3vw, 2.1rem); }
.arena-hero-slim .arena-topic-icon { color: #fff; background: linear-gradient(135deg, var(--t1), var(--t2)); }
.arena-back { color: rgba(255, 255, 255, .85); font-size: .88rem; text-decoration: none; }
.arena-back:hover { color: #fff; text-decoration: underline; }
/* Multi-word Dynamics 365 terms are longer than SAP codes: let the Lightning term wrap. */
.lightning-code { font-size: clamp(1.3rem, 4vw, 2rem); text-align: center; }
/* On a narrow screen there is no empty half for the floating terms to drift in. */
@media (max-width: 991.98px) { .arena-codes { display: none; } }
