/* Илбирстин сапары — start, results, pause and the play HUD.
   The start and results screens are styled only here; arcade.css and the
   page <style> keep the world, prompt, cards, coach and shared controls.
   Palette and type stay the Söz ones: paper, ink, terracotta, sage, Charis. */

:root {
  --ui-surface: #fffaf0;
  --ui-sunk: #efe7da;
  --ui-gold: #f8e2a8;
  --ui-gold-ink: #7a4a12;
  --ui-sage-soft: #dfeae5;
  --ui-shadow: 0 10px 28px rgba(59, 45, 32, .14), 0 2px 6px rgba(59, 45, 32, .08);
  --ui-safe-top: env(safe-area-inset-top, 0px);
  --ui-safe-bottom: env(safe-area-inset-bottom, 0px);
}

::selection { background: #f2cdb9; color: var(--ink); }

.ico {
  width: 22px; height: 22px; flex: none;
  fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}

/* ───────────────────────── Start ───────────────────────── */

#start-overlay {
  display: block; padding: 0; overflow: hidden;
  background: var(--paper); color: var(--ink);
  backdrop-filter: none; -webkit-backdrop-filter: none;
}
.trailhead { position: relative; height: 100%; display: flex; flex-direction: column; }

/* The painted valley is the stage; it fades into paper behind the dock. */
.trailhead__panorama {
  position: absolute; inset: 0 0 auto; width: 100%; height: 74%;
  object-fit: cover; object-position: 50% 28%; z-index: 0;
}
.trailhead::after {
  content: ''; position: absolute; left: 0; right: 0; top: 46%; height: 30%; z-index: 0;
  background: linear-gradient(to bottom, rgba(243, 239, 231, 0), var(--paper) 88%);
  pointer-events: none;
}
.trailhead__scene { order: 3; flex: 1 1 auto; min-height: 96px; position: static; display: flex; align-items: flex-end; justify-content: center; }
.trailhead__mascot {
  position: relative; z-index: 1; width: auto; height: 100%; max-height: 330px; max-width: 86vw;
  object-fit: contain; object-position: 50% 100%; margin-bottom: -18px;
  filter: drop-shadow(0 16px 22px rgba(45, 38, 31, .2));
  transform-origin: 50% 100%; animation: start-mascot-breathe 3.6s ease-in-out infinite alternate;
}

.trailhead__bar {
  order: 1; position: relative; z-index: 2;
  display: flex; align-items: center; gap: 8px;
  padding: calc(var(--ui-safe-top) + 12px) 16px 0;
}
.trailhead__back, .trailhead__level, #start-overlay .run-language {
  height: 40px; border-radius: 999px; background: rgba(255, 250, 240, .92);
  border: 1px solid rgba(45, 38, 31, .08); box-shadow: 0 4px 14px rgba(45, 38, 31, .1);
}
.trailhead__back {
  display: inline-flex; align-items: center; gap: 4px; padding: 0 14px 0 8px;
  color: var(--ink); font: 800 13px/1 var(--sans); text-decoration: none;
}
.trailhead__back .ico { width: 20px; height: 20px; }
#start-overlay .run-language { display: flex; align-items: center; gap: 2px; padding: 3px; margin: 0; }
#start-overlay .run-language a {
  min-width: 38px; height: 32px; display: grid; place-items: center; border-radius: 999px;
  color: var(--ink2); font: 800 12px/1 var(--sans); text-decoration: none;
}
#start-overlay .run-language a[aria-current="true"] { background: var(--sage); color: #fff; }
.trailhead__level {
  margin-left: auto; display: grid; grid-template-columns: auto auto; align-items: center; column-gap: 8px;
  padding: 0 14px; font: 700 12px/1 var(--sans); color: var(--ink2);
}
.trailhead__level b { color: var(--terracotta); font-weight: 800; font-variant-numeric: tabular-nums; }
.trailhead__level div { grid-column: 1 / -1; height: 3px; margin-top: 4px; border-radius: 3px; background: rgba(45, 38, 31, .1); overflow: hidden; }
.trailhead__level i { display: block; height: 100%; background: var(--sage); transform-origin: left; }

.trailhead__title { order: 2; position: relative; z-index: 2; padding: 20px 22px 0; }
.trailhead__title h1 {
  font: 400 clamp(40px, 11.5vw, 54px)/.98 var(--serif); letter-spacing: -.02em; color: var(--ink);
  max-width: 8.5ch; text-wrap: balance; text-shadow: 0 1px 12px rgba(255, 250, 240, .55);
}
.trailhead__title .tagline {
  margin-top: 10px; font: 600 15px/1.4 var(--sans); color: var(--ink2);
  text-shadow: 0 1px 10px rgba(255, 250, 240, .7);
}
.trailhead__story { display: none; }

.trailhead__dock {
  order: 4; position: relative; z-index: 2; display: grid; gap: 10px;
  padding: 16px 16px calc(var(--ui-safe-bottom) + 14px);
  background: var(--card); border-radius: 28px 28px 0 0;
  box-shadow: 0 -12px 36px rgba(59, 45, 32, .12);
}

#btn-start {
  display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 12px;
  width: 100%; min-height: 66px; margin: 0; padding: 10px 10px 10px 20px; border-radius: 20px;
  background: var(--terracotta); color: #fff; text-align: left;
  box-shadow: 0 10px 24px rgba(143, 65, 35, .28), 0 2px 4px rgba(143, 65, 35, .2);
}
#btn-start > span { display: grid; gap: 3px; }
#btn-start b { font: 800 19px/1.15 var(--sans); }
#btn-start small { font: 600 12.5px/1.3 var(--sans); color: rgba(255, 255, 255, .84); }
#btn-start svg {
  width: 46px; height: 46px; padding: 12px; border-radius: 14px; background: rgba(255, 255, 255, .18);
  fill: none; stroke: #fff; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round;
}
#btn-start:hover:not(:disabled) { background: #a44f2e; }
#btn-start:disabled { opacity: .62; }

#challenge-banner {
  display: none; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 16px;
  background: var(--ui-gold); color: var(--ui-gold-ink); font: 700 13px/1.35 var(--sans);
}
#challenge-banner.on { display: flex; }
#challenge-banner b { font-weight: 800; }

.trailhead__row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
#btn-training {
  display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 10px; row-gap: 2px;
  align-content: center; min-height: 76px; padding: 12px 14px; margin: 0; border: 0; border-radius: 18px;
  background: var(--ui-sunk); color: var(--ink); text-align: left; cursor: pointer;
}
#btn-training .ico { grid-row: 1 / 3; align-self: center; color: var(--sage); width: 24px; height: 24px; }
#btn-training span { font: 800 15px/1.2 var(--sans); }
#btn-training small { font: 600 12px/1.2 var(--sans); color: var(--muted); }
#btn-training:hover:not(:disabled) { background: #e7ddcd; }
#btn-training:disabled { opacity: .6; }
#start-overlay .day-word { min-height: 76px; border-radius: 18px; padding: 10px 12px; }

.trailhead__controls { display: none; list-style: none; grid-template-columns: repeat(4, 1fr); gap: 6px; padding-top: 2px; }
html.mobile-input .trailhead__controls { display: grid; }
.trailhead__controls li { display: grid; justify-items: center; gap: 5px; text-align: center; font: 700 11px/1.2 var(--sans); color: var(--muted); }
.trailhead__controls .ico { width: 34px; height: 34px; padding: 7px; border-radius: 50%; background: var(--ui-sunk); color: var(--ink2); }
.trailhead__keys { margin: 0; text-align: center; font: 600 12px/1.4 var(--sans); color: var(--muted); }
html.mobile-input .trailhead__keys { display: none; }

/* Short phones: the mascot gives way before the actions do. */
@media (max-height: 700px) and (orientation: portrait) {
  .trailhead__title { padding-top: 12px; }
  .trailhead__title h1 { font-size: clamp(34px, 10vw, 44px); }
  .trailhead__title .tagline { font-size: 14px; margin-top: 6px; }
  #btn-start { min-height: 58px; }
  #btn-training, #start-overlay .day-word { min-height: 66px; }
}

/* Wide screens: the valley fills the window, the dock floats on the right. */
@media (min-width: 900px) and (min-height: 560px) {
  .trailhead__panorama { height: 100%; }
  .trailhead::after { top: auto; bottom: 0; height: 34%; background: linear-gradient(to bottom, rgba(243, 239, 231, 0), rgba(243, 239, 231, .9)); }
  .trailhead__bar { padding: 22px 36px 0; }
  .trailhead__title { padding: 44px 48px 0; max-width: 620px; }
  .trailhead__title h1 { font-size: clamp(64px, 6.4vw, 96px); max-width: 7ch; }
  .trailhead__title .tagline { font-size: 18px; }
  .trailhead__story { display: block; max-width: 40ch; margin-top: 16px; font: 500 15px/1.6 var(--sans); color: var(--ink2); text-shadow: 0 1px 10px rgba(255, 250, 240, .8); }
  .trailhead__scene { position: static; }
  .trailhead__mascot { position: absolute; left: 26%; bottom: 0; height: 58%; max-height: 560px; max-width: none; margin: 0; }
  .trailhead__dock {
    position: absolute; right: 40px; bottom: 40px; width: 400px;
    border-radius: 28px; padding: 20px; box-shadow: var(--ui-shadow);
  }
}

/* Landscape phones: title left, actions right, no mascot. */
@media (orientation: landscape) and (max-height: 500px) {
  .trailhead__panorama { height: 100%; }
  .trailhead::after { display: none; }
  .trailhead__scene { display: none; }
  .trailhead__bar { padding: calc(var(--ui-safe-top) + 10px) calc(env(safe-area-inset-right, 0px) + 16px) 0 calc(env(safe-area-inset-left, 0px) + 16px); }
  .trailhead__title { padding: 14px calc(env(safe-area-inset-left, 0px) + 20px) 0; max-width: 46%; }
  .trailhead__title h1 { font-size: 40px; }
  .trailhead__dock {
    position: absolute; right: calc(env(safe-area-inset-right, 0px) + 12px); bottom: 12px; top: 64px;
    width: min(380px, 48vw); overflow-y: auto; border-radius: 22px; padding: 12px; gap: 8px; align-content: start;
    box-shadow: var(--ui-shadow);
  }
  #btn-start { min-height: 54px; }
  #btn-training, #start-overlay .day-word { min-height: 60px; }
}

/* ───────────────────────── Results ───────────────────────── */

#over-overlay {
  display: block; padding: 0; background: var(--paper);
  backdrop-filter: none; -webkit-backdrop-filter: none;
}
.recap {
  height: 100%; max-width: 560px; margin: 0 auto; overflow-y: auto; overscroll-behavior: contain; touch-action: pan-y;
  display: flex; flex-direction: column; gap: 14px;
  padding: calc(var(--ui-safe-top) + 14px) 16px 0;
}

.recap > * { flex-shrink: 0; }
.recap__hero { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 6px; }
.recap__headline { grid-column: 1; grid-row: 1; padding-bottom: 18px; }
.recap__headline h1 { font: 400 clamp(30px, 8.6vw, 40px)/1.05 var(--serif); letter-spacing: -.015em; color: var(--ink); text-wrap: balance; }
.recap__badge {
  display: inline-flex; margin-top: 10px; padding: 6px 12px; border-radius: 999px;
  background: var(--ui-gold); color: var(--ui-gold-ink); font: 800 12px/1 var(--sans);
}
.recap__mascot { grid-column: 2; grid-row: 1; width: auto; height: 136px; margin-bottom: -22px; position: relative; z-index: 1; filter: drop-shadow(0 10px 16px rgba(45, 38, 31, .18)); }

.recap__words {
  position: relative; padding: 18px 18px 14px; border-radius: 24px;
  background: var(--ui-surface); border: 1px solid rgba(45, 38, 31, .07); box-shadow: var(--ui-shadow);
}
.recap__count { display: flex; align-items: center; gap: 14px; }
.recap__count > b { font: 400 56px/.9 var(--serif); color: var(--sage-dark); font-variant-numeric: tabular-nums; }
.recap__count > span { display: grid; gap: 4px; font: 800 16px/1.2 var(--sans); color: var(--ink); }
.recap__count small { font: 600 13px/1.3 var(--sans); color: var(--muted); }
.recap__count small b { color: var(--ink2); font-weight: 800; }
.recap__list { list-style: none; margin-top: 12px; }
.recap__list li {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; align-items: center; gap: 10px;
  min-height: 44px; padding: 6px 0; border-top: 1px solid rgba(45, 38, 31, .08);
}
.recap__list .ky { font: 400 18px/1.2 var(--serif); color: var(--ink); overflow-wrap: anywhere; }
.recap__list .ru { font: 600 14px/1.3 var(--sans); color: var(--ink2); text-align: right; overflow-wrap: anywhere; }
.recap__list i { display: inline-flex; align-items: center; gap: 4px; font-style: normal; color: var(--sage); }
.recap__list i svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.recap__list .tag { padding: 3px 8px 3px 5px; border-radius: 999px; background: #f6dfd2; color: #8f3f20; font: 800 11px/1 var(--sans); }
.recap__list .tag svg { width: 15px; height: 15px; stroke-width: 2.2; }
.recap__list .more { display: block; text-align: center; font: 700 13px/1 var(--sans); color: var(--muted); padding: 14px 0 4px; }
#learning-note { margin-top: 10px; font: 500 13px/1.45 var(--sans); color: var(--ink2); }

.recap__score {
  display: grid; grid-template-columns: auto auto 1fr; gap: 6px 22px; align-items: end;
  padding: 14px 18px; border-radius: 20px; background: var(--ui-sunk);
}
.recap__score span { display: block; font: 700 12px/1.2 var(--sans); color: var(--muted); }
.recap__score b { display: block; margin-top: 3px; font: 800 22px/1.1 var(--sans); color: var(--ink); font-variant-numeric: tabular-nums; }
.recap__xp { display: grid; grid-template-columns: 1fr auto; align-items: baseline; }
.recap__xp b { font-size: 14px; color: var(--terracotta); margin: 0; }
.recap__xp div { grid-column: 1 / -1; height: 5px; margin-top: 8px; border-radius: 5px; background: rgba(45, 38, 31, .1); overflow: hidden; }
.recap__xp i { display: block; height: 100%; background: var(--sage); transform-origin: left; }

.recap__share { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.native-webview .recap__share { grid-template-columns: 1fr; } /* в приложении нет картинки для сторис */
.recap__link {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 6px 10px;
  border: 0; border-radius: 14px; background: transparent; color: var(--ink2); font: 800 13.5px/1.2 var(--sans);
  text-align: left; cursor: pointer;
}
.recap__link:hover { background: var(--ui-sunk); color: var(--ink); }
.recap__link .ico { width: 20px; height: 20px; color: var(--terracotta); }

#over-overlay .day-word { border-radius: 20px; padding: 12px 14px; }

#duel-box { display: none; padding: 16px 18px; border-radius: 20px; background: var(--ui-surface); border: 1px solid rgba(45, 38, 31, .07); }
#duel-box.on { display: block; }
#duel-box h3 { font: 800 14px/1.2 var(--sans); color: var(--ink); margin-bottom: 10px; }
.duel-row { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; text-align: center; }
.duel-side b { display: block; font: 800 24px/1 var(--sans); font-variant-numeric: tabular-nums; }
.duel-side span { font: 600 12px/1.3 var(--sans); color: var(--muted); }
.duel-side.win b { color: var(--sage); }
.duel-vs { font: 800 12px/1 var(--sans); color: var(--muted); }
#duel-note { margin-top: 10px; font: 500 13px/1.4 var(--sans); color: var(--ink2); text-align: center; }

.recap__fold { border-radius: 20px; background: var(--ui-surface); border: 1px solid rgba(45, 38, 31, .07); }
.recap__fold summary {
  display: flex; align-items: center; justify-content: space-between; min-height: 52px; padding: 0 18px;
  list-style: none; cursor: pointer; font: 800 14px/1.2 var(--sans); color: var(--ink);
}
.recap__fold summary::-webkit-details-marker { display: none; }
.recap__fold summary::after {
  content: ''; width: 9px; height: 9px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted);
  transform: rotate(45deg) translateY(-3px); transition: transform .25s var(--ease);
}
.recap__fold[open] summary::after { transform: rotate(225deg) translate(-2px, -1px); }
#result-missions { display: grid; gap: 6px; padding: 0 12px 12px; }
#result-missions .mission {
  display: grid; grid-template-columns: 26px 1fr auto; align-items: center; gap: 10px;
  min-height: 46px; padding: 8px 10px; border-radius: 14px; background: var(--paper);
  font: 600 14px/1.3 var(--sans); color: var(--ink2);
}
#result-missions .mission i {
  width: 24px; height: 24px; border-radius: 50%; border: 2px solid rgba(45, 38, 31, .18);
  display: grid; place-items: center; font-style: normal;
}
#result-missions .mission b { font-weight: 800; color: var(--ink); font-variant-numeric: tabular-nums; }
#result-missions .mission.done { background: var(--ui-sage-soft); color: var(--sage-dark); }
#result-missions .mission.done i { border: 0; background: var(--sage); color: #fff; }
#result-missions .mission.done svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
#result-missions .mission.done b { color: var(--sage); }
.recap__stats { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 18px; padding: 2px 18px 18px; }
.recap__stats dt { font: 600 12px/1.3 var(--sans); color: var(--muted); }
.recap__stats dd { margin-top: 2px; font: 800 18px/1.2 var(--sans); color: var(--ink); font-variant-numeric: tabular-nums; }

/* The next action stays in reach without scrolling past the results. */
.recap__actions {
  position: sticky; bottom: 0; z-index: 3; display: grid; gap: 8px;
  margin: auto -16px 0; padding: 22px 16px calc(var(--ui-safe-bottom) + 14px);
  background: linear-gradient(to bottom, rgba(243, 239, 231, 0), var(--paper) 26px);
}
.recap__actions .btn { margin: 0; min-height: 54px; border-radius: 18px; display: grid; place-items: center; text-align: center; font: 800 16px/1.2 var(--sans); }
#btn-retry { order: -1; background: var(--terracotta); color: #fff; box-shadow: 0 10px 22px rgba(143, 65, 35, .26); }
#btn-retry:hover { background: #a44f2e; }
#btn-soz { min-height: 48px; background: var(--ui-sage-soft); color: var(--sage-dark); box-shadow: none; }
#btn-soz:hover { background: #d2e2db; }
/* In the app the learning result leads: review first, the run second. */
.native-webview #btn-soz { order: -2; min-height: 54px; background: var(--terracotta); color: #fff; box-shadow: 0 10px 22px rgba(143, 65, 35, .26); }
.native-webview #btn-retry { order: -1; min-height: 48px; background: var(--ui-sage-soft); color: var(--sage-dark); box-shadow: none; }

@media (orientation: landscape) and (max-height: 500px) {
  .recap { max-width: 640px; }
  .recap__mascot { height: 96px; }
}

/* ───────────────────────── Pause ───────────────────────── */

#pause-overlay .pause-sheet { max-width: 340px; padding: 26px 20px 16px; border-radius: 28px; }
.pause-sheet h1 { font: 400 34px/1.1 var(--serif); margin-bottom: 4px; }
.pause-sheet .tagline { margin-bottom: 18px; }
.pause-sheet #btn-resume { margin: 0; min-height: 56px; border-radius: 18px; background: var(--terracotta); color: #fff; }
.pause-sheet__row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 8px; }
.pause-sheet__row .btn { margin: 0; min-height: 48px; padding: 10px 8px; border-radius: 16px; font-size: 14px; line-height: 1.2; }
.pause-sheet__app { display: grid; gap: 6px; margin-top: 8px; }
.pause-sheet__app[hidden] { display: none; }
.pause-sheet__app .btn { margin: 0; min-height: 48px; border-radius: 16px; font-size: 14px; }
.pause-sheet__report { justify-self: center; padding: 10px 12px; min-height: 44px; font: 600 13px/1.5 var(--sans); color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }
.pause-sheet__help { margin-top: 12px; text-align: left; }
.pause-sheet__help summary {
  display: flex; justify-content: center; align-items: center; gap: 8px; min-height: 44px;
  list-style: none; cursor: pointer; font: 800 13px/1 var(--sans); color: var(--muted);
}
.pause-sheet__help summary::-webkit-details-marker { display: none; }
.pause-sheet__help summary::after { content: ''; width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg) translateY(-2px); }
.pause-sheet__help[open] summary::after { transform: rotate(225deg); }
.pause-sheet__help p { display: block; margin: 6px 0 0; font: 500 13px/1.5 var(--sans); color: var(--ink2); text-align: center; }

/* Second chance: the label reads as a badge, like the results badge. */
#revive-kicker {
  display: inline-flex; margin-bottom: 8px; padding: 6px 12px; border-radius: 999px;
  background: var(--ui-gold); color: var(--ui-gold-ink); font: 800 12px/1 var(--sans);
}

/* ───────────────────────── Play HUD ───────────────────────── */

#hud .hud-pill {
  min-height: 44px; border-radius: 15px; color: var(--ink);
  background: rgba(255, 250, 240, .94); border: 1px solid rgba(45, 38, 31, .08);
  box-shadow: 0 4px 14px rgba(45, 38, 31, .12);
}
#hearts { display: flex; align-items: center; gap: 3px; padding: 0 11px; }
#hearts .heart { width: 20px; height: 20px; fill: var(--terracotta); stroke: var(--terracotta); stroke-width: 1.2; stroke-linejoin: round; transition: fill .2s, stroke .2s, transform .2s var(--ease); }
#hearts .heart.lost { fill: transparent; stroke: rgba(45, 38, 31, .28); stroke-width: 1.8; transform: scale(.88); }
#btn-pause { display: grid; place-items: center; }
#btn-pause .ico { width: 20px; height: 20px; fill: var(--ink); stroke: none; }

#active-powers .power-chip { min-height: 32px; border-radius: 11px; border: 1px solid rgba(45, 38, 31, .08); box-shadow: 0 3px 10px rgba(45, 38, 31, .1); }
.power-chip .ico { width: 18px; height: 18px; fill: currentColor; stroke: none; }
#power-boost { color: #8f4123; }
/* Bonuses wrap before they slide under the route pill on the right. */
#active-powers { max-width: calc(100vw - 32px - var(--route-w, 140px)); }

#countdown {
  /* В верхней трети: в центре кадра на отсчёте стоит барс. */
  place-items: start center; padding-top: max(19vh, calc(env(safe-area-inset-top) + 120px));
  font: 400 clamp(110px, 32vw, 180px)/1 var(--serif); letter-spacing: -.02em; color: #fffaf0;
  text-shadow: 0 2px 4px rgba(45, 38, 31, .35), 0 14px 44px rgba(45, 38, 31, .45);
}
/* На практике сверху карточка подсказки — отсчёт уходит под неё. */
body.training #countdown { padding-top: max(32vh, calc(env(safe-area-inset-top) + 250px)); }

/* Очки всплывают над барсом и улетают вверх; счёт откликается толчком. */
#score-pops { position: fixed; inset: 0; z-index: 14; pointer-events: none; overflow: hidden; }
.score-pop {
  position: absolute; translate: -50% -50%;
  font: 800 22px/1 var(--sans); font-variant-numeric: tabular-nums; letter-spacing: -.02em;
  color: #fffaf0; -webkit-text-stroke: 4px rgba(45, 38, 31, .55); paint-order: stroke fill;
  animation: score-pop .9s cubic-bezier(.2, .8, .3, 1) forwards;
}
.score-pop--word { color: #f6e7b4; font-size: 26px; }
.score-pop--gold { color: #ffd257; font-size: 30px; -webkit-text-stroke-color: rgba(97, 54, 8, .7); }
@keyframes score-pop {
  0% { opacity: 0; transform: translateY(8px) scale(.6); }
  18% { opacity: 1; transform: translateY(-6px) scale(1.12); }
  32% { transform: translateY(-12px) scale(1); }
  100% { opacity: 0; transform: translateY(-64px) scale(.92); }
}
#score-pill.bump b { animation: score-bump .32s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes score-bump { 0% { transform: scale(1); } 35% { transform: scale(1.18); color: #c77d12; } 100% { transform: scale(1); } }
#score-pill b { display: inline-block; transform-origin: left center; }

@media (prefers-reduced-motion: reduce) {
  .trailhead__mascot, #score-pill.bump b { animation: none; }
  .score-pop { animation: score-pop-still .9s linear forwards; }
  @keyframes score-pop-still { 0%, 70% { opacity: 1; } 100% { opacity: 0; } }
}
