/* EnjoUI: the shared game UI's styles, built on brand.css (its variables and classes; load brand.css first).
   Works in both palettes: the page's root carries .enjo-light or .enjo-dark. Added to, never changing brand.css.
   Right to left (<html dir="rtl">, Arabic): every part mirrors, through logical properties (padding-inline,
   inset-inline-end, text-align: start; flex rows and the action bar's grid follow the direction by themselves) and
   [dir="rtl"] rules where they can't (the chevron, the switch's knob, the mock ad's corners). Not mirrored: icons that
   don't point a way (gear, heart, lamp), numbers, the coach's hand (it points at a spot of the game), the game. */

.enjo-light { --enjo-ui-highlight: var(--enjo-accentText); --enjo-ui-inkEdge: #0f0d0c; }
.enjo-dark { --enjo-ui-highlight: #ffbe2e; --enjo-ui-inkEdge: #bdada9; }
/* The ad's colour (the icon set's "grape" pair, the watch-ad icon's): the hint's ad badge. */
:root { --enjo-ui-ad: #9b6bf2; --enjo-ui-adEdge: #6a3fc0; }

/* The one layer over the game: lets taps through, except on the parts that take them. */
.enjo-ui {
  position: fixed;
  inset: 0;
  z-index: 5;
  pointer-events: none;
  font-family: var(--enjo-font);
  color: var(--enjo-ink);
  -webkit-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  --enjo-safe-top: 0px;
  --enjo-safe-right: 0px;
  --enjo-safe-bottom: 0px;
  --enjo-safe-left: 0px;
}
.enjo-ui em { font-style: normal; color: var(--enjo-ui-highlight); }
/* Korean wraps at its spaces, as Korean UIs do (by default the browser breaks between any two syllables). */
.enjo-ui:lang(ko), .enjo-ui :lang(ko) { word-break: keep-all; }
/* Japanese wraps between phrases where the browser can (Chrome: auto-phrase), not inside a word. */
.enjo-ui:lang(ja), .enjo-ui :lang(ja) { word-break: auto-phrase; }
.enjo-ui img { display: block; width: 100%; height: auto; }

/* ---- Bar (bar.js) ---- */
.enjo-ui-bar {
  position: absolute;
  top: calc(var(--enjo-safe-top) + 12px);
  left: calc(var(--enjo-safe-left) + 14px);
  right: calc(var(--enjo-safe-right) + 14px);
  display: flex;
  align-items: center;
  gap: 10px;
}
/* The level card: a status card like the counter beside it (the same surface, edge, radius and height), not a button
   (the owner, 2026-10-14): its caption and number on one line. */
.enjo-ui-bar__stat {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 32px;
  padding: 9px 16px;
  border-radius: var(--enjo-radius-button);
  background: var(--enjo-surf);
  color: var(--enjo-ink);
  box-shadow: 0 4px 0 var(--enjo-surfSh);
}
.enjo-ui-bar__label { font: 600 13px var(--enjo-font); letter-spacing: 0.08em; text-transform: uppercase; color: var(--enjo-mute); }
/* Scripts whose letters join or stack (Arabic, Devanagari): no spacing between letters (it would break them apart). */
.enjo-ui-bar__label:lang(ar), .enjo-ui-bar__label:lang(hi) { letter-spacing: 0; }
.enjo-ui-bar__value { font: 700 24px/1 var(--enjo-font); }
.enjo-ui-bar__value.is-popping { animation: enjo-ui-pop 360ms cubic-bezier(.3, 1.6, .5, 1); }
.enjo-ui-bar__space { flex: 1; }
.enjo-ui-bar__counter {
  display: flex;
  gap: 4px;
  padding: 9px 12px;
  border-radius: var(--enjo-radius-button);
  background: var(--enjo-surf);
  box-shadow: 0 4px 0 var(--enjo-surfSh);
}
.enjo-ui-bar__slot { position: relative; width: 32px; height: 32px; }
.enjo-ui-bar__slot img { position: absolute; inset: 0; transition: opacity 200ms, transform 200ms; }
.enjo-ui-bar__lost { opacity: 0; filter: grayscale(1); }
.enjo-ui-bar__slot.is-lost .enjo-ui-bar__full { opacity: 0; transform: scale(1.4); }
.enjo-ui-bar__slot.is-lost .enjo-ui-bar__lost { opacity: 0.5; }
.enjo-ui-bar__slot.is-shaking { animation: enjo-ui-shake 420ms; }
.enjo-ui-bar__actions { display: flex; gap: 10px; pointer-events: auto; }
.enjo-ui-bar__actions:empty { display: none; }
/* A square button at the bar's right end (the settings gear): the status cards' height (50px) and edge. */
.enjo-ui-bar__actions .enjo-ui-square { width: 50px; height: 50px; }
/* The counter and the gear keep their size; the level card gives way first (a long caption ends in "…"). */
.enjo-ui-bar__counter, .enjo-ui-bar__actions { flex: none; }
.enjo-ui-bar__stat { min-width: 0; }
.enjo-ui-bar__label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.enjo-ui-bar__value { flex: none; }
/* Narrow phones (320 to 389px): everything a little tighter, so the level, the hearts and the gear fit on one line,
   with room for the longest caption of our languages ("Уровень", 66px) beside a four-digit level (2629) at 320px. */
@media (max-width: 389px) {
  .enjo-ui-bar { left: calc(var(--enjo-safe-left) + 10px); right: calc(var(--enjo-safe-right) + 10px); gap: 5px; }
  .enjo-ui-bar__stat { padding: 9px 10px; gap: 5px; }
  .enjo-ui-bar__value { font-size: 22px; }
  .enjo-ui-bar__counter { padding: 13px 8px; gap: 2px; }
  .enjo-ui-bar__slot { width: 24px; height: 24px; }
}
/* Common phones (390 to 409px: iPhone 12 to 16, many Androids): the full sizes, the gaps and the level card's sides
   a little tighter, so "Уровень" beside a four-digit level isn't cut either (it was at 390px: the review, Loopaway,
   2026-10-15). */
@media (min-width: 390px) and (max-width: 409px) {
  .enjo-ui-bar { gap: 6px; }
  .enjo-ui-bar__stat { padding-inline: 12px; }
}

/* The coin card (bar.js's coins, the systems step): a status card of the hearts' kind (the surface, the solid edge,
   the radius), the coin and the number; pressable (it opens the game's skins screen). On the one row, between the
   hearts and the gear (the owner, 2026-10-16: not on a second row); to make room the level card stacks its number
   over its caption, smaller, in the cards' 50px (no taller than the others). */
.enjo-ui-bar__coins {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: none;
  height: 50px;
  padding-block: 0;
  padding-inline: 9px 14px;
  box-sizing: border-box;
  border: 0;
  border-radius: var(--enjo-radius-button);
  background: var(--enjo-surf);
  color: var(--enjo-ink);
  box-shadow: 0 4px 0 var(--enjo-surfSh);
  font: 700 22px/1 var(--enjo-font);
  cursor: pointer;
  pointer-events: auto;
  transition: transform 80ms, box-shadow 80ms;
}
.enjo-ui-bar__coins:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--enjo-surfSh); }
.enjo-ui-bar__coins.is-popping { animation: enjo-ui-pop 360ms cubic-bezier(.3, 1.6, .5, 1); }
.enjo-ui .enjo-ui-bar__coin { width: 30px; flex: none; }
.enjo-ui-bar__coinValue { direction: ltr; unicode-bidi: isolate; min-width: 1ch; }
.enjo-ui-bar.has-coins .enjo-ui-bar__space { display: none; }
.enjo-ui-bar.has-coins .enjo-ui-bar__stat {
  flex-direction: column;
  justify-content: center;
  gap: 2px;
  height: 50px;
  min-height: 0;
  box-sizing: border-box;
  padding: 0 12px;
  margin-inline-end: auto;
}
.enjo-ui-bar.has-coins .enjo-ui-bar__value { order: -1; font-size: 21px; }
.enjo-ui-bar.has-coins .enjo-ui-bar__label { max-width: 100%; font-size: 10px; line-height: 1.1; letter-spacing: 0.06em; }
/* Phones (up to 479px): the hearts and the coins a little smaller, so the longest caption ("Уровень") isn't cut. */
@media (max-width: 479px) {
  .enjo-ui-bar.has-coins .enjo-ui-bar__counter { padding: 12px 8px; gap: 2px; }
  .enjo-ui-bar.has-coins .enjo-ui-bar__slot { width: 26px; height: 26px; }
  .enjo-ui-bar__coins { gap: 4px; padding-inline: 8px 12px; font-size: 20px; }
  .enjo-ui .enjo-ui-bar__coin { width: 26px; }
}
/* Narrow phones (320 to 389px): the four cards and the gear on one line at 320px, "Уровень" over 2629 and 9999
   coins: everything a little smaller and tighter. */
@media (max-width: 389px) {
  .enjo-ui-bar.has-coins .enjo-ui-bar__stat { padding: 0 7px; }
  .enjo-ui-bar.has-coins .enjo-ui-bar__value { font-size: 18px; }
  .enjo-ui-bar.has-coins .enjo-ui-bar__label { font-size: 9px; letter-spacing: 0.02em; }
  .enjo-ui-bar.has-coins .enjo-ui-bar__counter { padding: 13px 6px; gap: 0; }
  .enjo-ui-bar.has-coins .enjo-ui-bar__slot { width: 24px; height: 24px; }
  .enjo-ui-bar__coins { gap: 3px; padding-inline: 6px 9px; font-size: 18px; }
  .enjo-ui .enjo-ui-bar__coin { width: 24px; }
}

/* ---- Bottom action bar (actions.js): the buttons, at the thumb's reach, above the safe area's bottom ---- */
.enjo-ui-actions {
  position: absolute;
  bottom: calc(var(--enjo-safe-bottom) + 16px);
  left: calc(var(--enjo-safe-left) + 14px);
  right: calc(var(--enjo-safe-right) + 14px);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: end;
  gap: 10px;
}
.enjo-ui-actions__side { display: flex; align-items: flex-end; gap: 10px; pointer-events: auto; }
.enjo-ui-actions__left { justify-self: start; }
.enjo-ui-actions__center { justify-self: center; }
.enjo-ui-actions__right { justify-self: end; }


/* ---- Dialogs (won.js, lost.js, revive.js, settings.js) ---- */
.enjo-ui-modal {
  position: absolute;
  inset: 0;
  z-index: 10;
  display: grid;
  place-items: center;
  pointer-events: auto;
  transition: opacity 200ms;
}
.enjo-ui-modal.is-leaving { opacity: 0; pointer-events: none; }
.enjo-ui-scrim { position: absolute; inset: 0; background: var(--enjo-scrim); animation: enjo-ui-fade 250ms both; }
.enjo-ui-dialog {
  position: relative;
  width: min(330px, calc(100vw - 40px));
  box-sizing: border-box;
  padding: 58px 24px 26px;
  margin-top: 40px;
  border-radius: var(--enjo-radius-dialog);
  background: var(--enjo-surf);
  box-shadow: 0 6px 0 var(--enjo-surfSh);
  text-align: center;
  animation: enjo-ui-spring 520ms cubic-bezier(.3, 1.5, .5, 1) both;
}
.enjo-ui-dialog__icon {
  position: absolute;
  left: 50%;
  top: -46px;
  width: 92px;
  height: 92px;
  margin-left: -46px;
  padding: 6px;
  box-sizing: border-box;
  border-radius: 50%;
  background: var(--enjo-surf);
  box-shadow: 0 6px 0 var(--enjo-surfSh);
}
.enjo-ui-dialog__icon--bounce img { animation: enjo-ui-bounce 900ms 250ms cubic-bezier(.3, 1.6, .5, 1) both; }
.enjo-ui-dialog__icon--shake img { animation: enjo-ui-shake 500ms 350ms both; }
.enjo-ui-dialog__title { font: 700 28px/1.1 var(--enjo-font); color: var(--enjo-ink); }
.enjo-ui-dialog__text { font: 500 16px/1.35 var(--enjo-font); color: var(--enjo-mute); margin-top: 8px; }
/* Texts on several lines never end on one lone word (where the browser has it: Chrome). */
.enjo-ui-dialog__title, .enjo-ui-dialog__text, .enjo-ui-coach__card { text-wrap: pretty; }
.enjo-ui-dialog__button { display: block; width: 100%; margin-top: 24px; }
/* The ad offer (skip, x3): the ink colour (the brand's "watch an ad"), with the orange button's size, radius, solid
   edge and press, so the two read as one pair. */
.enjo-ui-dialog__offer {
  display: block;
  width: 100%;
  margin-top: 22px;
  font: 700 20px var(--enjo-font);
  padding: 15px;
  border-radius: var(--enjo-radius-buttonLarge);
  box-shadow: 0 6px 0 var(--enjo-ui-inkEdge);
  transition: transform 80ms, box-shadow 80ms;
}
.enjo-ui-dialog__offer:active { transform: translateY(3px); box-shadow: 0 3px 0 var(--enjo-ui-inkEdge); }
.enjo-ui-dialog__offer + .enjo-ui-dialog__button { margin-top: 16px; }
.enjo-ui-dialog__decline { display: block; margin: 14px auto -6px; }
.enjo-ui-btn-icon { display: inline-block !important; width: 1.5em !important; height: 1.5em !important; margin-block: -0.3em -0.35em; margin-inline: 0 0.4em; vertical-align: middle; }
.enjo-ui-modal.is-busy button { opacity: 0.6; pointer-events: none; }
/* The ad-ready rule (core.js's ready, the monetize step): while the platform is asked for an ad, every button is
   locked (the colours kept, a little faded) and the ad's button shows the loading mark in place of its icon. */
.enjo-ui-modal.is-asking button { opacity: 0.75; pointer-events: none; }
.enjo-ui-spinner {
  display: none;
  box-sizing: border-box;
  width: 1.2em;
  height: 1.2em;
  margin-block: -0.2em -0.2em;
  margin-inline: 0.15em 0.55em;
  vertical-align: middle;
  border: 0.18em solid currentColor;
  border-inline-end-color: transparent;
  border-radius: 50%;
  animation: enjo-ui-spin 700ms linear infinite;
}
.enjo-ui-modal.is-asking .enjo-ui-spinner { display: inline-block; }
.enjo-ui .enjo-ui-modal.is-asking .enjo-ui-spinner + .enjo-ui-btn-icon { display: none !important; }
/* Narrow phones (320 to 389px): the dialog a little wider and its buttons' sides tighter, so a long button ("Skip to
   the next level", "Level überspringen", "Пропустить уровень") stays on one line, the same height as the orange one
   beside it (the review, Loopaway, 2026-10-15). */
@media (max-width: 389px) {
  .enjo-ui-dialog { width: calc(100vw - 24px); padding-inline: 18px; }
  .enjo-ui-dialog__button, .enjo-ui-dialog__offer { padding-inline: 10px; }
}

/* Two offers side by side (core.js's coinOffer, an offer paid in coins, beside the ad's offer; never the skip, by an ad
   only: the owner, 2026-10-16): twins in height, radius and edge, a little smaller text so a short word, the icon and a
   price fit; one alone: the full width. */
.enjo-ui-dialog__offers { display: flex; gap: 10px; margin-top: 22px; }
.enjo-ui-dialog__offers .enjo-ui-dialog__offer { flex: 1 1 0; min-width: 0; margin-top: 0; padding-inline: 8px; font-size: 18px; white-space: nowrap; }
.enjo-ui-dialog__offers + .enjo-ui-dialog__button { margin-top: 16px; }
.enjo-ui-dialog__price { display: inline-flex; align-items: center; margin-inline-start: 0.45em; direction: ltr; unicode-bidi: isolate; }
.enjo-ui-dialog__price .enjo-ui-btn-icon { margin-inline: 0 0.15em !important; width: 1.3em !important; height: 1.3em !important; }
.enjo-ui-dialog__pay.is-locked { opacity: 0.45; }
.enjo-ui-dialog__pay.is-nudging { animation: enjo-ui-shake 420ms; }

/* ---- Won's reward (won.js) ---- */
.enjo-ui-reward {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
  padding-block: 6px;
  padding-inline: 8px 18px;
  border-radius: var(--enjo-radius-pill);
  background: var(--enjo-bg);
  box-shadow: 0 3px 0 var(--enjo-surfSh);
  font: 700 22px var(--enjo-font);
  color: var(--enjo-ink);
}
.enjo-ui-reward img { width: 32px; }
.enjo-ui-reward__amount { direction: ltr; unicode-bidi: isolate; } /* "+12" stays "+12" in a right-to-left page */
.enjo-ui-reward.is-tripled { animation: enjo-ui-pop 420ms cubic-bezier(.3, 1.6, .5, 1); }

/* ---- Hint button (hint.js), and the square buttons beside it (settings.js: the gear) ---- */
.enjo-ui-hint, .enjo-ui-square {
  position: relative;
  width: 52px;
  height: 52px;
  padding: 7px;
  border: 0;
  border-radius: var(--enjo-radius-button);
  background: var(--enjo-surf);
  box-shadow: 0 4px 0 var(--enjo-surfSh);
  cursor: pointer;
  pointer-events: auto;
  transition: transform 80ms, box-shadow 80ms;
}
.enjo-ui-hint:active, .enjo-ui-square:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--enjo-surfSh); }
.enjo-ui-hint__badge {
  position: absolute;
  top: -7px;
  inset-inline-end: -7px;
  min-width: 24px;
  height: 24px;
  padding: 0 6px;
  box-sizing: border-box;
  border-radius: 12px;
  background: var(--enjo-primary);
  box-shadow: 0 2px 0 var(--enjo-primaryEdge);
  color: var(--enjo-onPrimary);
  font: 700 14px/24px var(--enjo-font);
}
.enjo-ui-hint__badge.is-popping { animation: enjo-ui-pop 360ms cubic-bezier(.3, 1.6, .5, 1); }
.enjo-ui .enjo-ui-hint__ad { display: none; width: 18px; margin: 3px -3px; }
/* None left: the same round badge in the ad's purple, a white play arrow in it. */
.enjo-ui-hint.is-empty .enjo-ui-hint__badge { background: var(--enjo-ui-ad); box-shadow: 0 2px 0 var(--enjo-ui-adEdge); }
.enjo-ui-hint.is-empty .enjo-ui-hint__count { display: none; }
.enjo-ui .enjo-ui-hint.is-empty .enjo-ui-hint__ad { display: block; }
/* The ad badge asking for an ad (hint.js's setAd, the monetize step): the loading mark in the purple badge, locked;
   no ad: the whole button greyed (the badge the disabled grey), locked, until one comes. */
.enjo-ui-hint__badge .enjo-ui-spinner { width: 14px; height: 14px; margin: 5px -1px; border-width: 2px; }
.enjo-ui .enjo-ui-hint.is-empty.is-asking .enjo-ui-hint__ad { display: none; }
.enjo-ui-hint.is-empty.is-asking .enjo-ui-spinner { display: block; }
.enjo-ui-hint.is-empty.is-asking, .enjo-ui-hint.is-empty.is-noad { cursor: default; }
.enjo-ui-hint.is-empty.is-asking:active, .enjo-ui-hint.is-empty.is-noad:active { transform: none; box-shadow: 0 4px 0 var(--enjo-surfSh); }
.enjo-ui-hint.is-empty.is-noad .enjo-ui-hint__icon { filter: grayscale(1); opacity: 0.45; }
.enjo-ui-hint.is-empty.is-noad .enjo-ui-hint__badge { background: var(--enjo-disabled); box-shadow: 0 2px 0 rgba(0, 0, 0, 0.18); }

/* At 0 with a price (hint.js's setPrice, the systems step): the same round 3D badge in the ink colours, as an ink offer
   button: white on a dark game, a small coin and the price; the press buys one. The armed button (setOn: a power-up waiting for its target) wears a ring in the
   highlight colour; nudge() shakes it (pressed when it can't help now). The price's padding is logical (4 px on the
   coin's side, 7 on the number's), so in Arabic the number ends over the button's left edge, as it does over its right
   edge in English (a physical one put it 3 px past the button: the games' PLAN.md, §9). */
.enjo-ui-hint__price { display: none; align-items: center; gap: 2px; }
.enjo-ui .enjo-ui-hint__coin { width: 16px; }
.enjo-ui-hint.is-empty.is-priced .enjo-ui-hint__badge { background: var(--enjo-ink); box-shadow: 0 2px 0 var(--enjo-ui-inkEdge); color: var(--enjo-bg); padding-inline: 4px 7px; }
.enjo-ui .enjo-ui-hint.is-empty.is-priced .enjo-ui-hint__ad, .enjo-ui .enjo-ui-hint.is-empty.is-priced .enjo-ui-spinner { display: none; }
.enjo-ui-hint.is-empty.is-priced .enjo-ui-hint__price { display: flex; }
.enjo-ui-hint.is-empty.is-priced .enjo-ui-hint__icon { filter: none; opacity: 1; }
.enjo-ui-hint.is-empty.is-priced { cursor: pointer; }
.enjo-ui-hint.is-empty.is-priced:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--enjo-surfSh); }
.enjo-ui-hint.is-on { box-shadow: 0 4px 0 var(--enjo-surfSh), 0 0 0 4px var(--enjo-ui-highlight); animation: enjo-ui-armed 900ms ease-in-out infinite alternate; }
.enjo-ui-hint.is-nudging { animation: enjo-ui-shake 420ms; }
@keyframes enjo-ui-armed { to { transform: translateY(-3px); } }

/* ---- Settings (settings.js): the brand's dialog with rows; the switch as on the brand's pause sheet ---- */
.enjo-ui-settings { padding-bottom: 14px; }
.enjo-ui-settings__rows { display: flex; flex-direction: column; gap: 10px; margin-top: 20px; text-align: start; }
.enjo-ui-settings__row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 56px;
  padding-block: 8px;
  padding-inline: 10px 12px;
  box-sizing: border-box;
  border: 0;
  border-radius: var(--enjo-radius-button);
  background: var(--enjo-bg);
  color: var(--enjo-ink);
  font: 600 17px var(--enjo-font);
  text-align: start;
  cursor: pointer;
}
.enjo-ui .enjo-ui-settings__icon { width: 36px; flex: none; transition: filter 150ms, opacity 150ms; }
.enjo-ui-settings__row.is-off .enjo-ui-settings__icon { filter: grayscale(1); opacity: 0.55; }
.enjo-ui-settings__label { flex: 1; }
.enjo-ui-settings__value { font: 600 16px var(--enjo-font); color: var(--enjo-mute); }
.enjo-ui-settings__chevron {
  flex: none; /* never squeezed by a long label and value (it shrank to a stroke at 320px) */
  width: 9px;
  height: 9px;
  margin-inline: 2px 6px;
  border: solid var(--enjo-mute);
  border-width: 0 3px 3px 0;
  border-radius: 2px;
  transform: rotate(-45deg);
}
[dir="rtl"] .enjo-ui-settings__chevron { transform: rotate(135deg); } /* pointing left, the way the list opens */
/* Narrow phones (320 to 389px): a tighter row, so "Language English" or "Idioma Português" fits beside the chevron. */
@media (max-width: 389px) {
  .enjo-ui-settings__row { gap: 8px; }
}
/* The picker (settings.js: a choice row's list): its own dialog over the settings, the list scrolling when long. */
.enjo-ui-modal--picker { z-index: 11; }
.enjo-ui-modal--clear > .enjo-ui-scrim { background: none; }
.enjo-ui-settings { transition: opacity 150ms, transform 150ms; }
.enjo-ui-modal--settings.is-picking .enjo-ui-settings { opacity: 0; transform: scale(0.94); pointer-events: none; }
.enjo-ui-picker { padding-bottom: 18px; }
.enjo-ui-picker__list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: min(52vh, 420px);
  margin: 18px -10px 0;
  padding: 0 10px;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  text-align: start;
}
.enjo-ui-picker__list.is-more {
  -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - 30px), transparent);
  mask-image: linear-gradient(to bottom, #000 calc(100% - 30px), transparent);
}
/* Scrolled down (the chosen language far in the list): the top fades the same way, so the item half under the title
   never shows cut sharp (the review, Loopaway, 2026-10-15). */
.enjo-ui-picker__list.is-above {
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 30px);
  mask-image: linear-gradient(to bottom, transparent, #000 30px);
}
.enjo-ui-picker__list.is-above.is-more {
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 30px, #000 calc(100% - 30px), transparent);
  mask-image: linear-gradient(to bottom, transparent, #000 30px, #000 calc(100% - 30px), transparent);
}
.enjo-ui-picker__item {
  position: relative;
  flex: none;
  min-height: 52px;
  padding-block: 12px;
  padding-inline: 18px 48px;
  border: 0;
  border-radius: var(--enjo-radius-button);
  background: none;
  color: var(--enjo-ink);
  font: 500 17px var(--enjo-font);
  text-align: start;
  cursor: pointer;
}
.enjo-ui-picker__item:active { background: var(--enjo-bg); }
.enjo-ui-picker__item.is-chosen { background: var(--enjo-bg); font-weight: 600; }
.enjo-ui-picker__item.is-chosen::after {
  content: "";
  position: absolute;
  inset-inline-end: 22px;
  top: 50%;
  width: 7px;
  height: 14px;
  margin-top: -10px;
  border: solid var(--enjo-primary);
  border-width: 0 3px 3px 0;
  border-radius: 1px;
  transform: rotate(45deg);
}
/* The switch: orange with its white knob on the right when on, the disabled grey with the knob on the left when off. */
.enjo-ui-switch {
  position: relative;
  flex: none;
  width: 52px;
  height: 30px;
  border-radius: 15px;
  background: var(--enjo-disabled);
  transition: background 150ms;
}
.enjo-ui-settings__row.is-on .enjo-ui-switch { background: var(--enjo-primary); }
.enjo-ui-switch__knob {
  position: absolute;
  top: 3px;
  inset-inline-start: 3px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.18);
  transition: transform 150ms cubic-bezier(.3, 1.4, .5, 1);
}
.enjo-ui-settings__row.is-on .enjo-ui-switch__knob { transform: translateX(22px); }
[dir="rtl"] .enjo-ui-settings__row.is-on .enjo-ui-switch__knob { transform: translateX(-22px); } /* on: the knob at the end */
.enjo-ui-settings__links { display: flex; justify-content: center; flex-wrap: wrap; gap: 4px 18px; margin-top: 14px; }
.enjo-ui-settings__link { font-size: 15px; text-decoration: underline; text-underline-offset: 3px; }

/* ---- Skins (skins.js): the brand's shop screen in a dialog: the coins in a pill, the skins in a 2-column grid ---- */
.enjo-ui-modal--skins .enjo-ui-dialog { padding-bottom: 22px; }
.enjo-ui-skins__coins { margin-top: 12px; font-size: 20px; padding-block: 4px; }
.enjo-ui-skins__coins img { width: 28px; }
.enjo-ui-skins__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  max-height: min(48vh, 440px, calc(100vh - 340px)); /* a short phone (568px): the dialog, its badge too, stays on screen */
  margin: 16px -12px 0;
  padding: 4px 12px 8px;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}
.enjo-ui-skins__grid.is-more { -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - 30px), transparent); mask-image: linear-gradient(to bottom, #000 calc(100% - 30px), transparent); }
.enjo-ui-skins__grid.is-above { -webkit-mask-image: linear-gradient(to bottom, transparent, #000 30px); mask-image: linear-gradient(to bottom, transparent, #000 30px); }
.enjo-ui-skins__grid.is-above.is-more {
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 30px, #000 calc(100% - 30px), transparent);
  mask-image: linear-gradient(to bottom, transparent, #000 30px, #000 calc(100% - 30px), transparent);
}
.enjo-ui-skin {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 10px 8px 10px;
  border: 0;
  border-radius: var(--enjo-radius-button);
  background: var(--enjo-bg);
  box-shadow: 0 4px 0 var(--enjo-surfSh);
  color: var(--enjo-ink);
  font-family: var(--enjo-font);
  cursor: pointer;
  transition: transform 80ms, box-shadow 80ms;
}
.enjo-ui-skin:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--enjo-surfSh); }
.enjo-ui-skin.is-worn { box-shadow: 0 4px 0 var(--enjo-surfSh), inset 0 0 0 3px var(--enjo-primary); }
.enjo-ui-skin.is-nudging { animation: enjo-ui-shake 420ms; }
.enjo-ui-skin__look { width: 100%; height: 64px; display: grid; place-items: center; }
.enjo-ui-skin__look svg, .enjo-ui-skin__look img { height: 64px; width: auto; }
.enjo-ui-skin__name { font: 600 16px/1.2 var(--enjo-font); }
.enjo-ui-skin__foot { min-height: 26px; display: flex; align-items: center; justify-content: center; }
.enjo-ui-skin__chip { padding: 3px 10px; border-radius: var(--enjo-radius-chip); background: var(--enjo-primary); color: var(--enjo-onPrimary); font: 700 13px var(--enjo-font); }
.enjo-ui-skin__wear { font: 600 15px var(--enjo-font); color: var(--enjo-mute); }
.enjo-ui-skin__price { display: flex; align-items: center; gap: 4px; font: 700 17px var(--enjo-font); direction: ltr; }
.enjo-ui .enjo-ui-skin__price img { width: 22px; }
.enjo-ui-skin.is-short .enjo-ui-skin__price { color: var(--enjo-mute); }
.enjo-ui-skin.is-short .enjo-ui-skin__look, .enjo-ui-skin.is-locked .enjo-ui-skin__look { opacity: 0.55; }
.enjo-ui-skin__won { display: flex; align-items: center; gap: 4px; font: 600 13px/1.15 var(--enjo-font); color: var(--enjo-mute); text-align: start; }
.enjo-ui .enjo-ui-skin__won img { width: 20px; flex: none; }

/* ---- Daily gift (daily.js): the brand's daily rewards screen in a dialog; today ringed in the primary orange ---- */
.enjo-ui-daily { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 16px; }
.enjo-ui-daily__day {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 8px 4px 9px;
  border-radius: var(--enjo-radius-button);
  background: var(--enjo-bg);
  box-shadow: 0 4px 0 var(--enjo-surfSh);
}
.enjo-ui-daily__day--big { grid-column: 1 / -1; flex-direction: row; justify-content: center; gap: 14px; padding-block: 10px; }
.enjo-ui-daily__label { font: 600 13px var(--enjo-font); color: var(--enjo-mute); }
.enjo-ui-daily__gift { display: flex; align-items: center; gap: 4px; font: 700 18px var(--enjo-font); direction: ltr; }
.enjo-ui .enjo-ui-daily__icon { width: 26px; }
.enjo-ui-daily__day--big .enjo-ui-daily__icon { width: 34px; }
.enjo-ui-daily__day--big .enjo-ui-daily__gift { font-size: 22px; }
.enjo-ui-daily__extra { display: flex; align-items: center; gap: 1px; margin-inline-start: 6px; font-size: 15px; }
.enjo-ui .enjo-ui-daily__extra img { width: 26px; }
.enjo-ui-daily__day.is-past { opacity: 0.55; }
/* Today: marked, not pressable (the owner, 2026-10-16: filled orange with its edge, it read as a button): the card
   as the others, ringed in the primary orange, its caption in it, a soft glow breathing round it. */
.enjo-ui-daily__day.is-today {
  box-shadow: inset 0 0 0 3px var(--enjo-primary), 0 4px 0 var(--enjo-surfSh);
  animation: enjo-ui-daily-glow 1.8s ease-in-out infinite;
}
.enjo-ui-daily__day.is-today .enjo-ui-daily__label { color: var(--enjo-primary); font-weight: 700; }
@keyframes enjo-ui-daily-glow {
  50% { box-shadow: inset 0 0 0 3px var(--enjo-primary), 0 4px 0 var(--enjo-surfSh), 0 0 0 5px color-mix(in srgb, var(--enjo-primary) 22%, transparent); }
}
.enjo-ui-daily__day.is-tripled { animation: enjo-ui-pop 420ms cubic-bezier(.3, 1.6, .5, 1); }
.enjo-ui-daily__day.is-today.is-tripled { animation: enjo-ui-pop 420ms cubic-bezier(.3, 1.6, .5, 1), enjo-ui-daily-glow 1.8s ease-in-out 420ms infinite; }

/* Short screens (up to 640px high: an iPhone SE, 568px): the daily gift's cells and gaps tighter, so the whole dialog,
   its badge too, stays on screen. */
@media (max-height: 640px) {
  .enjo-ui-daily { margin-top: 10px; gap: 6px; }
  .enjo-ui-daily__day { padding: 4px 4px 5px; }
  .enjo-ui-daily__day--big { padding-block: 6px; }
  .enjo-ui-modal--daily .enjo-ui-dialog { padding-top: 52px; padding-bottom: 20px; }
  .enjo-ui-modal--daily .enjo-ui-dialog__offer { margin-top: 14px; }
  .enjo-ui-modal--daily .enjo-ui-dialog__offer + .enjo-ui-dialog__button { margin-top: 12px; }
}

/* ---- Chest (chest.js): the chest opens in the dialog's badge, its items pop out one by one ---- */
.enjo-ui-dialog__icon.is-open img { animation: enjo-ui-bounce 520ms cubic-bezier(.3, 1.6, .5, 1) both; }
.enjo-ui-chest { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.enjo-ui-chest__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  min-width: 76px;
  padding: 8px 10px 9px;
  box-sizing: border-box;
  border-radius: var(--enjo-radius-button);
  background: var(--enjo-bg);
  box-shadow: 0 4px 0 var(--enjo-surfSh);
  opacity: 0;
  transform: scale(0.3);
}
.enjo-ui-chest__item.is-out { animation: enjo-ui-chest-out 480ms cubic-bezier(.3, 1.6, .5, 1) both; }
.enjo-ui-chest__item.is-out.is-tripled { animation: enjo-ui-pop 420ms cubic-bezier(.3, 1.6, .5, 1) both; opacity: 1; transform: none; }
.enjo-ui .enjo-ui-chest__look img { width: 40px; }
.enjo-ui-chest__look svg { height: 44px; width: auto; display: block; }
.enjo-ui-chest__text { font: 700 17px var(--enjo-font); direction: ltr; unicode-bidi: isolate; }
.enjo-ui-chest__item--look .enjo-ui-chest__text { direction: inherit; font-weight: 600; font-size: 15px; }
@keyframes enjo-ui-chest-out { from { opacity: 0; transform: translateY(-40px) scale(0.3); } to { opacity: 1; transform: none; } }

/* ---- Mock ad (mock-ad.js): our stand-in, above everything ---- */
.enjo-ui-ad {
  position: absolute;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  pointer-events: auto;
  background: #170c09;
  color: #fff;
  animation: enjo-ui-fade 200ms both;
  transition: opacity 200ms;
}
.enjo-ui-ad.is-leaving { opacity: 0; }
[dir="rtl"] .enjo-ui-ad__chip { left: auto; right: calc(var(--enjo-safe-right) + 16px); }
[dir="rtl"] .enjo-ui-ad__close { right: auto; left: calc(var(--enjo-safe-left) + 14px); }
.enjo-ui-ad__chip {
  position: absolute;
  top: calc(var(--enjo-safe-top) + 16px);
  left: calc(var(--enjo-safe-left) + 16px);
  padding: 5px 12px;
  border-radius: var(--enjo-radius-chip);
  background: #ffbe2e;
  color: #2a2622;
  font: 700 13px var(--enjo-font);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.enjo-ui-ad__close {
  position: absolute;
  top: calc(var(--enjo-safe-top) + 10px);
  right: calc(var(--enjo-safe-right) + 14px);
  display: grid;
  place-items: center;
  background: #3b2824;
  color: #fff;
  box-shadow: 0 4px 0 #000;
  cursor: pointer;
}
.enjo-ui-ad__close svg { display: block; }
.enjo-ui-ad__card { width: min(320px, calc(100vw - 48px)); text-align: center; }
.enjo-ui .enjo-ui-ad__picture { width: 120px; margin: 0 auto 18px; animation: enjo-ui-bounce 900ms cubic-bezier(.3, 1.6, .5, 1) both; }
.enjo-ui-ad__title { font: 700 26px/1.15 var(--enjo-font); }
.enjo-ui-ad__text { font: 500 16px/1.35 var(--enjo-font); color: #bdada9; margin-top: 8px; }
.enjo-ui-ad.is-earned .enjo-ui-ad__text { color: #ffbe2e; font-weight: 700; }
.enjo-ui-ad__clock {
  position: relative;
  width: 64px;
  height: 64px;
  margin: 22px auto 0;
  border-radius: 50%;
  background: conic-gradient(#f6623d var(--enjo-ad-turn, 0turn), #3b2824 0);
  animation: enjo-ui-ad-clock var(--enjo-ad-seconds, 5s) linear both;
  display: grid;
  place-items: center;
  font: 700 24px var(--enjo-font);
}
.enjo-ui-ad__clock::before { content: ""; position: absolute; inset: 7px; border-radius: 50%; background: #170c09; }
.enjo-ui-ad__clock span { position: relative; }
@property --enjo-ad-turn { syntax: "<angle>"; inherits: false; initial-value: 0turn; }
@keyframes enjo-ui-ad-clock { to { --enjo-ad-turn: 1turn; } }
.enjo-ui-confetti { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.enjo-ui-confetti i { position: absolute; top: 0; border-radius: 2px; }

/* ---- Coach (coach.js) ---- */
.enjo-ui-coach { position: absolute; inset: 0; transition: opacity 220ms; }
.enjo-ui-coach.is-leaving { opacity: 0; }
.enjo-ui-coach__card {
  position: absolute;
  top: calc(var(--enjo-safe-top) + 100px);
  left: 50%;
  transform: translateX(-50%);
  width: max-content;
  max-width: min(330px, calc(100vw - 40px));
  box-sizing: border-box;
  padding: 11px 20px 12px;
  border-radius: var(--enjo-radius-card);
  background: var(--enjo-surf);
  box-shadow: 0 4px 0 var(--enjo-surfSh);
  font: 600 17px/1.3 var(--enjo-font);
  color: var(--enjo-ink);
  text-align: center;
}
.enjo-ui-coach__card.is-new { animation: enjo-ui-drop 380ms cubic-bezier(.3, 1.5, .5, 1) both; }
.enjo-ui-coach__hand { position: absolute; transform-origin: 32% 4%; filter: drop-shadow(0 0 0 transparent); }
.enjo-ui-coach__hand--tap { animation: enjo-ui-tap 1.3s ease-in-out infinite; }
.enjo-ui-coach__hand--drag { animation: enjo-ui-drag 1.9s ease-in-out infinite; }
/* The "trace" gesture (a drawing game's tutorial): the hand moved by coach.js along a path, a dotted trail behind it
   in the highlight colour, on a white outline so it reads on any picture; hidden while the player draws. */
.enjo-ui-coach__trail { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.enjo-ui-coach__trail polyline {
  fill: none;
  stroke: var(--enjo-ui-highlight);
  stroke-width: 7px;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 0.1 14;
  paint-order: stroke;
  filter: drop-shadow(0 0 1.5px #fff) drop-shadow(0 0 1.5px #fff);
}
.enjo-ui-coach.is-resting .enjo-ui-coach__hand, .enjo-ui-coach.is-resting .enjo-ui-coach__trail { opacity: 0; }
.enjo-ui-coach__hand, .enjo-ui-coach__trail { transition: opacity 160ms; }
.enjo-ui-coach__ring {
  position: absolute;
  width: 56px;
  height: 56px;
  margin: -28px 0 0 -28px;
  border-radius: 50%;
  border: 4px solid #ffbe2e;
  box-sizing: border-box;
  animation: enjo-ui-ring 1.3s ease-out infinite;
}

/* ---- Motion ---- */
@keyframes enjo-ui-fade { from { opacity: 0; } }
@keyframes enjo-ui-spin { to { transform: rotate(1turn); } }
@keyframes enjo-ui-spring { from { opacity: 0; transform: translateY(40px) scale(.85); } }
@keyframes enjo-ui-drop { from { opacity: 0; transform: translate(-50%, -14px) scale(.9); } }
@keyframes enjo-ui-pop { 40% { transform: scale(1.25); } }
@keyframes enjo-ui-bounce { from { transform: scale(0) rotate(-20deg); } 60% { transform: scale(1.12) rotate(6deg); } }
@keyframes enjo-ui-shake {
  20% { transform: translateX(-5px) rotate(-6deg); }
  40% { transform: translateX(5px) rotate(5deg); }
  60% { transform: translateX(-3px) rotate(-3deg); }
  80% { transform: translateX(2px); }
}
@keyframes enjo-ui-tap {
  0%, 100% { transform: translate(14px, 18px); }
  35%, 50% { transform: translate(0, 0) scale(.9); }
}
@keyframes enjo-ui-ring {
  0%, 30% { opacity: 0; transform: scale(.3); }
  38% { opacity: 1; }
  100% { opacity: 0; transform: scale(1.5); }
}
@keyframes enjo-ui-drag {
  0% { transform: translate(0, 0); opacity: 0; }
  12% { opacity: 1; transform: translate(0, 0) scale(.92); }
  75% { opacity: 1; transform: translate(var(--enjo-drag-x, 0), var(--enjo-drag-y, 0)) scale(.92); }
  100% { opacity: 0; transform: translate(var(--enjo-drag-x, 0), var(--enjo-drag-y, 0)); }
}

/* ---- Joystick (joystick.js) ---- */
.enjo-ui-stick { position: absolute; left: 0; top: 0; opacity: 0; transition: opacity 120ms; }
.enjo-ui-stick.is-on { opacity: 1; }
.enjo-ui-stick__ring, .enjo-ui-stick__knob { position: absolute; left: 0; top: 0; border-radius: 50%; box-sizing: border-box; }
.enjo-ui-stick__ring {
  width: calc(var(--enjo-stick-r) * 2 + 36px);
  height: calc(var(--enjo-stick-r) * 2 + 36px);
  margin: calc(var(--enjo-stick-r) * -1 - 18px) 0 0 calc(var(--enjo-stick-r) * -1 - 18px);
  background: rgba(255, 255, 255, 0.14);
  border: 4px solid rgba(255, 255, 255, 0.35);
}
/* The knob in the palette's ink (white on a dark game, near-black on a light one), so it shows over any play. */
.enjo-ui-stick__knob {
  width: 58px;
  height: 58px;
  margin: -31px 0 0 -29px;
  background: var(--enjo-ink);
  box-shadow: 0 5px 0 rgba(0, 0, 0, 0.3);
}

/* ---- Pop (pop.js) ---- */
.enjo-ui-pop {
  position: absolute;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  --enjo-pop-edge: var(--enjo-primaryEdge, #b63613);
  animation: enjo-ui-pop-life var(--enjo-pop-seconds, 1.3s) both;
}
.enjo-ui-pop__text {
  font: 700 var(--enjo-pop-size, 40px)/1 var(--enjo-font);
  color: #fff;
  -webkit-text-stroke: calc(var(--enjo-pop-size, 40px) * 0.175) var(--enjo-pop-edge);
  paint-order: stroke fill;
  text-shadow: 0 calc(var(--enjo-pop-size, 40px) * 0.125) 0 var(--enjo-pop-edge);
  white-space: nowrap;
}
.enjo-ui .enjo-ui-pop__icon { width: calc(var(--enjo-pop-size, 40px) * 1.3); animation: enjo-ui-shake 600ms 200ms both; }
@keyframes enjo-ui-pop-life {
  0% { opacity: 0; transform: scale(0.2) rotate(-8deg); }
  14% { opacity: 1; transform: scale(1.18) rotate(3deg); }
  24% { transform: scale(1) rotate(0); }
  82% { opacity: 1; transform: scale(1); }
  100% { opacity: 0; transform: scale(0.6) translateY(-20px); }
}

/* ---- Upgrades (upgrades.js): the bottom panel between runs: the screen's orange action over a row of upgrade cards.
   Each card a surface card with the brand's solid edge and press; its level in the hint's round count badge, its
   tier's pips, its price in a coin pill (greyed when short; "Max" at the last level). ---- */
.enjo-ui-upgrades {
  position: absolute;
  left: calc(var(--enjo-safe-left) + 12px);
  right: calc(var(--enjo-safe-right) + 12px);
  bottom: calc(var(--enjo-safe-bottom) + 14px);
  max-width: 440px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
  pointer-events: auto;
  transition: transform 260ms cubic-bezier(.3, 1.3, .5, 1), opacity 200ms;
}
.enjo-ui-upgrades.is-hidden { transform: translateY(calc(100% + 40px)); opacity: 0; pointer-events: none; }
.enjo-ui-upgrades__go { width: 100%; font-size: 24px; padding: 14px; }
.enjo-ui-upgrades__row { display: flex; gap: 10px; }
.enjo-ui-upgrade {
  position: relative;
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 10px 6px 8px;
  border: 0;
  border-radius: var(--enjo-radius-card);
  background: var(--enjo-surf);
  color: var(--enjo-ink);
  box-shadow: 0 4px 0 var(--enjo-surfSh);
  font-family: var(--enjo-font);
  cursor: pointer;
  transition: transform 80ms, box-shadow 80ms;
}
.enjo-ui-upgrade:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--enjo-surfSh); }
.enjo-ui-upgrade__level {
  position: absolute;
  top: -7px;
  inset-inline-end: -5px;
  min-width: 24px;
  height: 24px;
  padding: 0 6px;
  box-sizing: border-box;
  border-radius: 12px;
  background: var(--enjo-primary);
  box-shadow: 0 2px 0 var(--enjo-primaryEdge);
  color: var(--enjo-onPrimary);
  font: 700 14px/24px var(--enjo-font);
}
.enjo-ui-upgrade__icon { width: 46px; height: 46px; }
.enjo-ui-upgrade__title { font: 600 13px/1.1 var(--enjo-font); letter-spacing: 0.06em; text-transform: uppercase; color: var(--enjo-mute); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.enjo-ui-upgrade__title:lang(ar), .enjo-ui-upgrade__title:lang(hi) { letter-spacing: 0; }
.enjo-ui-upgrade__note { font: 700 14px/1 var(--enjo-font); color: var(--enjo-ui-highlight); }
.enjo-ui-upgrade__pips { display: flex; gap: 3px; margin: 2px 0; }
.enjo-ui-upgrade__pips i { width: 11px; height: 6px; border-radius: 3px; background: var(--enjo-surfSh); }
.enjo-ui-upgrade__pips i.is-on { background: var(--enjo-primary); }
.enjo-ui-upgrade__price {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 2px;
  padding-block: 3px;
  padding-inline: 4px 10px;
  border-radius: var(--enjo-radius-pill);
  background: var(--enjo-bg);
  box-shadow: 0 2px 0 var(--enjo-surfSh);
  font: 700 16px/1 var(--enjo-font);
  direction: ltr;
  unicode-bidi: isolate;
}
.enjo-ui .enjo-ui-upgrade__coin { width: 20px; flex: none; }
.enjo-ui-upgrade.is-max .enjo-ui-upgrade__price { padding-inline: 10px; color: var(--enjo-mute); }
.enjo-ui-upgrade.is-short .enjo-ui-upgrade__price { color: var(--enjo-mute); }
.enjo-ui-upgrade.is-short .enjo-ui-upgrade__coin { filter: grayscale(1); opacity: 0.55; }
.enjo-ui-upgrade.is-short .enjo-ui-upgrade__icon { opacity: 0.6; }
.enjo-ui-upgrade.is-nudging { animation: enjo-ui-shake 420ms; }
.enjo-ui-upgrade.is-bought { animation: enjo-ui-pop 360ms cubic-bezier(.3, 1.6, .5, 1); }
.enjo-ui-upgrade.is-bought .enjo-ui-upgrade__icon { animation: enjo-ui-bounce 480ms cubic-bezier(.3, 1.6, .5, 1); }
/* Short phones (up to 680px high): the cards a little smaller, so the play shows above them. */
@media (max-height: 680px) {
  .enjo-ui-upgrades { gap: 10px; bottom: calc(var(--enjo-safe-bottom) + 10px); }
  .enjo-ui-upgrades__go { font-size: 21px; padding: 11px; }
  .enjo-ui-upgrade__icon { width: 38px; height: 38px; }
  .enjo-ui-upgrade { padding: 8px 4px 6px; }
}

/* ---- Meter (meter.js): a run's distance toward its goal, a white card under the top bar ---- */
.enjo-ui-meter {
  position: absolute;
  top: calc(var(--enjo-safe-top) + 76px);
  left: calc(var(--enjo-safe-left) + 14px);
  right: calc(var(--enjo-safe-right) + 14px);
  max-width: 440px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 10px 7px 14px;
  box-sizing: border-box;
  border-radius: var(--enjo-radius-pill);
  background: var(--enjo-surf);
  box-shadow: 0 4px 0 var(--enjo-surfSh);
  transition: opacity 200ms;
}
.enjo-ui-meter.is-hidden { opacity: 0; }
.enjo-ui-meter__value { flex: none; min-width: 3.6em; font: 700 18px/1 var(--enjo-font); direction: ltr; unicode-bidi: isolate; }
.enjo-ui-meter__track { position: relative; flex: 1; height: 12px; border-radius: 6px; background: var(--enjo-empty); box-shadow: inset 0 2px 0 var(--enjo-surfSh); }
.enjo-ui-meter__fill { position: absolute; inset-block: 0; inset-inline-start: 0; width: 0; border-radius: 6px; background: var(--enjo-primary); transition: width 120ms linear; }
.enjo-ui-meter__best {
  position: absolute;
  top: -5px;
  width: 8px;
  height: 22px;
  margin-inline-start: -4px;
  border-radius: 4px;
  background: var(--enjo-coin);
  box-shadow: 0 2px 0 var(--enjo-coinEdge);
}
.enjo-ui-meter__goal { flex: none; display: flex; align-items: center; gap: 2px; font: 600 14px/1 var(--enjo-font); color: var(--enjo-mute); direction: ltr; unicode-bidi: isolate; }
.enjo-ui .enjo-ui-meter__goal img { width: 26px; }
.enjo-ui-meter.is-past .enjo-ui-meter__goal { color: var(--enjo-ui-highlight); }

/* ---- Tally (tally.js): status pills under the top bar, a store's counts and a task ---- */
.enjo-ui-tally {
  position: absolute;
  top: calc(var(--enjo-safe-top) + 76px);
  left: calc(var(--enjo-safe-left) + 14px);
  right: calc(var(--enjo-safe-right) + 14px);
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}
.enjo-ui-tally__pill {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 38px;
  padding-block: 0;
  padding-inline: 4px 12px;
  box-sizing: border-box;
  border-radius: var(--enjo-radius-pill);
  background: var(--enjo-surf);
  box-shadow: 0 3px 0 var(--enjo-surfSh);
  transition: opacity 200ms;
}
.enjo-ui-tally__pill.is-hidden { display: none; }
.enjo-ui-tally__pill.is-task { box-shadow: 0 0 0 2px var(--enjo-primary), 0 3px 0 2px var(--enjo-primaryEdge); }
.enjo-ui-tally__pill.is-popping { animation: enjo-ui-pop 360ms cubic-bezier(.3, 1.6, .5, 1); }
.enjo-ui .enjo-ui-tally__pic { width: 30px; height: 30px; flex: none; object-fit: contain; }
.enjo-ui-tally__num { font: 700 17px/1 var(--enjo-font); direction: ltr; unicode-bidi: isolate; white-space: nowrap; }
.enjo-ui .enjo-ui-tally__check { display: none; width: 22px; height: 22px; margin-inline-start: -2px; }
.enjo-ui-tally__pill.is-done .enjo-ui-tally__check { display: block; }

/* ---- Held pads and play buttons (holds.js): a car's pedals and wheel, held; recover and camera, tapped ---- */
.enjo-ui-holds__pad {
  position: relative;
  display: grid;
  place-items: center;
  box-sizing: border-box;
  border-radius: var(--enjo-radius-card);
  background: var(--enjo-surf);
  box-shadow: 0 5px 0 var(--enjo-surfSh);
  pointer-events: auto;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
  cursor: pointer;
  transition: transform 70ms, box-shadow 70ms;
}
.enjo-ui-holds__pad--big { width: 72px; height: 72px; }
.enjo-ui-holds__pad--tall { width: 64px; height: 96px; }
.enjo-ui-holds__pad--small { width: 58px; height: 46px; border-radius: var(--enjo-radius-button); }
.enjo-ui-holds__pad.is-held { transform: translateY(4px); box-shadow: 0 1px 0 var(--enjo-surfSh); }
.enjo-ui .enjo-ui-holds__icon { width: 62%; height: 62%; object-fit: contain; pointer-events: none; }
.enjo-ui-holds__pad--tall .enjo-ui-holds__icon { width: 82%; height: 72%; }
.enjo-ui-holds__pad--small .enjo-ui-holds__icon { width: 64%; height: 76%; }
.enjo-ui-holds__button { display: grid; place-items: center; overflow: hidden; }
.enjo-ui-holds__button .enjo-ui-holds__icon { width: 100%; height: 100%; }
.enjo-ui-holds__ring {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: conic-gradient(var(--enjo-scrim) calc(var(--enjo-holds-wait, 0) * 360deg), transparent 0);
  opacity: 0;
  pointer-events: none;
}
.enjo-ui-holds__button.is-waiting { cursor: default; }
.enjo-ui-holds__button.is-waiting .enjo-ui-holds__ring { opacity: 1; }
.enjo-ui-holds__button.is-waiting .enjo-ui-holds__icon { filter: grayscale(0.8); opacity: 0.6; }
.enjo-ui-holds__pad.is-pulsing, .enjo-ui-holds__button.is-pulsing {
  outline: 3px solid var(--enjo-ui-highlight);
  outline-offset: 3px;
  animation: enjo-ui-holds-bob 900ms ease-in-out infinite;
}
.enjo-ui-holds__pad.is-pulsing.is-held { animation: none; }
@keyframes enjo-ui-holds-bob { 50% { translate: 0 -4px; } }
/* A phone up to 420px wide: the pads a little smaller, so two each side and the buttons between fit. */
@media (max-width: 420px) {
  .enjo-ui-holds__pad--big { width: 60px; height: 60px; }
  .enjo-ui-holds__pad--tall { width: 56px; height: 84px; }
  .enjo-ui-holds__pad--small { width: 50px; height: 40px; }
  .enjo-ui-actions .enjo-ui-holds__button { width: 46px; height: 46px; padding: 6px; }
}
