/* Путь Ozmun — header chip: streak, freezes, XP, cup (loaded on every page). */
.game-hud {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  height: 40px;
  padding: 0 6px 0 4px;
  margin-right: 4px;
  border: 1px solid var(--oz-line, #DCEAE2);
  border-radius: 999px;
  background: #fff;
  color: var(--oz-ink, #0B2A1F);
  text-decoration: none;
  font-family: var(--font-body, Manrope, sans-serif);
  transition: border-color .2s, box-shadow .2s;
}
.game-hud:hover { border-color: var(--oz-green-bright, #0E9F6E); box-shadow: 0 4px 14px rgba(11, 42, 31, .08); }
.game-hud:focus-visible { outline: 3px solid var(--focus-ring, rgba(14,159,110,.35)); outline-offset: 2px; }
.game-hud__item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0 7px;
  height: 30px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 14px;
  line-height: 1;
  white-space: nowrap;
}
.game-hud__item b { font-weight: 800; font-variant-numeric: tabular-nums; }
.game-hud__streak { color: #E8590C; }
.game-hud__streak.is-cold { color: #9AA9A1; }
.game-hud__streak:not(.is-cold) svg { animation: ghud-flicker 2.4s ease-in-out infinite; transform-origin: 50% 90%; }
.game-hud__freeze { color: #2B8FD6; }
.game-hud__xp { color: var(--oz-yellow-ink, #6B4E00); background: var(--oz-yellow-soft, #FEF6C7); }
.game-hud__cup { padding: 0 2px; color: var(--oz-green, #0B7F58); }
.game-hud__cup img { display: block; width: 26px; height: 26px; object-fit: contain; filter: drop-shadow(0 1px 2px rgba(11, 42, 31, .25)); }
.game-hud__item.is-bump { animation: ghud-bump .5s cubic-bezier(.3, 1.6, .5, 1); }

@keyframes ghud-flicker { 0%, 100% { transform: scale(1) rotate(0); } 40% { transform: scale(1.08, .96) rotate(-3deg); } 70% { transform: scale(.96, 1.06) rotate(2deg); } }
@keyframes ghud-bump { 0% { transform: scale(1); } 45% { transform: scale(1.28); } 100% { transform: scale(1); } }

@media (max-width: 760px) {
  .game-hud { height: 36px; padding: 0 4px; gap: 0; }
  .game-hud__freeze, .game-hud__xp { display: none; }
  .game-hud__item { padding: 0 5px; font-size: 13px; }
}
@media (prefers-reduced-motion: reduce) {
  .game-hud__streak svg, .game-hud__item.is-bump { animation: none !important; }
}

/* Cup celebration (shown once for the highest new cup) */
.gcup-overlay {
  position: fixed; inset: 0; z-index: 2000;
  display: grid; place-items: center; padding: 16px;
  background: rgba(7, 42, 31, .72);
  backdrop-filter: blur(4px);
  animation: gcup-fade .25s ease-out;
}
.gcup-overlay.is-closing { animation: gcup-fade .25s ease-in reverse forwards; }
.gcup {
  position: relative; overflow: hidden;
  width: min(420px, 100%);
  padding: 22px 26px 26px;
  border-radius: 28px;
  /* the same dark green as the background of the cup pictures, as in the approved mock-up */
  background: radial-gradient(120% 70% at 50% 28%, #0F3A2A 0%, #0B2A1F 60%, #082119 100%);
  color: #fff; text-align: center;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .45), inset 0 0 0 1px rgba(250, 204, 21, .12);
  animation: gcup-pop .55s cubic-bezier(.2, 1.5, .4, 1);
}
.gcup__stage { position: relative; width: 240px; height: 240px; margin: 0 auto; }
.gcup__rays {
  position: absolute; left: 50%; top: 50%; width: 600px; height: 600px; margin: -300px 0 0 -300px;
  border-radius: 50%;
  background: repeating-conic-gradient(rgba(255, 214, 70, 0) 0deg, rgba(255, 214, 70, .21) 5deg, rgba(255, 214, 70, 0) 10deg, rgba(255, 214, 70, 0) 15deg);
  -webkit-mask: radial-gradient(circle, #000 22%, transparent 70%);
  mask: radial-gradient(circle, #000 22%, transparent 70%);
  animation: gcup-spin 26s linear infinite;
}
.gcup__rays2 {
  position: absolute; left: 50%; top: 50%; width: 460px; height: 460px; margin: -230px 0 0 -230px;
  border-radius: 50%;
  background: repeating-conic-gradient(from 4deg, rgba(255, 236, 160, 0) 0deg, rgba(255, 236, 160, .11) 3deg, rgba(255, 236, 160, 0) 6deg, rgba(255, 236, 160, 0) 24deg);
  -webkit-mask: radial-gradient(circle, #000 20%, transparent 68%);
  mask: radial-gradient(circle, #000 20%, transparent 68%);
  animation: gcup-spin 40s linear infinite reverse;
}
.gcup__glow {
  position: absolute; left: 50%; top: 55%; width: 320px; height: 320px; margin: -160px 0 0 -160px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(250, 204, 21, .5), rgba(250, 204, 21, 0) 65%);
  animation: gcup-pulse 2.6s ease-in-out infinite;
}
.gcup__ring {
  position: absolute; left: 50%; top: 52%; width: 270px; height: 270px; margin: -135px 0 0 -135px;
  border-radius: 50%;
  border: 1.5px solid rgba(250, 204, 21, .30);
  box-shadow: 0 0 24px rgba(250, 204, 21, .20), inset 0 0 24px rgba(250, 204, 21, .10);
  animation: gcup-pulse 2.6s ease-in-out infinite;
}
.gcup__img {
  position: absolute; left: 50%; top: 50%; width: 220px; height: 220px; margin: -110px 0 0 -110px; object-fit: contain;
  filter: drop-shadow(0 12px 18px rgba(0, 0, 0, .45));
  animation: gcup-float 3s ease-in-out infinite;
}
.gcup__eyebrow { position: relative; margin: 10px 0 4px; color: var(--oz-yellow, #FACC15); font-weight: 800; letter-spacing: .08em; text-transform: uppercase; font-size: 13px; }
.gcup__title { position: relative; margin: 0; color: #fff; font-family: var(--font-display, Unbounded, sans-serif); font-size: 30px; }
.gcup__text { position: relative; margin: 10px 0 20px; color: var(--oz-on-dark-muted, #B9D8C9); line-height: 1.5; }
.gcup__ok { position: relative; min-width: 160px; }
@keyframes gcup-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes gcup-pop { from { transform: scale(.6) translateY(30px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes gcup-spin { to { transform: rotate(360deg); } }
@keyframes gcup-pulse { 0%, 100% { opacity: .85; transform: scale(1); } 50% { opacity: 1; transform: scale(1.05); } }
@keyframes gcup-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@media (prefers-reduced-motion: reduce) { .gcup, .gcup__rays, .gcup__rays2, .gcup__glow, .gcup__ring, .gcup__img { animation: none !important; } }

/* «Продолжить путь» card (roadmaps, dashboard, lessons) */
.gpc { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 20px; border: 1px solid var(--oz-line, #DCEAE2); background: linear-gradient(135deg, #fff 55%, #F1FAF5); color: var(--oz-ink, #0B2A1F); text-decoration: none; transition: border-color .2s, box-shadow .2s, transform .15s; }
.gpc:hover { border-color: var(--oz-green-bright, #0E9F6E); box-shadow: 0 10px 26px rgba(11, 42, 31, .08); transform: translateY(-1px); }
.gpc:focus-visible { outline: 3px solid var(--focus-ring, rgba(14,159,110,.35)); outline-offset: 2px; }
.gpc__art { flex: none; display: flex; }
.gpc__body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.gpc__eyebrow { font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--oz-green, #0B7F58); }
.gpc__title { font-family: var(--font-display, Unbounded, sans-serif); font-size: 16px; font-weight: 600; line-height: 1.25; }
.gpc__bar { position: relative; height: 7px; margin: 4px 0 2px; border-radius: 999px; background: var(--oz-line, #DCEAE2); overflow: hidden; }
.gpc__bar > span { position: absolute; inset: 0 auto 0 0; border-radius: inherit; background: linear-gradient(90deg, #0E9F6E, #0B7F58); }
.gpc__meta { display: flex; flex-wrap: wrap; gap: 6px; }
.gpc__chip { display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 999px; background: var(--oz-line-soft, #EEF4F0); font-size: 12px; font-weight: 700; color: var(--oz-muted, #4A6358); }
.gpc__chip--flame { background: #FFE8D6; color: #C2410C; }
.gpc__cta { flex: none; display: inline-flex; align-items: center; gap: 6px; padding: 10px 14px; border-radius: 12px; background: var(--oz-yellow, #FACC15); color: var(--oz-ink, #0B2A1F); font-weight: 800; font-size: 14px; }
.gpc--compact { flex-wrap: wrap; }
.gpc--compact .gpc__cta { width: 100%; justify-content: center; }
@media (max-width: 560px) {
  .gpc { flex-wrap: wrap; }
  .gpc__cta { width: 100%; justify-content: center; }
}
.rml-game { margin-bottom: 18px; }
.rmd-game { margin-bottom: 16px; }
.pg-lesson__game { margin-top: 14px; }
