:root {
  --mf-bg: #10131c;
  --mf-bg-2: #1c2230;
  --mf-surface: rgba(28, 34, 48, 0.86);
  --mf-surface-flat: rgba(16, 19, 28, 0.4);
  --mf-ink: #eef1f7;
  --mf-ink-dim: rgba(255, 255, 255, 0.55);
  --mf-faint: rgba(255, 255, 255, 0.12);
  --mf-accent: #b8a8d8;
  --mf-accent-soft: rgba(184, 168, 216, 0.14);
  --mf-danger: #f6465d;
  --mf-up: #0ecb81;
  --mf-card-border: rgba(184, 168, 216, 0.18);
  
  --mf-gold: #ffd75e;
  --mf-brand-ink: #eef1f7;
  --mf-radius: 14px;
  --mf-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica,
    Arial, sans-serif;
}

:root[data-theme="day"] {
  --mf-bg: #faf9f5;
  --mf-bg-2: #efe9d9;
  --mf-surface: #ffffff;
  --mf-surface-flat: #f1eee7;
  --mf-ink: #2c2a26;
  --mf-ink-dim: #5c5850;
  --mf-faint: #e6e2d9;
  --mf-accent: #880e4f;
  --mf-accent-soft: rgba(136, 14, 79, 0.10);
  --mf-danger: #c62828;
  --mf-up: #4e7d2f;
  --mf-card-border: #e6e2d9;
  
  --mf-gold: #e0a400;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  margin: 0;
  padding: 0;
  height: 100dvh;
  width: 100%;
  overflow: hidden;
  overscroll-behavior: none;
}

body {
  font-family: var(--mf-font);
  font-size: 16px;
  color: var(--mf-ink);
  background: linear-gradient(160deg, var(--mf-bg) 0%, var(--mf-bg-2) 100%);
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}

.mf-hidden {
  display: none !important;
}

#app-root {
  position: relative;
  width: 100%;
  height: 100%;
}

#splash-root {
  position: absolute;
  inset: 0;
  z-index: 50;
}

#splash-root:empty {
  display: none;
  pointer-events: none;
}

.mf-shell {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100dvh;
  margin: 0 auto;
  overflow: hidden;
  background: linear-gradient(160deg, var(--mf-bg) 0%, var(--mf-bg-2) 100%);
  
  --mf-safe-top: env(safe-area-inset-top);
  --mf-safe-right: max(0px, env(safe-area-inset-right));
  --mf-safe-bottom: env(safe-area-inset-bottom);
  --mf-safe-left: max(0px, env(safe-area-inset-left));
  
  --mf-pause-top: calc(max(12px, var(--mf-safe-top, 0px)) + 44px);
  --mf-pause-right: max(12px, var(--mf-safe-right, 0px));
  --mf-pause-size: 48px;
}

@media (min-width: 700px) {
  .mf-shell {
    max-width: calc(100vh * 0.5625);
  }
}

.mf-canvas {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
}

#game-shell {
  position: relative;
  flex: 1 1 auto;
  width: 100%;
  min-height: 0;
  overflow: hidden;
}

#menu-root,
#overlay-root {
  position: absolute;
  inset: 0;
  z-index: 10;
}

#overlay-root {
  z-index: 30;
  pointer-events: none;
}

#overlay-root > * {
  pointer-events: auto;
}

#menu-root:empty,
#overlay-root:empty {
  pointer-events: none;
}

#menu-root {
  display: flex;
  padding: calc(16px + var(--mf-safe-top, 0px))
    calc(16px + var(--mf-safe-right, 0px))
    calc(16px + var(--mf-safe-bottom, 0px))
    calc(16px + var(--mf-safe-left, 0px));
}

body.mf-short .mf-card {
  padding: 14px 16px;
  gap: 9px;
}

body.mf-short .mf-title {
  font-size: 20px;
}

body.mf-short .mf-subtitle {
  font-size: 13px;
}

body.mf-short .mf-mascot {
  width: 104px;
  height: clamp(72px, 16vh, 110px);
}

body.mf-short .mf-brand-strip {
  height: 11px;
}

.mf-splash {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  
  background: linear-gradient(160deg, #10131c 0%, #1c2230 100%);
  opacity: 1;
}

.mf-splash-logo {
  width: min(74vw, 340px);
  padding: 24px;
  
  animation: mfl-breathe 3.4s ease-in-out 1.5s infinite;
}

.mfl-logo {
  display: block;
  width: 100%;
  height: auto;
  
  overflow: visible;
}

.mfl-body {
  fill: #ece7f1;
}

.mfl-accent {
  fill: #a8254a;
}

.mfl-mark,
.mfl-pip,
.mfl-word {
  transform-box: fill-box;
  transform-origin: center;
}

.mfl-mark {
  animation: mfl-cube-land 640ms cubic-bezier(0.22, 1.1, 0.36, 1) both;
}

.mfl-pip {
  animation: mfl-pip-pop 360ms cubic-bezier(0.2, 1.35, 0.4, 1) both;
}

.mfl-pip-a {
  animation-delay: 430ms;
}

.mfl-pip-b {
  animation-delay: 550ms;
}

.mfl-pip-c {
  animation-delay: 670ms;
}

.mfl-word {
  animation: mfl-word-rise 520ms cubic-bezier(0.22, 1, 0.36, 1) 780ms both;
}

@keyframes mfl-cube-land {
  0% {
    transform: translateY(-14%) scale(0.66);
    opacity: 0;
  }
  55% {
    transform: translateY(2%) scale(1.05);
    opacity: 1;
  }
  78% {
    transform: translateY(0) scale(0.985);
  }
  100% {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}

@keyframes mfl-pip-pop {
  0% {
    transform: scale(0.1);
    opacity: 0;
  }
  60% {
    transform: scale(1.18);
    opacity: 1;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes mfl-word-rise {
  0% {
    transform: translateY(28%);
    opacity: 0;
  }
  100% {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes mfl-breathe {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.028);
  }
}

@media (prefers-reduced-motion: reduce) {
  .mf-splash-logo {
    animation: none;
  }

  .mfl-mark,
  .mfl-pip,
  .mfl-word {
    animation: mfl-quiet-in 420ms ease both;
  }

  .mfl-pip-a,
  .mfl-pip-b,
  .mfl-pip-c {
    animation-delay: 0ms;
  }

  @keyframes mfl-quiet-in {
    from {
      opacity: 0;
    }
    to {
      opacity: 1;
    }
  }
}

.mf-splash-fade {
  opacity: 0;
  transition: opacity 380ms ease;
}

@keyframes mf-pulse {
  0%,
  100% {
    transform: scale(1);
    opacity: 0.7;
  }
  50% {
    transform: scale(1.08);
    opacity: 1;
  }
}

.mf-brand-strip {
  flex: 0 0 auto;
  order: 99;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  height: 14px;
  margin-top: 2px;
  opacity: 0.92;
}

.mf-brand-icon {
  height: 100%;
  aspect-ratio: 1 / 1;
  background: url("assets/brand/trademire-icon-dark.svg") center / contain
    no-repeat;
}

.mf-brand-text {
  height: 100%;
  display: flex;
  align-items: center;
  gap: 4px;
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 0.2px;
  line-height: 1;
}

.mf-brand-mire {
  color: #d96f8a;
}
.mf-brand-games {
  color: #b8b0c2;
}

.mf-brand-strip-img {
  height: 13px;
  width: auto;
  opacity: 0.55;
}

.mf-brand-cta {
  margin-top: 4px;
  text-align: center;
  font-size: 12px;
  color: var(--mf-ink-dim);
}

.mf-brand-cta a {
  color: var(--mf-accent);
  text-decoration: none;
}

.mf-brand-cta a:hover {
  text-decoration: underline;
}

.mf-card {
  position: relative;
  margin: auto;
  width: min(420px, 100%);
  max-height: 100%;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  overflow-y: auto;
  background: var(--mf-surface);
  border: 1px solid var(--mf-card-border);
  border-radius: var(--mf-radius);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(8px);
}

.mf-card-body {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.mf-title {
  margin: 0;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: 0.3px;
  color: var(--mf-ink);
  text-align: center;
}

.mf-subtitle {
  margin: 0;
  font-size: 15px;
  line-height: 1.45;
  color: rgba(238, 241, 247, 0.85);
  text-align: center;
}

.mf-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 12px 16px;
  font-family: inherit;
  font-size: 16px;
  font-weight: 600;
  color: var(--mf-ink);
  background: rgba(184, 168, 216, 0.1);
  border: 1px solid var(--mf-card-border);
  border-radius: 11px;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.05s ease;
}

.mf-btn:hover {
  background: rgba(184, 168, 216, 0.18);
}

.mf-btn:active {
  transform: scale(0.98);
}

.mf-btn:disabled {
  opacity: 0.4;
  cursor: default;
}

.mf-btn-primary {
  color: var(--mf-bg);
  background: linear-gradient(180deg, #c8bbe4 0%, var(--mf-accent) 100%);
  border-color: transparent;
  box-shadow: 0 8px 22px rgba(184, 168, 216, 0.4),
    0 0 18px rgba(184, 168, 216, 0.28);
}

.mf-btn-primary:hover {
  background: linear-gradient(180deg, #d4c9ec 0%, #c8bbe4 100%);
}

.mf-btn-ad {
  color: #2a1d10;
  background: linear-gradient(180deg, #ffd75e, #f0b429);
  border-color: transparent;
  font-weight: 700;
  box-shadow: 0 8px 22px rgba(240, 180, 41, 0.32);
}

.mf-btn-ad:hover {
  background: linear-gradient(180deg, #ffe9a8 0%, #ffce3a 100%);
  filter: brightness(1.06);
}

.mf-btn-ad::before {
  content: '';
  display: inline-block;
  width: 1.25em;
  height: 1.25em;
  margin-right: 6px;
  vertical-align: middle;
  background: center / contain no-repeat
    url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><rect x='2.5' y='3' width='19' height='18' rx='3' fill='%232a2300'/><g fill='%23ffd75e'><rect x='4' y='5.2' width='1.7' height='1.7' rx='.4'/><rect x='4' y='9' width='1.7' height='1.7' rx='.4'/><rect x='4' y='12.8' width='1.7' height='1.7' rx='.4'/><rect x='4' y='16.6' width='1.7' height='1.7' rx='.4'/><rect x='18.3' y='5.2' width='1.7' height='1.7' rx='.4'/><rect x='18.3' y='9' width='1.7' height='1.7' rx='.4'/><rect x='18.3' y='12.8' width='1.7' height='1.7' rx='.4'/><rect x='18.3' y='16.6' width='1.7' height='1.7' rx='.4'/><path d='M10 8.5 L10 15.5 L15.5 12 Z'/></g></svg>");
}

.mf-btn-ad.mf-btn-wait::before {
  content: none;
}

.mf-ad-row {
  display: flex;
  margin-top: 10px;
}

.mf-ad-row > .mf-btn {
  flex: 1 1 0;
}

.mf-btn-row {
  display: flex;
  gap: 10px;
}

.mf-btn-row:empty {
  display: none;
}

.mf-btn-row > .mf-btn {
  flex: 1 1 0;
}

.mf-gameover-actions {
  flex-wrap: wrap;
}

.mf-gameover-actions > .mf-btn-ad {
  flex: 1 1 100%;
}

.mf-gameover-compact {
  gap: 10px;
}

.mf-gameover-compact > .mf-btn {
  flex: 1 1 100%;
}

.mf-link-btn {
  flex: 1 1 calc(50% - 4px);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 48px;
  padding: 11px 10px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  color: var(--mf-accent);
  background: rgba(184, 168, 216, 0.07);
  border: 1px solid var(--mf-card-border);
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.15s ease;
}

.mf-link-btn:hover {
  background: rgba(184, 168, 216, 0.15);
}

.mf-link-btn-feature {
  color: var(--mf-ink);
  background: rgba(184, 168, 216, 0.14);
  border-color: rgba(184, 168, 216, 0.4);
}

.mf-link-btn-feature:hover {
  background: rgba(184, 168, 216, 0.22);
}

.mf-link-btn-soon,
.mf-link-btn-soon:hover {
  opacity: 0.45;
  cursor: not-allowed;
  background: rgba(184, 168, 216, 0.08);
  border-color: rgba(184, 168, 216, 0.18);
}

.mf-links-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.mf-link-btn-trio {
  flex: 1 1 25%;
  min-width: 0;
  flex-direction: column;
  gap: 4px;
  padding: 11px 4px;
  font-size: 12px;
  line-height: 1.2;
  text-align: center;
}

.mf-link-btn-full {
  flex: 1 0 100%;
}

.mf-more-btn {
  text-decoration: none;
  color: var(--mf-accent);
}

.mf-more-btn:hover {
  text-decoration: none;
}

.mf-more-row {
  display: flex;
}

.mf-more-row > .mf-more-btn {
  flex: 1 1 auto;
}

.mf-toggle-group {
  display: flex;
  gap: 4px;
  padding: 4px;
  background: rgba(16, 19, 28, 0.5);
  border: 1px solid var(--mf-faint);
  border-radius: 11px;
}

.mf-toggle {
  flex: 1 1 0;
  min-height: 40px;
  padding: 9px 4px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  color: var(--mf-ink-dim);
  background: transparent;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.mf-toggle:hover {
  color: var(--mf-ink);
}

.mf-toggle-active {
  color: var(--mf-bg);
  background: var(--mf-accent);
}

.mf-toggle-active:hover {
  color: var(--mf-bg);
}

.mf-link-icon {
  flex: 0 0 auto;
  display: block;
  width: 16px;
  height: 16px;
  color: currentColor;
}

.mf-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  color: var(--mf-ink-dim);
  background: rgba(184, 168, 216, 0.07);
  border: 1px solid var(--mf-card-border);
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.mf-icon-btn:hover {
  color: var(--mf-ink);
  background: rgba(184, 168, 216, 0.15);
}

.mf-mute-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
}

.mf-howto-btn {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
}

.mf-back-btn {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
}

#menu-root .mf-back-btn,
#menu-root .mf-mute-btn {
  width: 64px;
  height: 64px;
  border-radius: 14px;
}

#menu-root .mf-back-btn .mf-link-icon,
#menu-root .mf-mute-btn .mf-link-icon {
  width: 32px;
  height: 32px;
}

.mf-icon-btn-lg {
  width: 64px;
  height: 64px;
  border-radius: 14px;
  color: var(--mf-ink);
}

.mf-icon-btn-primary {
  color: var(--mf-bg);
  background: var(--mf-accent);
  border-color: var(--mf-accent);
}

.mf-icon-btn-primary:hover {
  color: var(--mf-bg);
  background: var(--mf-accent);
}

.mf-pause-actions {
  display: flex;
  flex: 1 1 auto;
  justify-content: center;
  gap: 18px;
  flex-wrap: wrap;
}

.mf-pause-howto {
  text-align: left;
}

.mf-pause-howto p {
  margin: 7px 0;
}

.mf-pause-actions svg {
  width: 30px;
  height: 30px;
}

.mf-pause-actions {
  flex-direction: column;
  gap: 12px;
}

.mf-pause-row {
  display: flex;
  gap: 12px;
}

.mf-pause-row-secondary {
  justify-content: center;
  flex-wrap: wrap;
}

.mf-pause-row-secondary .mf-icon-btn-action {
  flex: 1 1 84px;
  min-width: 84px;
}

.mf-icon-btn-action {
  flex: 1 1 0;
  flex-direction: column;
  gap: 6px;
  width: auto;
  min-height: 72px;
  padding: 12px 8px;
  border-radius: 14px;
  color: var(--mf-ink);
}

.mf-pause-row-primary .mf-icon-btn-action {
  min-height: 84px;
}

.mf-action-glyph {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.mf-action-label {
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
}

.mf-pause-confirm {
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: stretch;
}

.mf-pause-confirm-title {
  font-weight: 600;
  color: var(--mf-ink);
}

.mf-pause-confirm-row {
  display: flex;
  gap: 10px;
}

.mf-pause-confirm-row > .mf-btn {
  flex: 1 1 0;
}

.mf-lang-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 8px;
  padding: 8px;
  background: rgba(16, 19, 28, 0.5);
  border: 1px solid var(--mf-faint);
  border-radius: 11px;
}

.mf-lang-option {
  min-height: 44px;
  padding: 10px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  color: var(--mf-ink-dim);
  background: rgba(184, 168, 216, 0.07);
  border: 1px solid var(--mf-card-border);
  border-radius: 9px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.mf-lang-option:hover {
  color: var(--mf-ink);
  background: rgba(184, 168, 216, 0.15);
}

.mf-lang-active {
  color: var(--mf-bg);
  background: var(--mf-accent);
}

.mf-lang-active:hover {
  color: var(--mf-bg);
  background: var(--mf-accent);
}

.mf-howto-score-title {
  margin-top: 6px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--mf-ink-dim);
}

.mf-howto-scores {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.mf-howto-score-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 10px;
  background: rgba(16, 19, 28, 0.5);
  border: 1px solid var(--mf-faint);
  border-radius: 10px;
}

.mf-howto-score-icon {
  flex: 0 0 auto;
  width: 46px;
  height: 46px;
}

.mf-howto-score-name {
  flex: 1 1 auto;
  min-width: 0;
  overflow-wrap: break-word;
  font-size: 14px;
  font-weight: 600;
  color: var(--mf-ink);
}

.mf-howto-score-value {
  flex: 0 0 auto;
  font-size: 15px;
  font-weight: 800;
  color: var(--mf-up);
}

.mf-howto-score-zero {
  color: var(--mf-danger);
}

.mf-howto-score-effect {
  flex: 0 1 auto;
  min-width: 0;
  white-space: normal;
  overflow-wrap: break-word;
  text-align: right;
  font-size: 12px;
  font-weight: 700;
  color: var(--mf-ink-dim);
}

.mf-stats-row {
  display: flex;
  gap: 8px;
}

.mf-stat {
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 10px 6px;
  background: var(--mf-surface-flat);
  border: 1px solid var(--mf-faint);
  border-radius: 10px;
}

.mf-stat strong {
  font-size: 20px;
  font-weight: 700;
  color: var(--mf-ink);
}

.mf-stat span {
  font-size: 10px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--mf-ink-dim);
}

.mf-stat-podium {
  justify-content: center;
  gap: 4px;
  
  flex-grow: 1.9;
}

.mf-podium-scope {
  order: -1;
}

.mf-stat-podium {
  cursor: pointer;
  user-select: none;
}

.mf-podium-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  width: 100%;
}

.mf-podium-row {
  display: grid;
  grid-template-columns: 11px 1fr auto;
  align-items: baseline;
  gap: 6px;
  line-height: 1.35;
}

.mf-stat .mf-podium-rank,
.mf-stat .mf-podium-name,
.mf-stat .mf-podium-score {
  font-size: 12px;
  text-transform: none;
  letter-spacing: 0;
}

.mf-stat .mf-podium-rank {
  color: var(--mf-ink-dim);
  font-weight: 700;
  text-align: right;
}

.mf-stat .mf-podium-name {
  color: var(--mf-ink);
  font-weight: 500;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.mf-stat .mf-podium-score {
  color: var(--mf-ink);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.mf-stat-icon {
  display: block;
  width: 19px;
  height: 19px;
  color: var(--mf-ink-dim);
}

.mf-stat-icon svg {
  width: 19px;
  height: 19px;
}

.mf-stat .mf-stat-icon-gold,
.mf-stat .mf-stat-icon-gold svg {
  color: var(--mf-gold);
}

.mf-stat-icon-art {
  width: 22px;
  height: 22px;
}

.mf-stat-icon-art img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.mf-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.mf-board-list {
  max-height: 552px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.mf-card,
.mf-board-list {
  scrollbar-width: thin;
  scrollbar-color: color-mix(in srgb, var(--mf-accent) 38%, transparent) transparent;
}

.mf-card::-webkit-scrollbar,
.mf-board-list::-webkit-scrollbar {
  width: 6px;
}

.mf-card::-webkit-scrollbar-track,
.mf-board-list::-webkit-scrollbar-track {
  background: transparent;
}

.mf-card::-webkit-scrollbar-thumb,
.mf-board-list::-webkit-scrollbar-thumb {
  background: color-mix(in srgb, var(--mf-accent) 38%, transparent);
  border-radius: 999px;
}

.mf-card::-webkit-scrollbar-thumb:hover,
.mf-board-list::-webkit-scrollbar-thumb:hover {
  background: color-mix(in srgb, var(--mf-accent) 60%, transparent);
}

.mf-list-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 10px;
  background: var(--mf-surface-flat);
  border: 1px solid var(--mf-faint);
  border-radius: 11px;
}

.mf-list-row > .mf-btn,
.mf-list-row > .mf-active-chip {
  flex: 0 0 116px;
  width: 116px;
  min-height: 48px;
}

.mf-list-row > .mf-btn {
  padding: 12px 10px;
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
}

.mf-list-label {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--mf-ink);
}

.mf-list-desc {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.mf-list-desc .mf-list-label {
  flex: 0 0 auto;
}

.mf-list-hint {
  font-size: 12px;
  color: var(--mf-accent);
}

.mf-item-preview {
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: rgba(16, 19, 28, 0.5);
  border: 1px solid var(--mf-faint);
  overflow: hidden;
}

.mf-item-preview-art {
  display: block;
  width: 100%;
  height: 100%;
}

.mf-item-locked {
  filter: grayscale(1);
  opacity: 0.5;
}

.mf-active-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 9px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  text-align: center;
  color: var(--mf-up);
  background: rgba(14, 203, 129, 0.14);
  border: 1px solid rgba(14, 203, 129, 0.35);
  border-radius: 999px;
}

.mf-chip-timed {
  color: #f0b429;
  background: rgba(240, 180, 41, 0.14);
  border-color: rgba(240, 180, 41, 0.4);
  
  font-size: 12px;
  letter-spacing: 0.2px;
  text-transform: none;
}

.mf-chip-invite {
  color: var(--mf-ink-dim);
  background: rgba(184, 168, 216, 0.08);
  border-color: var(--mf-faint);
  
  font-size: 12px;
  letter-spacing: 0.2px;
  text-transform: none;
}

.mf-progress-icon {
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--mf-ink-dim);
  opacity: 0.5;
}

.mf-progress-icon svg {
  width: 22px;
  height: 22px;
}

.mf-progress-done {
  color: var(--mf-gold);
  opacity: 1;
}

.mf-dots {
  display: flex;
  gap: 5px;
}

.mf-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: transparent;
  border: 1.5px solid var(--mf-ink-dim);
}

.mf-dot-filled {
  background: var(--mf-accent);
  border-color: var(--mf-accent);
}

.mf-board-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  font-size: 14px;
  background: var(--mf-surface-flat);
  border: 1px solid var(--mf-faint);
  border-radius: 10px;
}

.mf-board-rank {
  flex: 0 0 24px;
  font-weight: 700;
  color: var(--mf-ink-dim);
}

.mf-board-avatar {
  position: relative;
  flex: 0 0 30px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  color: #fff;
}

.mf-board-avatar img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.mf-board-name {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--mf-ink);
}

.mf-board-score {
  flex: 0 0 auto;
  font-weight: 700;
  color: var(--mf-ink);
  font-variant-numeric: tabular-nums;
}

.mf-board-level {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--mf-accent-soft);
  color: var(--mf-accent);
  border: 1px solid var(--mf-accent);
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.mf-board-level::before {
  content: '';
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-bottom: 6px solid currentColor;
}

.mf-board-me {
  background: var(--mf-accent-soft);
  border-color: var(--mf-accent);
}

.mf-board-me .mf-board-rank {
  color: var(--mf-accent);
}

.mf-board-watch {
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid var(--mf-accent);
  background: transparent;
  color: var(--mf-accent);
  font-size: 10px;
  line-height: 1;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.mf-board-watch-glyph {
  display: block;
  transform: translateX(1px);
}

.mf-board-watch:active {
  background: var(--mf-accent-soft);
}

.mf-board-watch:disabled {
  cursor: default;
}

.mf-board-watch-busy::after {
  content: '';
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid currentColor;
  border-top-color: transparent;
  animation: mf-board-watch-spin 0.7s linear infinite;
}

@keyframes mf-board-watch-spin {
  to {
    transform: rotate(360deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .mf-board-watch-busy::after {
    animation: mf-board-watch-fade 1.2s ease-in-out infinite;
  }
}

@keyframes mf-board-watch-fade {
  0%,
  100% {
    opacity: 0.35;
  }
  50% {
    opacity: 1;
  }
}

.mf-board-title {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.mf-board-title-icon {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  color: var(--mf-gold);
}

.mf-board-title-icon svg {
  display: block;
  width: 22px;
  height: 22px;
}

.mf-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(16px + var(--mf-safe-top, 0px))
    calc(16px + var(--mf-safe-right, 0px))
    calc(16px + var(--mf-safe-bottom, 0px))
    calc(16px + var(--mf-safe-left, 0px));
}

.mf-dim {
  position: absolute;
  inset: 0;
  background: rgba(8, 10, 16, 0.72);
  backdrop-filter: blur(3px);
}

.mf-overlay .mf-card {
  position: relative;
  z-index: 1;
  margin: 0;
}

.mf-pause-btn {
  position: absolute;
  top: var(--mf-pause-top);
  right: var(--mf-pause-right);
  z-index: 20;
  width: var(--mf-pause-size);
  height: var(--mf-pause-size);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  letter-spacing: 1px;
  color: var(--mf-ink);
  background: rgba(16, 19, 28, 0.6);
  border: 1px solid var(--mf-card-border);
  border-radius: 50%;
  cursor: pointer;
  backdrop-filter: blur(4px);
}

.mf-pause-btn:active {
  background: rgba(16, 19, 28, 0.85);
}

.mf-left-hud {
  position: absolute;
  top: var(--mf-pause-top);
  left: max(12px, var(--mf-safe-left, 0px));
  height: var(--mf-pause-size);
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 10px;
  pointer-events: none;
}

.mf-lives-hud {
  order: 1;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 5px;
  pointer-events: none;
}

.mf-lives-hud .mf-life {
  display: block;
}

.mf-lives-hud .mf-lives-count {
  font: 800 26px system-ui, -apple-system, sans-serif;
  color: currentColor;
  margin-right: 3px;
}

.mf-lives-hud.mf-hidden {
  display: none;
}

#game-shell.mf-run-hud-off .mf-lives-hud,
#game-shell.mf-run-hud-off .mf-wave-banner,
#game-shell.mf-run-hud-off .mf-corner-stat,
#game-shell.mf-run-hud-off .mf-coin-hud {
  display: none;
}

.mf-coin-hud {
  position: absolute;
  top: calc(var(--mf-pause-top) + var(--mf-pause-size) + 8px);
  right: var(--mf-pause-right);
  z-index: 20;
  height: 30px;
  padding: 0 10px 0 8px;
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--mf-ink);
  background: rgba(16, 19, 28, 0.6);
  border: 1px solid var(--mf-card-border);
  border-radius: 15px;
  backdrop-filter: blur(4px);
  pointer-events: none;
  line-height: 1;
}

.mf-coin-hud .mf-coin-mark {
  display: block;
  width: 20px;
  height: 20px;
}

.mf-coin-hud .mf-coin-count {
  font: 800 18px system-ui, -apple-system, sans-serif;
  color: var(--mf-gold);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.55);
}

.mf-coin-hud.mf-hidden {
  display: none;
}

.mf-corner-stat {
  order: 2;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 3px;
  pointer-events: none;
  line-height: 1;
}

.mf-corner-stat .mf-corner-stat-value {
  font: 800 30px system-ui, -apple-system, sans-serif;
}

.mf-corner-stat .mf-corner-stat-unit {
  font: 700 18px system-ui, -apple-system, sans-serif;
  color: #9cc3aa;
  opacity: 0.9;
}

.mf-corner-stat--compact {
  height: 40px;
}

.mf-corner-stat--compact .mf-corner-stat-value {
  font: 600 23px system-ui, -apple-system, sans-serif;
}

.mf-corner-stat--compact .mf-corner-stat-unit {
  font: 600 14px system-ui, -apple-system, sans-serif;
  color: inherit;
  opacity: 0.7;
}

.mf-corner-stat.mf-hidden {
  display: none;
}

.mf-ad-status {
  position: absolute;
  top: calc(var(--mf-pause-top) + var(--mf-pause-size));
  left: max(12px, var(--mf-safe-left, 0px));
  right: calc(var(--mf-pause-right) + var(--mf-pause-size) + 10px);
  transform: translateY(-100%);
  z-index: 21;
  padding: 7px 12px 7px 10px;
  display: flex;
  align-items: center;
  gap: 7px;
  border-radius: 14px;
  background: rgba(8, 11, 20, 0.9);
  border: 1px solid rgba(255, 215, 94, 0.45);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
  color: #f3f5fb;
  font: 700 15px/1.25 system-ui, -apple-system, sans-serif;
  text-align: left;
  text-wrap: balance;
  pointer-events: none;
}

.mf-ad-status::before {
  content: '';
  flex: 0 0 auto;
  display: block;
  width: 18px;
  height: 18px;
  background: center / contain no-repeat
    url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><rect x='2.5' y='3' width='19' height='18' rx='3' fill='%232a2300'/><g fill='%23ffd75e'><rect x='4' y='5.2' width='1.7' height='1.7' rx='.4'/><rect x='4' y='9' width='1.7' height='1.7' rx='.4'/><rect x='4' y='12.8' width='1.7' height='1.7' rx='.4'/><rect x='4' y='16.6' width='1.7' height='1.7' rx='.4'/><rect x='18.3' y='5.2' width='1.7' height='1.7' rx='.4'/><rect x='18.3' y='9' width='1.7' height='1.7' rx='.4'/><rect x='18.3' y='12.8' width='1.7' height='1.7' rx='.4'/><rect x='18.3' y='16.6' width='1.7' height='1.7' rx='.4'/><path d='M10 8.5 L10 15.5 L15.5 12 Z'/></g></svg>");
}

.mf-ad-status--info {
  border-color: rgba(255, 215, 94, 0.5);
}

.mf-ad-status--wait {
  border-color: rgba(255, 255, 255, 0.22);
  color: #cfd6e6;
}

.mf-ad-status--good {
  border-color: rgba(69, 224, 111, 0.6);
  color: #d6ffe4;
}

.mf-ad-status--bad {
  border-color: rgba(255, 118, 118, 0.6);
  color: #ffdede;
}

.mf-ad-status.mf-hidden {
  display: none;
}

.mf-wave-banner {
  position: absolute;
  top: 38%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 25;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  pointer-events: none;
  text-align: center;
}

.mf-wave-banner .mf-wave-mascot {
  width: 116px;
  height: auto;
  display: block;
  filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.45));
}

.mf-wave-banner .mf-wave-label {
  font: 900 54px system-ui, -apple-system, sans-serif;
  color: currentColor;
  letter-spacing: 1px;
  text-shadow: 0 3px 12px rgba(0, 0, 0, 0.55);
}

.mf-wave-banner.mf-hidden {
  display: none;
}

.mf-wave-banner.mf-wave-banner-play {
  display: flex;
  animation: mf-wave-pop 1.8s ease forwards;
}

@keyframes mf-wave-pop {
  0% {
    opacity: 0;
    transform: translate(-50%, -42%) scale(0.85);
  }
  14% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.05);
  }
  26% {
    transform: translate(-50%, -50%) scale(1);
  }
  76% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -54%) scale(1);
  }
}

.mf-newbest {
  align-self: center;
  padding: 6px 16px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--mf-up);
  background: rgba(14, 203, 129, 0.14);
  border: 1px solid rgba(14, 203, 129, 0.35);
  border-radius: 999px;
}

.mf-grade-chip {
  align-self: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 56px;
  padding: 8px 18px;
  font-size: 26px;
  font-weight: 800;
  letter-spacing: 1px;
  color: var(--mf-bg);
  background: var(--mf-accent);
  border-radius: 12px;
  box-shadow: 0 6px 18px rgba(184, 168, 216, 0.35);
}

.mf-revived-chip {
  align-self: center;
  padding: 4px 12px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--mf-accent);
  background: var(--mf-accent-soft);
  border: 1px solid var(--mf-card-border);
  border-radius: 999px;
}

.mf-coin-offline-note {
  max-width: 100%;
  text-align: center;
  text-transform: none;
  letter-spacing: 0;
  font-weight: 600;
  color: var(--mf-ink-dim);
  background: var(--mf-surface-flat);
  white-space: normal;
}

.mf-summary {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px 14px;
  background: var(--mf-surface-flat);
  border: 1px solid var(--mf-faint);
  border-radius: 11px;
}

.mf-summary-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  font-size: 14px;
  color: var(--mf-ink-dim);
}

.mf-summary-value {
  font-size: 16px;
  font-weight: 700;
  color: var(--mf-ink);
  font-variant-numeric: tabular-nums;
}

.mf-summary-coinval {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.mf-summary-coin-icon {
  display: inline-flex;
}

.mf-summary-coin-icon svg {
  width: 15px;
  height: 15px;
  display: block;
}

.mf-btn-coin-icon {
  display: inline-flex;
  flex: 0 0 auto;
}

.mf-btn-coin-icon svg {
  width: 15px;
  height: 15px;
  display: block;
}

.mf-revive-bar-track {
  width: 100%;
  height: 8px;
  background: rgba(16, 19, 28, 0.6);
  border: 1px solid var(--mf-faint);
  border-radius: 999px;
  overflow: hidden;
}

.mf-revive-bar {
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, var(--mf-accent), var(--mf-up));
  border-radius: 999px;
}

.mf-revive-bar-shrink {
  width: 0%;
  transition: width 5000ms linear;
}

.mf-toast-root {
  position: absolute;
  left: 50%;
  bottom: max(16px, env(safe-area-inset-bottom));
  z-index: 40;
  transform: translateX(-50%);
  display: flex;
  justify-content: center;
  width: 100%;
  pointer-events: none;
  padding: 0 16px;
}

.mf-toast {
  max-width: 320px;
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 600;
  text-align: center;
  color: var(--mf-ink);
  background: rgba(16, 19, 28, 0.92);
  border: 1px solid var(--mf-card-border);
  border-radius: 999px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.5);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.mf-toast-show {
  opacity: 1;
  transform: translateY(0);
}

.mf-card-main .mf-title {
  min-height: 64px;
  padding: 0 76px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(19px, 5.6vw, 26px);
}

body.mf-short .mf-card-main .mf-title {
  min-height: 64px;
  font-size: clamp(17px, 5vw, 20px);
}

.mf-mascot {
  display: block;
  width: clamp(150px, 66vw, 300px);
  
  height: clamp(180px, 28vh, 250px);
  object-fit: contain;
  margin: 0 auto;
  image-rendering: auto;
}

.mf-gameover-mascot {
  width: 120px;
  height: 120px;
  object-fit: contain;
}

body.mf-short .mf-gameover-mascot {
  width: 96px;
  height: 96px;
}

.mf-pause-mascot {
  width: 96px;
  height: 96px;
  margin: 2px auto 10px;
}

.mf-hub {
  width: 100%;
  height: 100%;
  overflow-y: auto;
  
  scrollbar-gutter: stable;
  padding: 24px 16px max(24px, env(safe-area-inset-bottom));
  background: linear-gradient(160deg, var(--mf-bg) 0%, var(--mf-bg-2) 100%);
}

.mf-hub-title {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin-bottom: 22px;
  text-align: center;
}

.mf-hub-lockup {
  display: flex;
  align-items: center;
  gap: 9px;
}

.mf-hub-title img {
  width: auto;
}

.mf-hub-mark {
  height: 30px;
}

.mf-hub-word {
  display: flex;
  align-items: baseline;
  gap: 5px;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0.3px;
}

.mf-hub-title h1 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  color: var(--mf-ink);
}

.mf-hub-tools {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  gap: 10px;
  max-width: 720px;
  margin: 0 auto 16px;
  padding: 12px 0;
  align-items: center;
  background: var(--mf-bg);
  box-shadow: 0 8px 14px -10px rgba(0, 0, 0, 0.7);
}

.mf-hub-back {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  padding: 0;
  color: var(--mf-ink);
  background: var(--mf-surface);
  border: 1px solid var(--mf-card-border);
  border-radius: 12px;
  cursor: pointer;
}

.mf-hub-back:active {
  background: var(--mf-bg-2);
}

.mf-hub-search {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 42px;
  padding: 10px 14px;
  font-family: inherit;
  font-size: 15px;
  color: var(--mf-ink);
  background: var(--mf-surface);
  border: 1px solid var(--mf-card-border);
  border-radius: 12px;
  outline: none;
}

.mf-hub-search::placeholder {
  color: var(--mf-ink-dim);
}

.mf-hub-search:focus {
  border-color: var(--mf-accent);
}

.mf-hub-favchip {
  flex: 0 0 auto;
  min-height: 42px;
  padding: 0 14px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  color: var(--mf-ink-dim);
  background: var(--mf-surface);
  border: 1px solid var(--mf-card-border);
  border-radius: 12px;
  cursor: pointer;
}

.mf-hub-favchip.on {
  color: var(--mf-gold);
  border-color: var(--mf-gold);
}

.mf-hub-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 28px;
  margin-top: 2px;
}

.mf-hub-card-art .mf-hub-meta {
  margin: 0 14px 8px;
}

.mf-hub-fav {
  order: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  margin-left: -4px;
  padding: 0;
  color: var(--mf-ink-dim);
  background: transparent;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: color 0.12s ease, background 0.12s ease;
}

.mf-hub-fav.on {
  color: var(--mf-gold);
}

@media (hover: hover) {
  .mf-hub-fav:hover {
    color: var(--mf-ink);
    background: rgba(255, 255, 255, 0.06);
  }

  .mf-hub-fav.on:hover {
    color: var(--mf-gold);
  }
}

.mf-hub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
  max-width: 720px;
  margin: 0 auto;
}

.mf-hub-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 16px;
  text-decoration: none;
  background: var(--mf-surface);
  border: 1px solid var(--mf-card-border);
  border-left: 3px solid var(--mf-accent);
  border-radius: var(--mf-radius);
  transition: transform 0.1s ease, background 0.15s ease, box-shadow 0.2s ease;
}

.mf-hub-card:hover {
  background: rgba(28, 34, 48, 0.96);
  transform: translateY(-2px);
}

.mf-hub-card strong {
  font-size: 15px;
  font-weight: 700;
  color: var(--mf-ink);
}

.mf-hub-card span {
  font-size: 12px;
  line-height: 1.4;
  color: var(--mf-ink-dim);
}

.mf-hub-card-art {
  padding: 0;
  gap: 0;
  overflow: hidden;
}

.mf-hub-card-art img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-bottom: 1px solid var(--mf-card-border);
}

.mf-hub-card-art strong {
  margin: 10px 14px 2px;
}

.mf-hub-card-art span {
  margin: 10px 14px 6px;
}

.mf-hub-card-art .mf-hub-card-title {
  position: absolute;
  top: 8px;
  left: 12px;
  margin: 0;
  padding: 0 0 4px;
  width: max-content;
  max-width: calc(100% - 24px);
  font-size: 15px;
  font-weight: 800;
  line-height: 1.15;
  color: #fff;
  letter-spacing: 0.2px;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.75), 0 0 2px rgba(0, 0, 0, 0.6);
  border-bottom: 3px solid var(--mf-card-accent, #fff);
  z-index: 2;
  pointer-events: none;
}

.mf-hub-card-art:has(.mf-hub-card-title)::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 46%;
  background: linear-gradient(180deg, rgba(8, 11, 18, 0.62) 0%, rgba(8, 11, 18, 0) 100%);
  z-index: 1;
  pointer-events: none;
}

.mf-hub-crowns {
  order: 2;
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 11px;
  font-weight: 800;
  color: var(--mf-gold);
}

.mf-hub-card-crowned {
  border-color: var(--mf-gold);
  box-shadow: 0 0 18px rgba(255, 215, 94, 0.45);
}

.mf-invite-progress {
  font-size: 16px;
  font-weight: 800;
  color: var(--mf-ink);
}

.mf-invite-reward {
  font-size: 13px;
  font-weight: 600;
  color: var(--mf-ink-dim);
}

.mf-invite-reward-on {
  color: var(--mf-gold);
}

.mf-invite-link {
  padding: 10px 12px;
  font-size: 12px;
  word-break: break-all;
  user-select: all;
  color: var(--mf-accent);
  background: rgba(16, 19, 28, 0.5);
  border: 1px solid var(--mf-faint);
  border-radius: 10px;
}

@media (max-width: 560px) {
  .mf-card {
    width: 100%;
    border-radius: 16px;
  }

  #menu-root {
    padding: 12px;
    align-items: stretch;
  }

  .mf-title {
    font-size: 21px;
  }
}

@media (max-height: 420px) {
  .mf-card {
    padding-top: 14px;
    padding-bottom: 14px;
  }
}

:root[data-theme="day"] .mf-subtitle {
  color: #5c5850;
}

:root[data-theme="day"] .mf-btn-primary {
  background: linear-gradient(135deg, #a8324f 0%, #880e4f 100%);
  box-shadow: 0 8px 20px rgba(136, 14, 79, 0.28);
}

:root[data-theme="day"] .mf-btn-primary:hover {
  background: linear-gradient(135deg, #b53d5a 0%, #98185c 100%);
}

:root[data-theme="day"] .mf-dim {
  background: rgba(44, 42, 38, 0.40);
}

:root[data-theme="day"] .mf-card {
  box-shadow: 0 10px 30px rgba(80, 60, 30, 0.12),
    0 2px 8px rgba(80, 60, 30, 0.06);
}

:root[data-theme="day"] .mf-corner-stat .mf-corner-stat-unit {
  color: #716a60;
}

:root[data-theme="day"] .mf-ad-status {
  box-shadow: 0 6px 18px rgba(80, 60, 30, 0.18);
}

:root[data-theme="day"] .mf-toggle-group {
  background: #f1eee7;
  border-color: #e6e2d9;
}

:root[data-theme="day"] .mf-newbest {
  background: rgba(78, 125, 47, 0.12);
  border-color: rgba(78, 125, 47, 0.30);
}

:root[data-theme="day"] .mf-revive-bar-track {
  background: rgba(44, 42, 38, 0.10);
}

:root[data-theme="day"] .mf-brand-mire {
  color: #d96f8a;
}

:root[data-theme="day"] .mf-brand-games {
  color: #b8b0c2;
}

:root[data-theme="day"] .mf-icon-btn,
:root[data-theme="day"] .mf-link-btn {
  background: rgba(136, 14, 79, 0.06);
}

:root[data-theme="day"] .mf-icon-btn-primary,
:root[data-theme="day"] .mf-icon-btn-primary:hover {
  color: var(--mf-bg);
  background: var(--mf-accent);
  border-color: var(--mf-accent);
}

:root[data-theme="day"] .mf-active-chip {
  background: rgba(78, 125, 47, 0.12);
  border-color: rgba(78, 125, 47, 0.30);
}

:root[data-theme="day"] .mf-chip-timed {
  color: var(--mf-gold);
  background: rgba(240, 180, 41, 0.16);
  border-color: rgba(240, 180, 41, 0.45);
}

:root[data-theme="day"] .mf-chip-invite {
  background: rgba(52, 44, 66, 0.06);
  border-color: var(--mf-faint);
}

:root[data-theme="day"] .mf-item-preview {
  background: #f1eee7;
}

:root[data-theme="day"] .mf-pause-btn {
  background: rgba(18, 22, 30, 0.5);
  color: #eef1f7;
  border-color: rgba(255, 255, 255, 0.16);
}

:root[data-theme="day"] .mf-pause-btn:active {
  background: rgba(18, 22, 30, 0.66);
}

:root[data-theme="day"] .mf-coin-hud {
  background: rgba(18, 22, 30, 0.5);
  border-color: rgba(255, 255, 255, 0.16);
}

:root[data-theme="day"] .mf-lang-list {
  background: #f1eee7;
}

:root[data-theme="day"] .mf-lang-option {
  background: rgba(136, 14, 79, 0.06);
}

:root[data-theme="day"] .mf-howto-score-row {
  background: #f1eee7;
}

:root[data-theme="day"] .mf-toast {
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 6px 18px rgba(80, 60, 30, 0.18);
}

:root[data-theme="day"] .mf-invite-link {
  background: #f1eee7;
}

:root[data-theme="day"] .mf-hub-tools {
  box-shadow: 0 8px 14px -10px rgba(80, 60, 30, 0.45);
}

:root[data-theme="day"] .mf-hub-card:hover {
  background: #fbfaf6;
}

@media (max-height: 800px) {
  .mf-card {
    padding: 14px;
    gap: 10px;
  }

  .mf-list {
    gap: 5px;
  }

  .mf-list-row {
    padding: 4px 8px;
    gap: 8px;
  }

  .mf-item-preview {
    width: 32px;
    height: 32px;
  }

  .mf-list-row > .mf-btn,
  .mf-list-row > .mf-active-chip {
    min-height: 44px;
  }

  .mf-list-row > .mf-btn {
    padding: 8px 10px;
  }
}

@media (max-height: 700px) {
  .mf-card {
    padding: 10px;
    gap: 6px;
  }

  .mf-list {
    gap: 3px;
  }

  .mf-list-row {
    padding: 3px 8px;
  }

  .mf-list-row .mf-list-desc .mf-list-hint {
    display: none;
  }

  .mf-item-preview {
    width: 30px;
    height: 30px;
  }

  .mf-list-row > .mf-btn,
  .mf-list-row > .mf-active-chip {
    min-height: 42px;
  }
}

#menu-root {
  padding: 0;
}

#menu-root > .mf-card {
  width: 100%;
  max-width: none;
  height: 100%;
  margin: 0;
  border-radius: 0;
}

#menu-root > .mf-card {
  justify-content: safe center;
}

.mf-brand-lockup {
  height: 100%;
  aspect-ratio: 1448 / 1086;
  background: url("assets/brand/mire-games-logo.svg") center / contain no-repeat;
}

.mf-brand-strip,
body.mf-short .mf-brand-strip {
  height: 44px;
}

#menu-root > .mf-card > .mf-brand-strip {
  display: none;
}

.mf-icon-art {
  object-fit: contain;
  
  color: inherit;
}

.mf-coin-hud {
  display: none;
}

.mf-shell,
body {
  
  background: linear-gradient(160deg, var(--mf-bg) 0%, var(--mf-bg-2) 100%);
  background-attachment: fixed;
}

:root,
:root[data-theme="day"],
:root[data-theme="dark"] {
  
  --mf-bg: #12203a;
  --mf-bg-2: #0a1424;
  
  --mf-surface: rgba(44, 68, 110, 0.72);
  --mf-surface-flat: rgba(22, 38, 64, 0.72);
  
  --mf-ink: #f3f7ff;
  
  --mf-ink-dim: #a4b6d6;
  --mf-faint: rgba(200, 224, 255, 0.14);
  
  --mf-accent: #6ad2b0;
  --mf-accent-soft: rgba(106, 210, 176, 0.16);
  --mf-danger: #ff5d6c;
  --mf-up: #7ce0bc;
  --mf-card-border: rgba(106, 210, 176, 0.26);
  --mf-gold: #ffd35a;
  --mf-brand-ink: #f3f7ff;
  --mf-radius: 20px;

  --mf-primary-a: #34ad8b;
  --mf-primary-b: #195245;
  --mf-primary-base: #14493c;
  --mf-primary-ink: #f1fffa;

  --mf-secondary-a: #253d61;
  --mf-secondary-b: #17273f;

  --mf-raised-a: #1f3556;
  --mf-raised-b: #111c31;
  --mf-line: rgba(106, 210, 176, 0.26);
  --mf-line-strong: rgba(106, 210, 176, 0.28);

  --mf-danger-a: #f04d5c;
  --mf-danger-b: #ad2734;
  --mf-danger-base: #7e1b26;

  --mf-title-a: #f6fffb;
  --mf-title-b: #b7f0da;
  --mf-title-c: #6ad2b0;
  --mf-title-edge: rgba(6, 13, 24, 0.85);
  --mf-icon-edge: rgba(6, 13, 24, 0.7);
  --mf-subtitle: #9fb0cf;
  
  --mf-share-a: #7d5aa8;
  --mf-share-b: #5a3f80;
  --mf-share-ink: #f7f2ff;
  --mf-share-dim: #cfc0ea;
  --mf-share-line: rgba(125, 90, 168, 0.78);
}

#menu-root > .mf-card {
  
  background: linear-gradient(160deg, var(--mf-bg) 0%, var(--mf-bg-2) 100%);
  border: 0;
  box-shadow: none;
}

.mf-shell {
  --mf-usable-h: calc(100dvh - var(--mf-safe-top, 0px) - var(--mf-safe-bottom, 0px));
}

#menu-root > .mf-card-main .mf-card-body {
  min-height: 0;
}

#menu-root > .mf-card .mf-mascot {
  width: min(82vw, 380px);
  height: auto;
  max-height: calc(0.42 * var(--mf-usable-h, 100dvh));
  
  flex: 0 1 auto;
  min-height: 0;
  object-fit: contain;
  
  filter: drop-shadow(0 18px 26px rgba(0, 0, 0, 0.45));
}

:root:root .mf-btn.mf-btn-primary {
  background: linear-gradient(180deg, var(--mf-primary-a) 0%, var(--mf-primary-b) 100%);
  border: 0;
  box-shadow: 0 6px 0 0 var(--mf-primary-base), 0 10px 18px rgba(0, 0, 0, 0.35);
  color: var(--mf-primary-ink);
  font-size: 20px;
  letter-spacing: 0.3px;
  padding-block: 16px;
}

:root:root .mf-btn.mf-btn-primary:active {
  transform: translateY(3px);
  box-shadow: 0 3px 0 0 var(--mf-primary-base), 0 6px 12px rgba(0, 0, 0, 0.35);
}

#menu-root .mf-link-btn {
  background: var(--mf-surface);
  border: 1px solid var(--mf-card-border);
  color: var(--mf-ink);
  padding-block: 12px;
}

#menu-root .mf-stat,
#menu-root .mf-stat-podium {
  background: var(--mf-surface-flat);
  border: 1px solid var(--mf-card-border);
  color: var(--mf-ink);
}

#menu-root .mf-title {
  color: var(--mf-ink);
  font-size: 30px;
}

#menu-root .mf-subtitle {
  color: var(--mf-ink-dim);
}

#menu-root .mf-mute-btn,
#menu-root .mf-icon-btn {
  background: var(--mf-surface);
  border: 1px solid var(--mf-card-border);
  color: var(--mf-ink);
}

.mf-icon-art {
  width: 26px;
  height: 26px;
}

:root:root .mf-btn.mf-btn-primary .mf-icon-art {
  width: 30px;
  height: 30px;
}

#menu-root .mf-stat-icon .mf-icon-art,
.mf-stat-icon .mf-icon-art {
  width: 28px;
  height: 28px;
}

#menu-root .mf-stat-icon,
.mf-stat-icon {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
}

#menu-root .mf-stat-icon.mf-stat-icon-art,
.mf-stat-icon.mf-stat-icon-art {
  width: 22px;
  height: 22px;
}

#overlay-root .mf-card {
  background: linear-gradient(180deg, var(--mf-raised-a) 0%, var(--mf-raised-b) 100%);
  border: 1px solid var(--mf-line-strong);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.55);
}

#overlay-root .mf-brand-lockup {
  background-image: url("assets/brand/mire-games-logo-light.svg");
  opacity: 0.55;
}

:root:root .mf-btn.mf-btn-danger {
  background: linear-gradient(180deg, var(--mf-danger-a) 0%, var(--mf-danger-b) 100%);
  border: 0;
  box-shadow: 0 5px 0 0 var(--mf-danger-base);
  color: var(--mf-primary-ink);
}

:root[data-theme="day"] .mf-howto-score-row,
:root[data-theme="day"] .mf-toggle-group,
:root[data-theme="day"] .mf-item-preview,
:root[data-theme="day"] .mf-invite-link,
:root[data-theme="day"] .mf-lang-list {
  background: var(--mf-surface-flat);
  border-color: var(--mf-card-border);
}

:root[data-theme="day"] .mf-toast {
  background: linear-gradient(180deg, var(--mf-raised-a) 0%, var(--mf-raised-b) 100%);
  border: 1px solid var(--mf-line);
  color: var(--mf-ink);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.5);
}

#menu-root > .mf-card {
  background-image: radial-gradient(
      120% 62% at 50% 34%,
      var(--mf-accent-soft) 0%,
      transparent 62%
    ),
    radial-gradient(
      130% 90% at 50% 50%,
      transparent 42%,
      rgba(0, 0, 0, 0.42) 100%
    ),
    linear-gradient(160deg, var(--mf-bg) 0%, var(--mf-bg-2) 100%);
}

:root:root .mf-btn {
  background: linear-gradient(180deg, var(--mf-secondary-a) 0%, var(--mf-secondary-b) 100%);
  border: 1px solid var(--mf-line);
  box-shadow: 0 5px 0 0 rgba(0, 0, 0, 0.38);
  border-radius: var(--mf-radius);
  color: var(--mf-ink);
  font-weight: 700;
  padding-block: 14px;
}

:root:root .mf-btn:active {
  transform: translateY(2px);
  box-shadow: 0 3px 0 0 rgba(0, 0, 0, 0.38);
}

:root:root .mf-title {
  font-weight: 900;
  font-size: clamp(30px, 8.5vw, 40px);
  letter-spacing: 0.5px;
  line-height: 1.08;
  background: linear-gradient(180deg, var(--mf-title-a) 0%, var(--mf-title-b) 55%, var(--mf-title-c) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 2px 0 var(--mf-title-edge))
    drop-shadow(0 6px 14px rgba(0, 0, 0, 0.6));
}

:root:root .mf-subtitle {
  color: var(--mf-subtitle);
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.7);
}

:root:root #menu-root > .mf-card:not(.mf-card-main) .mf-subtitle {
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.9), 0 0 12px rgba(0, 0, 0, 0.8), 0 2px 6px rgba(0, 0, 0, 0.7);
}

#overlay-root .mf-title {
  font-size: clamp(24px, 6.5vw, 30px);
}

@font-face {
  font-family: 'Fredoka';
  font-style: normal;
  font-weight: 600;
  font-display: block;
  src: url('assets/fonts/fredoka-600-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Fredoka';
  font-style: normal;
  font-weight: 600;
  font-display: block;
  src: url('assets/fonts/fredoka-600-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7,
    U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF,
    U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: 'Fredoka';
  font-style: normal;
  font-weight: 700;
  font-display: block;
  src: url('assets/fonts/fredoka-700-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Fredoka';
  font-style: normal;
  font-weight: 700;
  font-display: block;
  src: url('assets/fonts/fredoka-700-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7,
    U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF,
    U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root,
:root[data-theme="day"],
:root[data-theme="dark"] {
  --mf-font-display: 'Fredoka', var(--mf-font);
}

:root:root .mf-title,
:root:root .mf-btn,
:root:root .mf-link-btn,
:root:root .mf-stat strong,
:root:root .mf-podium-score,
:root:root .mf-board-score {
  font-family: var(--mf-font-display);
}

:root:root .mf-title {
  font-weight: 700;
  letter-spacing: 0.2px;
}

:root:root .mf-title {
  filter: drop-shadow(0 1px 0 var(--mf-icon-edge))
    drop-shadow(0 4px 12px rgba(0, 0, 0, 0.55));
}

#menu-root > .mf-card:not(.mf-card-main) .mf-title,
#overlay-root .mf-title {
  padding-block: 0.42em;
  margin-block: -0.42em;
}

#menu-root > .mf-card-main .mf-subtitle {
  display: none;
}

#menu-root > .mf-card-main [data-link-key="howto"] {
  position: absolute;
  top: calc(12px + var(--mf-safe-top, 0px));
  left: calc(12px + var(--mf-safe-left, 0px));
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
}

#menu-root > .mf-card-main [data-link-key="howto"] span {
  display: none;
}

#menu-root > .mf-card-main [data-link-key="language"] {
  flex: 0 0 auto;
  width: 64px;
  padding-inline: 0;
  gap: 0;
  justify-content: center;
}

#menu-root > .mf-card-main [data-link-key="language"] span {
  display: none;
}

#menu-root > .mf-card-main [data-link-key="invite"] {
  flex: 1 1 auto;
}

#menu-root > .mf-card-main .mf-stats-row .mf-stat {
  background: none;
  border: 0;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 4px 0;
}

#menu-root > .mf-card-main .mf-stat strong {
  font-size: 30px;
  line-height: 1;
  color: var(--mf-gold);
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.55);
}

#menu-root > .mf-card-main .mf-stat > span:last-child {
  font-size: 12px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--mf-ink-dim);
}

:root:root .mf-btn,
:root:root .mf-link-btn,
:root:root .mf-stat,
:root:root .mf-list-row,
:root:root .mf-lang-option {
  border-radius: var(--mf-radius);
}

:root:root .mf-btn,
:root:root .mf-link-btn {
  position: relative;
  overflow: hidden;
}

:root:root .mf-btn::after,
:root:root .mf-link-btn::after {
  content: '';
  position: absolute;
  inset: 0 0 auto 0;
  height: 1px;
  background: rgba(255, 255, 255, 0.14);
  pointer-events: none;
}

:root:root .mf-btn.mf-btn-primary::after {
  background: rgba(255, 255, 255, 0.34);
}

:root:root .mf-lang-option.mf-lang-active,
:root:root .mf-list-row.mf-row-equipped {
  border-color: var(--mf-accent);
  box-shadow: inset 0 0 0 1px var(--mf-accent-soft);
}

:root:root .mf-btn:disabled,
:root:root .mf-link-btn:disabled,
:root:root .mf-btn[aria-disabled='true'] {
  filter: saturate(0.45) brightness(0.72);
  box-shadow: none;
}

#overlay-root .mf-card .mf-mascot {
  display: none;
}

#menu-root > .mf-card-main .mf-mascot {
  animation: mf-hero-breathe 4.2s ease-in-out infinite;
  will-change: transform;
}

@keyframes mf-hero-breathe {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-6px);
  }
}

#menu-root > .mf-card-main .mf-btn-primary {
  animation: mf-primary-land 520ms cubic-bezier(0.22, 1.2, 0.36, 1) 180ms both;
}

@keyframes mf-primary-land {
  0% {
    transform: translateY(10px) scale(0.94);
    opacity: 0;
  }
  60% {
    transform: translateY(0) scale(1.03);
    opacity: 1;
  }
  100% {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}

:root:root .mf-link-btn:active {
  transform: translateY(2px) scale(0.985);
}

:root:root .mf-btn:active .mf-icon-art,
:root:root .mf-link-btn:active .mf-icon-art {
  transform: scale(0.92);
}

.mf-icon-art {
  transition: transform 120ms ease;
}

@media (prefers-reduced-motion: reduce) {
  #menu-root > .mf-card-main .mf-mascot,
  #menu-root > .mf-card-main .mf-btn-primary {
    animation: none;
  }
}

:root {
  --mf-corner: 76px;
  
  --mf-corner-clear: 12px;
}

#menu-root > .mf-card-main {
  padding-top: calc(var(--mf-corner) + var(--mf-corner-clear) + var(--mf-safe-top, 0px));
}

#menu-root > .mf-card {
  padding-top: calc(20px + var(--mf-safe-top, 0px));
  padding-bottom: calc(20px + var(--mf-safe-bottom, 0px));
  padding-left: calc(20px + var(--mf-safe-left, 0px));
  padding-right: calc(20px + var(--mf-safe-right, 0px));
}

#menu-root > .mf-card.mf-card-main.mf-card-main--profile {
  padding-top: calc(var(--mf-corner) + var(--mf-corner-clear) + var(--mf-safe-top, 0px));
}

#menu-root > .mf-card.mf-card-main--profile .mf-title {
  margin-inline: 0;
  max-width: 100%;
}

#menu-root > .mf-card:not(.mf-card-main) > .mf-card-body:has(> .mf-list) {
  min-height: 0;
}

#menu-root > .mf-card:not(.mf-card-main) > .mf-card-body > .mf-list {
  flex-shrink: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
}

#menu-root .mf-back-btn,
#menu-root .mf-mute-btn,
#menu-root .mf-icon-btn {
  top: calc(12px + var(--mf-safe-top, 0px));
}

#menu-root .mf-mute-btn {
  right: calc(12px + var(--mf-safe-right, 0px));
}

#menu-root .mf-back-btn,
#menu-root .mf-howto-btn {
  left: calc(12px + var(--mf-safe-left, 0px));
}

#menu-root .mf-back-btn,
#menu-root .mf-mute-btn,
#menu-root > .mf-card-main [data-link-key="howto"] {
  width: 64px;
  height: 64px;
  border-radius: 14px;
}

#menu-root .mf-back-btn .mf-link-icon,
#menu-root .mf-mute-btn .mf-link-icon,
#menu-root > .mf-card-main [data-link-key="howto"] .mf-link-icon {
  width: 32px;
  height: 32px;
}

#menu-root > .mf-card-main {
  justify-content: safe center;
}

#menu-root > .mf-card-main .mf-title {
  
  margin-inline: calc(var(--mf-corner) + 4px);
  max-width: calc(100% - 2 * (var(--mf-corner) + 4px));
  
  padding-inline: 0;
  
  overflow-wrap: anywhere;
  
  flex-shrink: 0;
  
  padding-block: 0.14em;
}

@media (max-height: 800px) {
  #menu-root > .mf-card-main .mf-mascot {
    max-height: calc(0.30 * var(--mf-usable-h, 100dvh));
    width: min(52vw, 240px);
  }

  :root:root .mf-title {
    font-size: clamp(22px, calc(0.052 * var(--mf-usable-h, 100dvh)), 30px);
  }

  #menu-root > .mf-card-main {
    gap: 6px;
    --mf-corner-clear: 6px;
    padding-bottom: 10px;
  }

  :root:root .mf-btn,
  :root:root .mf-link-btn {
    padding-block: 9px;
  }

  :root:root .mf-btn.mf-btn-primary {
    padding-block: 12px;
    font-size: 19px;
  }

  #menu-root > .mf-card-main .mf-stat strong {
    font-size: 24px;
  }
}

@media (max-height: 660px) {
  #menu-root > .mf-card-main .mf-mascot {
    max-height: calc(0.22 * var(--mf-usable-h, 100dvh));
    width: min(44vw, 190px);
  }

  #menu-root > .mf-card-main {
    gap: 4px;
  }

  :root:root {
    --mf-corner: 56px;
  }

  #menu-root .mf-back-btn,
  #menu-root .mf-mute-btn,
  #menu-root > .mf-card-main [data-link-key="howto"] {
    width: 48px;
    height: 48px;
  }

  #menu-root .mf-back-btn .mf-link-icon,
  #menu-root .mf-mute-btn .mf-link-icon,
  #menu-root > .mf-card-main [data-link-key="howto"] .mf-link-icon {
    width: 24px;
    height: 24px;
  }

  #menu-root > .mf-card-main .mf-stat strong {
    font-size: 20px;
  }
}

#menu-root > .mf-card-main .mf-card-body:has(> .mf-toggle-group) .mf-mascot {
  max-height: calc(0.34 * var(--mf-usable-h, 100dvh));
}

@media (max-height: 800px) {
  #menu-root > .mf-card-main .mf-card-body:has(> .mf-toggle-group) .mf-mascot {
    max-height: calc(0.24 * var(--mf-usable-h, 100dvh));
  }
}

@media (max-height: 660px) {
  #menu-root > .mf-card-main .mf-card-body:has(> .mf-toggle-group) .mf-mascot {
    max-height: calc(0.18 * var(--mf-usable-h, 100dvh));
  }
}

#menu-root > .mf-card-main .mf-toggle-group {
  padding-block: 2px;
}

@media (min-aspect-ratio: 1/1) {
  
  .mf-shell {
    max-width: min(100%, max(calc(100dvh * 0.5625), 360px));
  }

  #menu-root > .mf-card {
    max-width: min(100%, max(56vh, 360px));
    margin-inline: auto;
  }
}

:root {
  --mf-search-glyph: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round'><circle cx='10.5' cy='10.5' r='6.5'/><line x1='15.5' y1='15.5' x2='21' y2='21'/></svg>");
}

.mf-lang-search {
  padding: 4px 0 8px;
}

.mf-lang-search {
  position: relative;
}

.mf-lang-search::before {
  content: '';
  position: absolute;
  left: 12px;
  top: 50%;
  width: 18px;
  height: 18px;
  margin-top: -11px;
  background-color: var(--mf-ink-dim);
  -webkit-mask: var(--mf-search-glyph) center / contain no-repeat;
  mask: var(--mf-search-glyph) center / contain no-repeat;
  pointer-events: none;
}

.mf-lang-search-input {
  width: 100%;
  box-sizing: border-box;
  padding: 12px 12px 12px 40px;
  border-radius: var(--mf-radius);
  border: 1px solid var(--mf-card-border);
  background-color: var(--mf-surface-flat);
  color: var(--mf-ink);
  font-family: var(--mf-font);
  font-size: 15px;
  outline: none;
}

.mf-lang-search-input:focus {
  border-color: var(--mf-accent);
  box-shadow: 0 0 0 2px var(--mf-accent-soft);
}

.mf-lang-search-input::-webkit-search-cancel-button {
  -webkit-appearance: none;
  appearance: none;
}

:root:root .mf-lang-list {
  background: linear-gradient(180deg, var(--mf-raised-a) 0%, var(--mf-raised-b) 100%);
  border: 1px solid var(--mf-card-border);
  border-radius: var(--mf-radius);
  padding: 8px;
  max-height: min(calc(0.46 * var(--mf-usable-h, 100dvh)), 360px);
  overflow-y: auto;
  overscroll-behavior: contain;
}

:root:root .mf-lang-option {
  background: var(--mf-surface-flat);
  border: 1px solid transparent;
  color: var(--mf-ink);
  padding-block: 11px;
}

:root:root .mf-lang-option.mf-lang-active {
  border-color: var(--mf-accent);
  color: var(--mf-accent);
}

:root:root .mf-lang-search {
  position: sticky;
  top: -8px;
  z-index: 2;
  margin: -8px -8px 8px;
  padding: 8px;
  background: var(--mf-raised-a);
  border-bottom: 1px solid var(--mf-card-border);
  border-radius: var(--mf-radius) var(--mf-radius) 0 0;
  
  box-shadow: 0 7px 10px -7px rgba(0, 0, 0, 0.75);
}

:root:root .mf-about-row {
  display: grid;
  grid-template-columns: repeat(4, auto);
  justify-content: center;
  gap: 8px 16px;
  padding: 14px 0 2px;
  margin-top: auto;
}

:root:root .mf-about-row > :first-child {
  grid-column: 1 / -1;
  justify-self: center;
}

:root:root .mf-about-link {
  color: var(--mf-ink-dim);
  font-size: 13px;
  text-decoration: none;
  border-bottom: 1px solid var(--mf-faint);
  padding-bottom: 1px;
}

:root:root .mf-about-link:active {
  color: var(--mf-accent);
}

:root:root .mf-btn-ad::before {
  background-image: url("assets/icons/icon-adbadge.webp");
  width: 1.5em;
  height: 1.5em;
  flex: 0 0 auto;
}

.mf-btn-ad {
  -webkit-hyphens: auto;
  hyphens: auto;
  overflow-wrap: anywhere;
}

.mf-btn-row.mf-revive-actions {
  flex-wrap: wrap;
}

.mf-btn-row.mf-revive-actions > .mf-btn {
  flex: 1 1 auto;
}

:root:root .mf-links-row {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 10px;
  align-items: stretch;
}

:root:root .mf-links-row .mf-link-btn-trio {
  grid-column: span 2;
}

:root:root .mf-links-row [data-link-key="invite"] {
  grid-column: span 5;
}

:root:root .mf-links-row [data-link-key="language"] {
  grid-column: span 1;
  width: auto;
  min-width: 0;
}

#menu-root > .mf-card-main .mf-links-row [data-link-key="howto"] {
  grid-column: auto;
}

:root:root #overlay-root .mf-card .mf-brand-strip {
  display: none;
}

:root:root #overlay-root .mf-gameover-card .mf-brand-strip {
  display: flex;
}

html,
body,
.mf-shell {
  height: 100vh;
}

html,
body,
.mf-shell {
  height: 100dvh;
}

.mf-shell {
  --mf-usable-h: calc(100vh - var(--mf-safe-top, 0px) - var(--mf-safe-bottom, 0px));
}

@supports (height: 100dvh) {
  .mf-shell {
    --mf-usable-h: calc(100dvh - var(--mf-safe-top, 0px) - var(--mf-safe-bottom, 0px));
  }
}

#overlay-root .mf-icon-btn.mf-mute-btn,
#overlay-root .mf-icon-btn.mf-howto-btn {
  width: 44px;
  height: 44px;
  border-radius: 12px;
}

#overlay-root .mf-house-veil {
  position: absolute;
  inset: 0;
  background: #000;
  overflow: hidden;
  z-index: 40;
}

#overlay-root .mf-house-video,
#overlay-root .mf-house-poster {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
}

#overlay-root .mf-house-top {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: calc(10px + var(--mf-safe-top, 0px)) calc(12px + var(--mf-safe-right, 0px)) 10px
    calc(12px + var(--mf-safe-left, 0px));
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0));
  z-index: 3;
}

#overlay-root .mf-house-adtag {
  padding: 3px 8px;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.02em;
}

#overlay-root .mf-house-close {
  position: relative;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
}

#overlay-root .mf-house-close:disabled {
  cursor: default;
}

#overlay-root .mf-house-close svg {
  position: absolute;
  inset: 0;
  width: 44px;
  height: 44px;
  transform: rotate(-90deg);
}

#overlay-root .mf-house-close .mf-house-ring-track {
  stroke: rgba(255, 255, 255, 0.25);
}

#overlay-root .mf-house-close .mf-house-ring-fill {
  stroke: #fff;
}

#overlay-root .mf-house-close .mf-house-x {
  position: relative;
  font-size: 24px;
  line-height: 1;
  opacity: 0.3;
  transition: opacity 0.2s;
}

#overlay-root .mf-house-close.mf-house-can-close .mf-house-x {
  opacity: 1;
}

#overlay-root .mf-house-cta {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 18px calc(16px + var(--mf-safe-right, 0px)) calc(16px + var(--mf-safe-bottom, 0px))
    calc(16px + var(--mf-safe-left, 0px));
  background: linear-gradient(to top, rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0));
  z-index: 3;
}

#overlay-root .mf-house-icon {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}

#overlay-root .mf-house-get {
  min-width: 132px;
  height: 48px;
  padding: 0 24px;
  border: 0;
  border-radius: 24px;
  background: var(--mf-accent);
  color: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
}

#overlay-root .mf-house-get svg {
  width: 26px;
  height: 26px;
}

#overlay-root .mf-house-end {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
  background: #f7f8fa;
  z-index: 2;
}

#overlay-root .mf-house-end .mf-house-icon {
  width: 128px;
  height: 128px;
  border-radius: 28px;
}

#overlay-root .mf-house-end .mf-house-get {
  min-width: 168px;
  height: 56px;
  border-radius: 28px;
}

#overlay-root .mf-house-info {
  display: inline-flex;
  align-items: center;
  min-width: 44px;
  min-height: 44px;
  margin: 0;
  padding: 0;
  padding-inline-end: 12px;
  border: 0;
  background: none;
  color: #fff;
  font: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

#overlay-root .mf-house-info .mf-house-adtag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

#overlay-root .mf-house-infomark {
  display: inline-flex;
  width: 14px;
  height: 14px;
}

#overlay-root .mf-house-infomark svg {
  display: block;
  width: 14px;
  height: 14px;
}

#overlay-root .mf-house-info:active .mf-house-adtag,
#overlay-root .mf-house-info[aria-expanded="true"] .mf-house-adtag {
  background: rgba(255, 255, 255, 0.22);
  border-color: #fff;
}

#overlay-root .mf-house-info:focus {
  outline: none;
}

#overlay-root .mf-house-info:focus-visible .mf-house-adtag {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

#overlay-root .mf-house-veil.mf-house-info-open .mf-house-top {
  z-index: 5;
}

#overlay-root .mf-house-info-layer {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  box-sizing: border-box;
  padding: calc(64px + var(--mf-safe-top, 0px)) calc(12px + var(--mf-safe-right, 0px))
    calc(12px + var(--mf-safe-bottom, 0px)) calc(12px + var(--mf-safe-left, 0px));
  background: rgba(0, 0, 0, 0.62);
}

#overlay-root .mf-house-info-card {
  width: min(420px, 100%);
  max-height: 100%;
  margin: 0;
  padding: 18px;
  gap: 12px;
}

#overlay-root .mf-house-info-card:focus {
  outline: none;
}

.mf-house-info-card .mf-title {
  font-size: 20px;
  line-height: 1.25;
}

.mf-house-info-card .mf-card-body {
  gap: 10px;
}

:root:root #overlay-root .mf-house-info-card .mf-house-info-promo {
  margin: 0;
  font-size: 16px;
  line-height: 1.4;
  color: var(--mf-ink);
  text-wrap: balance;
}

.mf-house-info-card .mf-house-info-why {
  margin: 0;
  font-size: 13px;
  line-height: 1.45;
  color: var(--mf-ink-dim);
  text-align: center;
}

.mf-house-info-card .mf-house-info-thanks {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--mf-ink);
  text-align: center;
}

.mf-btn-row.mf-house-info-actions {
  flex-direction: column;
}

.mf-btn-row.mf-house-info-actions > .mf-btn {
  flex: 0 0 auto;
  width: 100%;
  min-height: 48px;
  white-space: normal;
  line-height: 1.25;
  text-align: center;
}

:lang(ja) .mf-house-info-card p,
:lang(zh) .mf-house-info-card p {
  line-break: strict;
}

:lang(ja) .mf-house-info-card p {
  word-break: auto-phrase;
}

.mf-profile-safety > .mf-legal-report {
  align-self: center;
  box-sizing: border-box;
  min-height: 32px;
  padding: 8px 6px;
  font-size: 13px;
}

.mf-ad-status {
  top: auto;
  left: 50%;
  right: auto;
  bottom: var(--gd-status-bottom, calc(min(18vw, 10.2vh) + 10px + var(--mf-safe-bottom, 0px)));
  transform: translateX(-50%);
  width: max-content;
  max-width: min(88%, 420px);
  padding: 8px 16px 8px 11px;
  gap: 8px;
  border-radius: 999px;
  background: rgba(255, 249, 238, 0.95);
  border: 1px solid rgba(214, 168, 76, 0.6);
  box-shadow: 0 6px 22px rgba(24, 14, 6, 0.3);
  color: #3b2a20;
  font: 600 14px/1.3 system-ui, -apple-system, sans-serif;
  text-align: center;
  animation: mf-ad-status-in 0.26s ease-out;
  transition: opacity 0.26s ease-in, transform 0.26s ease-in;
}

.mf-ad-status.mf-ad-status--leaving {
  opacity: 0;
  transform: translate(-50%, 6px);
}

@keyframes mf-ad-status-in {
  from {
    opacity: 0;
    transform: translate(-50%, 8px);
  }
  to {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}

.mf-ad-status--info {
  border-color: rgba(214, 168, 76, 0.7);
  color: #3b2a20;
}

.mf-ad-status--wait {
  border-color: rgba(59, 42, 32, 0.2);
  color: #6b5446;
}

.mf-ad-status--good {
  border-color: rgba(46, 160, 84, 0.6);
  color: #1f5a33;
}

.mf-ad-status--bad {
  border-color: rgba(200, 70, 60, 0.55);
  color: #7a2a22;
}

.mf-ad-status.mf-ad-status--adfree::before {
  display: none;
}

.mf-ad-status.mf-ad-status--adfree {
  padding-left: 16px;
}

.gd-tray {
  position: absolute;
  top: var(--mf-pause-top);
  left: max(12px, var(--mf-safe-left, 0px));
  z-index: 20;
  box-sizing: border-box;
  height: var(--mf-pause-size);
  padding: 0 2px;
  display: none;
  align-items: center;
  border-radius: calc(var(--mf-pause-size) / 2);
  background: rgba(18, 22, 30, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.16);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  pointer-events: auto;
  touch-action: manipulation;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}

.gd-tray.gd-tray--live {
  display: flex;
}

.gd-tray.gd-tray--best-line {
  top: max(12px, var(--mf-safe-top, 0px));
}

#game-shell.mf-run-hud-off .gd-tray {
  display: none;
}

.gd-medal {
  position: relative;
  flex: 0 0 auto;
  width: 44px;
  height: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  display: grid;
  place-items: center;
  cursor: pointer;
  outline: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.gd-medal-face,
.gd-medal-ring {
  grid-area: 1 / 1;
  border-radius: 50%;
}

.gd-medal-face {
  position: relative;
  width: 38px;
  height: 38px;
  overflow: hidden;
  box-shadow: 0 2px 3px rgba(0, 0, 0, 0.5);
  transition: transform 0.18s ease, opacity 0.25s ease;
}

.gd-medal-canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.gd-medal:active .gd-medal-face {
  transform: scale(0.9);
}

.gd-medal:focus-visible .gd-medal-ring {
  box-shadow: 0 0 0 2px #fff3e4;
}

.gd-medal-ring {
  width: 44px;
  height: 44px;
  pointer-events: none;
}

.gd-medal[data-state="locked"] .gd-medal-ring,
.gd-medal[data-state="idle"] .gd-medal-ring {
  background: conic-gradient(rgba(255, 216, 102, 0.9) calc(var(--gd-p, 0) * 1turn), rgba(255, 243, 228, 0.14) 0);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 2.5px));
  mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 2.5px));
}

.gd-medal[data-state="idle"] .gd-medal-ring {
  background: rgba(255, 243, 228, 0.3);
}

.gd-medal[data-state="offer"] .gd-medal-ring {
  box-shadow: 0 0 10px 1px rgba(255, 216, 102, 0.55);
  animation: gd-offer-glow 2.4s ease-in-out infinite;
}

.gd-medal[data-state="offer"] .gd-medal-face::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: linear-gradient(115deg, transparent 32%, rgba(255, 255, 255, 0.75) 48%, transparent 62%) no-repeat;
  background-size: 260% 100%;
  animation: gd-shimmer 3.2s ease-in-out infinite;
}

.gd-medal[data-state="watching"] .gd-medal-face {
  opacity: 0.7;
}

.gd-medal[data-state="watching"] .gd-medal-ring {
  box-sizing: border-box;
  border: 2.5px solid rgba(255, 216, 102, 0.22);
  border-top-color: #ffd866;
  animation: gd-spin 0.9s linear infinite;
}

.gd-medal[data-helper="swap"] {
  --gd-glow: rgba(111, 179, 199, 0.75);
}

.gd-medal[data-helper="needle"] {
  --gd-glow: rgba(240, 107, 63, 0.75);
}

.gd-medal[data-helper="spring"] {
  --gd-glow: rgba(143, 93, 240, 0.8);
}

.gd-medal[data-state="ready"] .gd-medal-ring {
  box-shadow: 0 0 0 1.5px rgba(255, 216, 102, 0.85), 0 0 12px 2px var(--gd-glow);
  animation: gd-breathe 2.2s ease-in-out infinite;
}

.gd-medal.gd-medal--blocked[data-state="ready"] .gd-medal-ring {
  box-shadow: 0 0 0 1.5px rgba(255, 216, 102, 0.4);
  animation: none;
}

.gd-medal[data-state="armed"] .gd-medal-face {
  transform: scale(1.08);
}

.gd-medal[data-state="armed"] .gd-medal-ring {
  box-shadow: 0 0 0 2px #fff3e4, 0 0 16px 5px var(--gd-glow);
  animation: gd-armed 1.1s ease-in-out infinite;
}

.gd-medal[data-state="used"] .gd-medal-face {
  opacity: 0.75;
}

.gd-medal-badge {
  position: absolute;
  right: 0;
  bottom: 3px;
  width: 17px;
  height: 17px;
  display: none;
  pointer-events: none;
  background: center / contain no-repeat;
}

.gd-medal[data-state="offer"] .gd-medal-badge,
.gd-medal[data-state="watching"] .gd-medal-badge {
  display: block;
  background-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><rect x='2.5' y='3' width='19' height='18' rx='3' fill='%232a2300'/><g fill='%23ffd75e'><rect x='4' y='5.2' width='1.7' height='1.7' rx='.4'/><rect x='4' y='9' width='1.7' height='1.7' rx='.4'/><rect x='4' y='12.8' width='1.7' height='1.7' rx='.4'/><rect x='4' y='16.6' width='1.7' height='1.7' rx='.4'/><rect x='18.3' y='5.2' width='1.7' height='1.7' rx='.4'/><rect x='18.3' y='9' width='1.7' height='1.7' rx='.4'/><rect x='18.3' y='12.8' width='1.7' height='1.7' rx='.4'/><rect x='18.3' y='16.6' width='1.7' height='1.7' rx='.4'/><path d='M10 8.5 L10 15.5 L15.5 12 Z'/></g></svg>");
}

.gd-tray--adfree .gd-medal[data-state="offer"] .gd-medal-badge,
.gd-tray--adfree .gd-medal[data-state="watching"] .gd-medal-badge {
  display: none;
}

.gd-medal[data-state="armed"] .gd-medal-badge {
  display: block;
  top: 1px;
  bottom: auto;
  background-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><circle cx='12' cy='12' r='10.5' fill='%232a1f1a' stroke='%23fff3e4' stroke-width='1.6'/><path d='M8.5 8.5l7 7M15.5 8.5l-7 7' stroke='%23fff3e4' stroke-width='2.4' stroke-linecap='round'/></svg>");
}

.gd-medal[data-state="used"] .gd-medal-badge {
  display: block;
  background-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><circle cx='12' cy='12' r='10.5' fill='%232a1f1a' stroke='%23ffd866' stroke-width='1.6'/><path d='M7.5 12.4l3 3 6-6.4' fill='none' stroke='%23ffd866' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/></svg>");
}

.gd-tray--offline .gd-medal[data-state="idle"] .gd-medal-badge {
  display: block;
  background-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><circle cx='12' cy='12' r='10.5' fill='%232a1f1a' stroke='%23c4ab95' stroke-width='1.4'/><path d='M8 15.5h8a2.6 2.6 0 0 0 .3-5.2 3.6 3.6 0 0 0-6.9-.9A2.9 2.9 0 0 0 8 15.5z' fill='none' stroke='%23c4ab95' stroke-width='1.6' stroke-linejoin='round'/><path d='M6.5 6.5l11 11' stroke='%23ff9d8f' stroke-width='1.8' stroke-linecap='round'/></svg>");
}

.gd-medal-count {
  position: absolute;
  top: -1px;
  right: -3px;
  box-sizing: border-box;
  min-width: 20px;
  height: 17px;
  padding: 0 4px;
  display: none;
  border-radius: 9px;
  background: #2a1f1a;
  border: 1.5px solid #ffd866;
  color: #fff3e4;
  font: 700 11px/14px 'Fredoka', system-ui, sans-serif;
  letter-spacing: 0.01em;
  text-align: center;
  white-space: nowrap;
  direction: ltr;
  unicode-bidi: isolate;
  pointer-events: none;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.gd-medal.gd-medal--counted .gd-medal-count {
  display: block;
}

.gd-tip {
  position: absolute;
  left: 12px;
  top: 0;
  z-index: 21;
  box-sizing: border-box;
  width: max-content;
  max-width: calc(100vw - 24px);
  padding: calc(6px * var(--gd-tip-scale, 1)) calc(11px * var(--gd-tip-scale, 1)) calc(7px * var(--gd-tip-scale, 1));
  border-radius: calc(12px * var(--gd-tip-scale, 1));
  background: #161a22;
  border: 1px solid var(--gd-tip-line, rgba(255, 216, 102, 0.8));
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5);
  color: #fff3e4;
  font: 600 calc(13px * var(--gd-tip-scale, 1)) / 1.3 system-ui, -apple-system, sans-serif;
  text-align: start;
  text-wrap: balance;
  overflow-wrap: break-word;
  hyphens: auto;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0s linear 0.2s;
}

.gd-tip.gd-tip--up {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.gd-tip::before {
  content: '';
  position: absolute;
  top: -6px;
  left: calc(var(--gd-tip-caret, 22px) - 6px);
  width: 10px;
  height: 10px;
  background: #161a22;
  border-left: 1px solid var(--gd-tip-line, rgba(255, 216, 102, 0.8));
  border-top: 1px solid var(--gd-tip-line, rgba(255, 216, 102, 0.8));
  transform: rotate(45deg);
}

.gd-tip[data-helper="swap"] {
  --gd-tip-line: rgba(111, 179, 199, 0.95);
}

.gd-tip[data-helper="needle"] {
  --gd-tip-line: rgba(240, 107, 63, 0.95);
}

.gd-tip[data-helper="spring"] {
  --gd-tip-line: rgba(143, 93, 240, 0.95);
}

#game-shell.mf-run-hud-off .gd-tip {
  display: none;
}

.gd-tip.gd-tip--compact {
  padding: 4px 9px 5px;
  font-size: calc(12px * var(--gd-tip-scale, 1));
  line-height: 1.25;
}

.gd-tip.gd-tip--tight {
  padding: 3px 8px 4px;
  font-size: calc(11px * var(--gd-tip-scale, 1));
  line-height: 1.2;
}

.mf-howto-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
  vertical-align: -6px;
  font-weight: 700;
}

.mf-howto-chip-icon {
  flex: 0 0 auto;
  display: block;
  border-radius: 50%;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
}

@media (prefers-reduced-motion: reduce) {
  .gd-tip,
  .gd-tip.gd-tip--up {
    transform: none;
    transition: opacity 0.12s linear, visibility 0s linear 0.12s;
  }

  .gd-tip.gd-tip--up {
    transition: opacity 0.12s linear;
  }
}

@keyframes gd-shimmer {
  0% {
    background-position: 160% 0;
  }
  40%,
  100% {
    background-position: -60% 0;
  }
}

@keyframes gd-offer-glow {
  0%,
  100% {
    box-shadow: 0 0 6px 0 rgba(255, 216, 102, 0.4);
  }
  50% {
    box-shadow: 0 0 14px 3px rgba(255, 216, 102, 0.7);
  }
}

@keyframes gd-breathe {
  0%,
  100% {
    opacity: 0.7;
  }
  50% {
    opacity: 1;
  }
}

@keyframes gd-armed {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
}

@keyframes gd-spin {
  to {
    transform: rotate(360deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .gd-medal-ring,
  .gd-medal-face::after {
    animation: none !important;
  }
}

#menu-root > .mf-card,
#overlay-root .mf-card,
#overlay-root .mf-overlay {
  overflow-x: hidden;
  overscroll-behavior: contain;
}

#menu-root > .mf-card.mf-lang-panel {
  height: 100%;
  justify-content: flex-start;
}

#menu-root > .mf-card.mf-lang-panel .mf-card-body {
  flex: 1 1 auto;
  min-height: 0;
}

#menu-root > .mf-card.mf-lang-panel .mf-lang-list {
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
  margin-top: 0;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
}

#menu-root > .mf-card.mf-lang-panel .mf-lang-search {
  flex: 0 0 auto;
}

#menu-root > .mf-card.mf-lang-panel .mf-btn-row {
  flex: 0 0 auto;
}

:root:root .mf-links-row.mf-links-row--noads {
  grid-template-columns: repeat(12, 1fr);
}

:root:root .mf-links-row.mf-links-row--noads .mf-link-btn-trio {
  grid-column: span 4;
}

:root:root .mf-links-row.mf-links-row--noads [data-link-key="invite"],
:root:root .mf-links-row [data-link-key="noads"] {
  grid-column: span 5;
  min-width: 0;
  padding-inline: 8px;
}

:root:root .mf-links-row.mf-links-row--noads [data-link-key="language"] {
  grid-column: span 2;
}

#menu-root > .mf-card-main .mf-links-row--noads [data-link-key="invite"] span,
#menu-root > .mf-card-main [data-link-key="noads"] span:last-child {
  min-width: 0;
  white-space: normal;
  overflow-wrap: break-word;
  line-height: 1.1;
  text-align: center;
}

#menu-root > .mf-card-main .mf-links-row--noads [data-link-key="invite"],
#menu-root > .mf-card-main [data-link-key="noads"] {
  flex-direction: column;
  gap: 4px;
  padding: 10px 6px;
  font-size: 12px;
  line-height: 1.2;
}

.mf-noads-link-icon {
  display: inline-flex;
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
}

.mf-noads-link-icon .mf-noads-svg {
  width: 100%;
  height: 100%;
}

#menu-root > .mf-card.mf-noads-panel {
  justify-content: safe center;
}

.mf-noads-panel .mf-card-body {
  align-items: center;
  text-align: center;
  gap: 14px;
}

.mf-noads-mark {
  width: 96px;
  height: 96px;
  margin: 4px auto 2px;
  filter: drop-shadow(0 6px 16px rgba(0, 0, 0, 0.35));
}

.mf-noads-mark .mf-noads-svg {
  width: 100%;
  height: 100%;
}

.mf-noads-perks {
  list-style: none;
  margin: 0 auto;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  max-width: 360px;
  text-align: start;
}

.mf-noads-perk {
  position: relative;
  padding: 10px 14px 10px 44px;
  border-radius: 14px;
  background: var(--mf-surface);
  border: 1px solid var(--mf-card-border);
  color: var(--mf-ink);
  font: 600 15px/1.35 var(--mf-font);
}

.mf-noads-perk::before {
  content: '';
  position: absolute;
  left: 12px;
  top: 50%;
  width: 22px;
  height: 22px;
  margin-top: -11px;
  border-radius: 50%;
  background: var(--mf-gold);
}

.mf-noads-perk::after {
  content: '';
  position: absolute;
  left: 19px;
  top: 50%;
  width: 6px;
  height: 11px;
  margin-top: -8px;
  border: solid #3b2a20;
  border-width: 0 2.5px 2.5px 0;
  transform: rotate(45deg);
}

[dir="rtl"] .mf-noads-perk {
  padding: 10px 44px 10px 14px;
}

[dir="rtl"] .mf-noads-perk::before {
  left: auto;
  right: 12px;
}

[dir="rtl"] .mf-noads-perk::after {
  left: auto;
  right: 20px;
}

.mf-noads-status {
  margin: 0;
  max-width: 360px;
  font: 700 15px/1.35 var(--mf-font);
  color: var(--mf-ink);
}

.mf-noads-status[data-tone="good"] {
  color: #7be495;
}

.mf-noads-status[data-tone="bad"] {
  color: #ff9d8f;
}

.mf-noads-status[data-tone="wait"] {
  color: var(--mf-ink-dim);
}

#menu-root > .mf-card.mf-noads-panel .mf-noads-buy {
  width: 100%;
  max-width: 360px;
  min-height: 56px;
  font-size: 18px;
}

#menu-root > .mf-card.mf-noads-panel .mf-noads-restore {
  width: auto;
  min-height: 40px;
  padding: 6px 14px;
  background: transparent;
  border: none;
  box-shadow: none;
  color: var(--mf-ink-dim);
  font: 600 14px/1.2 var(--mf-font);
  text-decoration: underline;
  text-underline-offset: 3px;
}

#menu-root > .mf-card.mf-noads-panel .mf-noads-restore::after {
  content: none;
}

#menu-root > .mf-card-main .mf-profile-chip {
  position: absolute;
  top: calc(22px + var(--mf-safe-top, 0px));
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-sizing: border-box;
  height: 44px;
  max-width: calc(100% - 2 * var(--mf-corner) - 16px - var(--mf-safe-left, 0px) - var(--mf-safe-right, 0px));
  margin: 0;
  padding: 0 16px 0 4px;
  border-radius: 999px;
  background: var(--mf-surface);
  border: 1px solid var(--mf-card-border);
  color: var(--mf-ink);
  font: 700 15px/1 var(--mf-font);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

#menu-root > .mf-card-main .mf-profile-chip:active {
  transform: translateX(-50%) scale(0.97);
}

.mf-profile-chip-face {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  overflow: hidden;
  box-sizing: border-box;
  border: 2px solid var(--mf-gold);
  background: var(--mf-surface-flat);
}

.mf-profile-chip-face img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.mf-profile-chip-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mf-profile-chip--empty .mf-profile-chip-name {
  color: var(--mf-accent);
}

.mf-profile-chip--nudge .mf-profile-chip-face {
  animation: mf-profile-nudge 1.8s ease-in-out infinite;
}

@keyframes mf-profile-nudge {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(255, 216, 102, 0.55);
  }
  50% {
    box-shadow: 0 0 0 7px rgba(255, 216, 102, 0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .mf-profile-chip--nudge .mf-profile-chip-face {
    animation: none;
    box-shadow: 0 0 0 3px rgba(255, 216, 102, 0.6);
  }
}

@media (max-height: 660px) {
  #menu-root > .mf-card-main .mf-profile-chip {
    top: calc(14px + var(--mf-safe-top, 0px));
  }
}

#menu-root > .mf-card.mf-profile-panel {
  height: 100%;
  justify-content: flex-start;
}

#menu-root > .mf-card.mf-profile-panel .mf-card-body {
  flex: 1 0 auto;
  min-height: 0;
  gap: 10px;
}

#menu-root > .mf-card.mf-profile-panel .mf-btn-row {
  flex: 0 0 auto;
}

.mf-profile-head {
  flex: 0 0 auto;
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.mf-profile-facecol {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding-top: 4px;
}

.mf-profile-face {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  overflow: hidden;
  box-sizing: border-box;
  border: 3px solid var(--mf-gold);
  background: var(--mf-surface-flat);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35);
}

.mf-profile-face img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.mf-profile-tag {
  padding: 4px 9px;
  border-radius: 999px;
  background: var(--mf-surface-flat);
  border: 1px solid var(--mf-faint);
  font: 700 13px/1 var(--mf-font);
  letter-spacing: 0.5px;
  color: var(--mf-ink);
  font-variant-numeric: tabular-nums;
}

.mf-profile-form {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0;
}

.mf-profile-label {
  font: 600 13px/1.2 var(--mf-font);
  color: var(--mf-ink-dim);
}

.mf-profile-input {
  width: 100%;
  box-sizing: border-box;
  min-height: 48px;
  padding: 10px 14px;
  border-radius: 14px;
  border: 1px solid var(--mf-card-border);
  background: var(--mf-surface-flat);
  color: var(--mf-ink);
  font: 600 17px/1.2 var(--mf-font);
  outline: none;
  -webkit-user-select: text;
  user-select: text;
  touch-action: manipulation;
}

.mf-profile-input::placeholder {
  color: var(--mf-ink-dim);
  opacity: 0.75;
}

.mf-profile-input:focus {
  border-color: var(--mf-accent);
  box-shadow: 0 0 0 2px var(--mf-accent-soft);
}

.mf-profile-hint {
  min-height: 2.5em;
  font: 600 13px/1.25 var(--mf-font);
  color: var(--mf-ink-dim);
}

.mf-profile-hint[data-tone="bad"] {
  color: #ff9d8f;
}

.mf-profile-hint[data-tone="good"] {
  color: #7be495;
}

:root:root #menu-root .mf-profile-panel .mf-btn.mf-profile-save {
  width: 100%;
  min-height: 48px;
  padding-block: 10px;
  font-size: 17px;
}

.mf-profile-notice {
  flex: 0 0 auto;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 93, 77, 0.12);
  border: 1px solid rgba(255, 93, 77, 0.35);
  color: #ffc2b8;
  font: 600 13px/1.3 var(--mf-font);
}

.mf-profile-notice--flash {
  animation: mf-profile-notice-flash 0.7s ease-out;
}

@keyframes mf-profile-notice-flash {
  0% {
    transform: translateX(0);
    border-color: #ff5d4d;
  }
  20% {
    transform: translateX(-5px);
  }
  40% {
    transform: translateX(5px);
  }
  60% {
    transform: translateX(-3px);
  }
  100% {
    transform: translateX(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .mf-profile-notice--flash {
    animation: none;
    border-color: #ff5d4d;
  }
}

.mf-profile-section {
  flex: 0 0 auto;
  font: 700 13px/1 var(--mf-font);
  color: var(--mf-ink-dim);
}

.mf-profile-grid {
  position: relative;
  flex: 1 1 0;
  min-height: 140px;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  touch-action: pan-y;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(56px, 1fr));
  
  grid-auto-rows: max-content;
  align-content: start;
  gap: 8px;
  padding: 8px;
  border-radius: 16px;
  background: var(--mf-surface-flat);
  border: 1px solid var(--mf-faint);
}

@media (min-width: 700px) and (min-height: 900px) {
  .mf-profile-grid {
    grid-template-columns: repeat(auto-fill, minmax(76px, 1fr));
    gap: 10px;
    padding: 10px;
  }
}

.mf-profile-tile {
  aspect-ratio: 1;
  width: 100%;
  padding: 0;
  border-radius: 50%;
  box-sizing: border-box;
  border: 2px solid transparent;
  background: rgba(0, 0, 0, 0.25);
  overflow: hidden;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.mf-profile-tile img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.mf-profile-tile:active {
  transform: scale(0.94);
}

.mf-profile-tile--picked {
  border-color: var(--mf-gold);
  box-shadow: 0 0 0 3px rgba(255, 216, 102, 0.35);
}

.mf-profile-safety {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  gap: 2px;
  font: 500 12px/1.35 var(--mf-font);
  color: var(--mf-ink-dim);
  text-align: center;
}

.mf-board-name.mf-board-name--chosen {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.mf-board-name-text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mf-board-name-text--masked {
  color: var(--mf-ink-dim);
  letter-spacing: 1px;
}

.mf-board-tag {
  flex: 0 0 auto;
  font-size: 11px;
  font-weight: 600;
  color: var(--mf-ink-dim);
  font-variant-numeric: tabular-nums;
}

.mf-board-more {
  position: relative;
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid var(--mf-faint);
  background: transparent;
  color: var(--mf-ink-dim);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.mf-board-more::before {
  content: '';
  position: absolute;
  inset: -8px;
}

.mf-board-more-dots {
  font-size: 7px;
  letter-spacing: 1px;
  line-height: 1;
}

.mf-board-row.mf-board-row--open {
  border-color: var(--mf-accent);
}

.mf-board-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  padding: 2px 2px 6px;
}

.mf-board-action {
  min-height: 40px;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid var(--mf-card-border);
  background: var(--mf-surface);
  color: var(--mf-ink);
  font: 600 14px/1.1 var(--mf-font);
  cursor: pointer;
}

.mf-board-action--report {
  color: #ffc2b8;
  border-color: rgba(255, 93, 77, 0.45);
}

.mf-board-action:disabled {
  opacity: 0.6;
  cursor: default;
}

.mf-profile-nudge {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 16px;
  background: var(--mf-surface);
  border: 1px solid var(--mf-accent);
}

.mf-profile-nudge-text {
  font: 700 15px/1.3 var(--mf-font);
  color: var(--mf-ink);
  text-align: center;
}

.mf-profile-nudge-buttons {
  display: flex;
  gap: 8px;
}

:root:root .mf-profile-nudge .mf-btn,
:root:root .mf-profile-nudge .mf-btn.mf-btn-primary {
  flex: 1 1 0;
  min-width: 0;
  min-height: 44px;
  padding-block: 8px;
  font-size: 15px;
}

:root:root .mf-list-row.mf-goal-row {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 10px;
  min-height: 50px;
  flex-shrink: 0;
  overflow: hidden;
}

.mf-goal-row .mf-goal-crown {
  position: relative;
  width: 32px;
  height: 32px;
}

.mf-goal-row .mf-goal-crown[data-finish='stone'] {
  opacity: 0.72;
}

.mf-goal-crown-art {
  width: 28px;
  height: 28px;
}

.mf-goal-row .mf-list-label {
  font-size: 14px;
  line-height: 1.22;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  overflow-wrap: anywhere;
}

.mf-goal-side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 5px;
}

.mf-goal-count {
  font: 700 12.5px/1 var(--mf-font);
  font-variant-numeric: tabular-nums;
  color: var(--mf-ink-dim);
  white-space: nowrap;
}

.mf-goal-count.mf-goal-count-done {
  font-size: 11px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--mf-goal-tint);
}

.mf-goal-pips {
  display: flex;
  gap: 4px;
}

.mf-goal-pip {
  display: block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1.25px rgba(255, 243, 228, 0.22);
}

.mf-goal-pip.mf-goal-pip-on {
  background: radial-gradient(circle at 35% 30%, rgba(255, 255, 255, 0.7) 0 16%, transparent 46%), var(--mf-pip);
  box-shadow: 0 0 0 0.5px rgba(0, 0, 0, 0.4);
}

.mf-goal-pip.mf-goal-pip-next {
  box-shadow: inset 0 0 0 1.5px var(--mf-pip);
}

:root:root .mf-list-row.mf-goal-row.mf-goal-complete {
  border-color: rgba(191, 231, 247, 0.3);
  background: linear-gradient(90deg, rgba(191, 231, 247, 0.11), rgba(191, 231, 247, 0) 60%), var(--mf-surface-flat);
}

.mf-goal-crown[data-finish='diamond']::after,
.mf-goal-cheer-crown[data-finish='diamond']::after {
  content: '';
  position: absolute;
  top: 0;
  right: -1px;
  width: 10px;
  height: 10px;
  background: radial-gradient(circle, #ffffff 0 30%, #e6f7ff 60%);
  -webkit-clip-path: polygon(50% 0, 61% 39%, 100% 50%, 61% 61%, 50% 100%, 39% 61%, 0 50%, 39% 39%);
  clip-path: polygon(50% 0, 61% 39%, 100% 50%, 61% 61%, 50% 100%, 39% 61%, 0 50%, 39% 39%);
  opacity: 0;
  pointer-events: none;
  animation: mf-diamond-glint 5.2s ease-in-out infinite;
}

.mf-goal-row:nth-child(3n + 2) .mf-goal-crown[data-finish='diamond']::after {
  animation-delay: -1.7s;
}

.mf-goal-row:nth-child(3n + 3) .mf-goal-crown[data-finish='diamond']::after {
  animation-delay: -3.4s;
}

@keyframes mf-diamond-glint {
  0%,
  74%,
  100% {
    opacity: 0;
    transform: scale(0.3) rotate(0deg);
  }
  82% {
    opacity: 1;
    transform: scale(1) rotate(45deg);
  }
  90% {
    opacity: 0;
    transform: scale(0.4) rotate(90deg);
  }
}

@media (max-height: 700px) {
  :root:root .mf-list-row.mf-goal-row {
    min-height: 44px;
    column-gap: 8px;
  }

  .mf-goal-row .mf-goal-crown {
    width: 28px;
    height: 28px;
  }

  .mf-goal-crown-art {
    width: 25px;
    height: 25px;
  }

  .mf-goal-row .mf-list-label {
    font-size: 13px;
  }

  .mf-goal-side {
    gap: 4px;
  }
}

#overlay-root .mf-goal-cheer {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 14px 8px 12px;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(255, 216, 102, 0.15), rgba(255, 216, 102, 0.05));
  border: 1px solid rgba(255, 216, 102, 0.34);
  overflow: hidden;
  opacity: 0;
}

#overlay-root .mf-goal-cheer.mf-goal-cheer-in {
  opacity: 1;
  transition: opacity 180ms ease-out;
}

.mf-goal-cheer-crowns {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  padding-left: 2px;
}

.mf-goal-cheer-crown {
  position: relative;
  display: block;
  width: 34px;
  height: 34px;
  margin-inline-start: -8px;
  filter: drop-shadow(0 3px 5px rgba(0, 0, 0, 0.35));
}

.mf-goal-cheer-crown:first-child {
  margin-inline-start: 0;
}

.mf-goal-cheer-crown .mf-goal-crown-art {
  width: 34px;
  height: 34px;
  transition: transform 260ms cubic-bezier(0.22, 1.3, 0.36, 1);
}

.mf-goal-cheer-in .mf-goal-cheer-crown {
  animation: mf-crown-land 640ms cubic-bezier(0.22, 1.3, 0.36, 1) var(--mf-cheer-delay, 0ms) both;
}

.mf-goal-cheer-crown.mf-goal-cheer-focus {
  z-index: 2;
}

.mf-goal-cheer-crown.mf-goal-cheer-focus .mf-goal-crown-art {
  transform: scale(1.14);
}

.mf-goal-cheer-more {
  margin-inline-start: 4px;
  font: 800 12px/1 var(--mf-font);
  color: var(--mf-gold);
}

.mf-goal-cheer-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1 1 auto;
}

.mf-goal-cheer-title {
  font: 800 12px/1.2 var(--mf-font);
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--mf-gold);
}

.mf-goal-cheer-goal {
  font: 600 14px/1.25 var(--mf-font);
  color: var(--mf-ink);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.mf-goal-cheer-many .mf-goal-cheer-goal {
  min-height: 2.5em;
}

#overlay-root .mf-goal-cheer::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, 0.2) 50%, transparent 70%);
  transform: translateX(-120%);
  pointer-events: none;
}

#overlay-root .mf-goal-cheer.mf-goal-cheer-in::after {
  animation: mf-cheer-glint 1100ms ease-out 260ms both;
}

@media (max-width: 440px), (min-aspect-ratio: 1/1) and (max-height: 782px) {
  .mf-goal-cheer-crown,
  .mf-goal-cheer-crown .mf-goal-crown-art {
    width: 28px;
    height: 28px;
  }

  .mf-goal-cheer-crown {
    margin-inline-start: -9px;
  }

  #overlay-root .mf-goal-cheer {
    gap: 10px;
    padding-inline: 10px 12px;
  }

  #overlay-root .mf-goal-cheer-many .mf-goal-cheer-crown {
    margin-inline-start: -20px;
  }

  #overlay-root .mf-goal-cheer-many .mf-goal-cheer-crown:first-child {
    margin-inline-start: 0;
  }

  #overlay-root .mf-goal-cheer.mf-goal-cheer-many {
    gap: 8px;
    padding-inline: 10px;
  }
}

@keyframes mf-crown-land {
  0% {
    opacity: 0;
    transform: translateY(-16px) scale(0.55);
  }
  60% {
    opacity: 1;
    transform: translateY(2px) scale(1.08);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes mf-cheer-glint {
  to {
    transform: translateX(120%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .mf-goal-crown[data-finish='diamond']::after,
  .mf-goal-cheer-crown[data-finish='diamond']::after {
    animation: none;
    opacity: 0.85;
    transform: scale(0.8) rotate(45deg);
  }

  .mf-goal-cheer-in .mf-goal-cheer-crown,
  #overlay-root .mf-goal-cheer.mf-goal-cheer-in::after {
    animation: none;
  }
}

#menu-root > .mf-card.mf-invite-panel .mf-card-body {
  gap: 12px;
}

.mf-invite-panel .mf-invite-intro {
  font-size: 16px;
  font-weight: 600;
  color: var(--mf-ink);
}

.mf-invite-panel .mf-invite-how {
  margin: -4px 0 0;
  font-size: 13px;
  line-height: 1.45;
  color: var(--mf-ink-dim);
  text-align: center;
}

.mf-invite-codebox {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 10px 14px 12px;
  border: 1.5px dashed rgba(255, 216, 102, 0.45);
  border-radius: var(--mf-radius);
  background: var(--mf-surface-flat);
}

.mf-invite-code-label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--mf-ink-dim);
}

.mf-invite-code {
  font-family: var(--mf-font-display);
  font-weight: 700;
  font-size: clamp(32px, 11vw, 44px);
  line-height: 1.1;
  
  letter-spacing: 0.14em;
  margin-inline-end: -0.14em;
  color: var(--mf-gold);
  text-shadow: 0 2px 0 var(--mf-title-edge), 0 6px 18px rgba(0, 0, 0, 0.45);
  -webkit-user-select: all;
  user-select: all;
}

.mf-invite-code.mf-invite-code-empty {
  color: var(--mf-ink-dim);
  text-shadow: none;
}

.mf-invite-actions > .mf-btn {
  min-height: 52px;
}

.mf-invite-status {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
  text-align: center;
  color: var(--mf-ink-dim);
}

.mf-invite-status[data-tone="good"] {
  color: #7be495;
}

.mf-invite-status[data-tone="bad"] {
  color: #ff9d8f;
}

.mf-invite-meter {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  text-align: center;
}

.mf-invite-pips {
  display: flex;
  gap: 8px;
  margin-bottom: 2px;
}

.mf-invite-pip {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 1.5px solid var(--mf-card-border);
  background: rgba(20, 12, 8, 0.45);
}

.mf-invite-pip.mf-invite-pip-on {
  border-color: rgba(255, 216, 102, 0.9);
  background: var(--mf-gold);
  box-shadow: 0 0 10px rgba(255, 216, 102, 0.45);
}

.mf-invite-meter .mf-invite-progress {
  font-family: var(--mf-font-display);
  font-weight: 700;
}

.mf-invite-pending {
  font-size: 12px;
  color: var(--mf-ink-dim);
}

.mf-invite-enter {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 12px;
  border-top: 1px solid var(--mf-faint);
}

.mf-invite-enter-title {
  font-size: 14px;
  font-weight: 600;
  text-align: center;
  color: var(--mf-ink);
}

.mf-invite-enter-row {
  display: flex;
  gap: 8px;
}

.mf-invite-input {
  flex: 1 1 auto;
  min-width: 0;
  box-sizing: border-box;
  height: 48px;
  padding: 0 12px;
  border-radius: var(--mf-radius);
  border: 1px solid var(--mf-card-border);
  background-color: var(--mf-surface-flat);
  color: var(--mf-ink);
  font-family: var(--mf-font-display);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-align: center;
  text-transform: uppercase;
  outline: none;
  -webkit-user-select: text;
  user-select: text;
}

.mf-invite-input::placeholder {
  font-family: var(--mf-font);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  color: var(--mf-ink-dim);
  opacity: 0.8;
}

.mf-invite-input:focus {
  border-color: var(--mf-accent);
  box-shadow: 0 0 0 2px var(--mf-accent-soft);
}

#menu-root > .mf-card.mf-invite-panel .mf-invite-enter-btn {
  flex: 0 0 auto;
  width: auto;
  min-width: 96px;
  min-height: 48px;
  padding: 0 16px;
}

.mf-invite-enter-note {
  font-size: 12px;
  text-align: center;
  color: var(--mf-ink-dim);
}

.mf-invite-entered {
  padding-top: 12px;
  border-top: 1px solid var(--mf-faint);
  font-size: 14px;
  font-weight: 600;
  text-align: center;
  color: var(--mf-ink-dim);
}

@media (max-height: 700px) {
  #menu-root > .mf-card.mf-invite-panel .mf-card-body {
    gap: 8px;
  }

  .mf-invite-codebox {
    padding: 6px 14px 8px;
  }

  .mf-invite-code {
    font-size: clamp(30px, 9.5vw, 40px);
  }

  .mf-invite-actions > .mf-btn {
    min-height: 48px;
  }

  .mf-invite-enter {
    gap: 6px;
    padding-top: 8px;
  }
}

.mf-about-logos {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 10px 0 0;
  margin-top: auto;
}

.mf-about-logo {
  position: relative;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  color: var(--mf-ink-dim);
  -webkit-tap-highlight-color: transparent;
}

.mf-about-logo:active {
  color: var(--mf-accent);
  background: var(--mf-accent-soft);
}

.mf-about-logo .mf-about-glyph {
  display: block;
  width: 22px;
  height: 22px;
}

.mf-about-logo.mf-about-logo-studio .mf-about-glyph {
  width: 26px;
  height: 26px;
}

.mf-about-logo.mf-about-logo-studio {
  margin-inline-end: 12px;
}

.mf-about-logo.mf-about-logo-studio::after {
  content: '';
  position: absolute;
  top: 12px;
  bottom: 12px;
  inset-inline-end: -8px;
  width: 1px;
  background: var(--mf-faint);
}

.mf-legal-link {
  color: var(--mf-accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
  border-radius: 6px;
  -webkit-tap-highlight-color: transparent;
}

.mf-legal-link:active {
  background: var(--mf-accent-soft);
}

.mf-legal-email {
  white-space: nowrap;
  unicode-bidi: isolate;
}

.mf-legal-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  column-gap: 16px;
  font: 500 13px/1.3 var(--mf-font);
  color: var(--mf-ink-dim);
  text-align: center;
}

.mf-legal-row > .mf-legal-privacy,
.mf-legal-row > .mf-legal-contact {
  box-sizing: border-box;
  min-height: 44px;
  padding: 12px 4px;
}

.mf-profile-safety > .mf-legal-privacy {
  align-self: center;
  box-sizing: border-box;
  min-height: 32px;
  padding: 8px 6px;
  font-size: 13px;
}

.mf-profile-safety > .mf-legal-contact {
  padding: 2px 0;
}

.mf-profile-safety > .mf-legal-contact .mf-legal-email {
  display: inline-block;
  padding: 4px 2px;
}

button.mf-legal-consent {
  -webkit-appearance: none;
  appearance: none;
  margin: 0;
  border: 0;
  background: none;
  font: inherit;
  cursor: pointer;
}

.mf-legal-row > .mf-legal-consent {
  box-sizing: border-box;
  min-height: 44px;
  padding: 12px 4px;
}

.mf-profile-safety > .mf-legal-consent {
  align-self: center;
  box-sizing: border-box;
  min-height: 32px;
  padding: 8px 6px;
  font-size: 13px;
}

:root:lang(ja),
:root:lang(zh) {
  line-break: strict;
}

:root:lang(ja) .mf-btn,
:root:lang(ja) .mf-list-label,
:root:lang(ja) .mf-goal-cheer-text,
:root:lang(ja) .mf-toast,
:root:lang(zh) .mf-btn,
:root:lang(zh) .mf-list-label,
:root:lang(zh) .mf-goal-cheer-text,
:root:lang(zh) .mf-toast {
  text-wrap: balance;
}

:root:lang(ja) .mf-title,
:root:lang(ja) .mf-btn,
:root:lang(ja) .mf-list-label,
:root:lang(ja) .mf-goal-cheer-text,
:root:lang(ja) .mf-toast {
  word-break: auto-phrase;
}

:root:lang(ja) .mf-shop-earn,
:root:lang(ja) .mf-noads-lead,
:root:lang(ja) .mf-noads-way-head,
:root:lang(ja) .mf-invite-same,
:root:lang(zh) .mf-shop-earn,
:root:lang(zh) .mf-noads-lead,
:root:lang(zh) .mf-noads-way-head,
:root:lang(zh) .mf-invite-same {
  text-wrap: balance;
}

:root:lang(ja) .mf-shop-earn,
:root:lang(ja) .mf-noads-lead,
:root:lang(ja) .mf-noads-way-head,
:root:lang(ja) .mf-invite-same {
  word-break: auto-phrase;
}

:root:lang(ko) {
  word-break: keep-all;
}

.mf-splash.mf-splash-launch {
  background: #10131c;
  
  animation: mf-splash-launch-out 280ms ease var(--mf-splash-window, 1100ms) forwards;
}

.mf-splash-launch.mf-splash-waiting,
.mf-splash-waiting .mfl-mark,
.mf-splash-waiting .mfl-pip,
.mf-splash-waiting .mfl-word {
  animation-play-state: paused;
}

@keyframes mf-splash-launch-out {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}

.mf-splash-launch .mfl-mark {
  animation-duration: 460ms;
}

.mf-splash-launch .mfl-pip {
  animation-duration: 280ms;
}

.mf-splash-launch .mfl-pip-a {
  animation-delay: 240ms;
}

.mf-splash-launch .mfl-pip-b {
  animation-delay: 320ms;
}

.mf-splash-launch .mfl-pip-c {
  animation-delay: 400ms;
}

.mf-splash-launch .mfl-word {
  animation-duration: 380ms;
  animation-delay: 420ms;
}

.mf-splash-launch .mf-splash-logo {
  animation: none;
}

.mf-splash-launch.mf-splash-fade {
  animation: none;
  transition-duration: 280ms;
}

@media (prefers-reduced-motion: reduce) {
  .mf-splash-launch .mfl-mark,
  .mf-splash-launch .mfl-pip,
  .mf-splash-launch .mfl-word {
    animation-duration: 360ms;
    animation-delay: 0ms;
  }
}

.mf-coin-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex: 0 0 auto;
  padding: 2px 8px 2px 3px;
  border-radius: 999px;
  background: rgba(255, 216, 102, 0.13);
  border: 1px solid rgba(255, 216, 102, 0.36);
  color: var(--mf-gold);
  font: 800 12px/1.1 var(--mf-font);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  unicode-bidi: isolate;
}

.mf-coin-chip-icon {
  display: inline-flex;
  flex: 0 0 auto;
}

.mf-coin-chip-icon img {
  display: block;
  width: 15px;
  height: 15px;
}

.mf-goal-row .mf-goal-reward {
  align-self: flex-start;
  font-size: 11px;
  padding: 1px 7px 1px 2px;
}

.mf-goal-row .mf-goal-reward .mf-coin-chip-icon img {
  width: 13px;
  height: 13px;
}

.mf-goal-cheer-head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 8px;
}

.mf-goal-cheer-coins {
  font-size: 13px;
}

.mf-goal-cheer-coins .mf-coin-chip-icon img {
  width: 16px;
  height: 16px;
}

.mf-goal-cheer-in .mf-goal-cheer-coins {
  animation: mf-coin-chip-in 560ms cubic-bezier(0.22, 1.3, 0.36, 1) 420ms both;
}

@keyframes mf-coin-chip-in {
  0% {
    opacity: 0;
    transform: translateY(6px) scale(0.6);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .mf-goal-cheer-in .mf-goal-cheer-coins {
    animation: none;
  }
}

.mf-toast.mf-toast-rich {
  padding: 8px 18px;
}

.mf-toast-coins {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.mf-toast-coins-crown {
  display: inline-flex;
}

.mf-toast-coins-crown img {
  display: block;
  width: 24px;
  height: 24px;
}

.mf-toast-coin-chip {
  font-size: 16px;
  padding: 3px 11px 3px 4px;
}

.mf-toast-coin-chip .mf-coin-chip-icon img {
  width: 20px;
  height: 20px;
}

#menu-root > .mf-card.mf-shop-panel .mf-shop-wallet {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 10px 14px 11px;
  border-radius: var(--mf-radius);
  background: linear-gradient(180deg, rgba(255, 216, 102, 0.13), rgba(255, 216, 102, 0.04));
  border: 1px solid rgba(255, 216, 102, 0.3);
  text-align: center;
}

.mf-shop-balance {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mf-font-display);
  font-weight: 700;
  font-size: 28px;
  line-height: 1.1;
  color: var(--mf-gold);
  text-shadow: 0 2px 0 var(--mf-title-edge), 0 4px 14px rgba(0, 0, 0, 0.4);
  font-variant-numeric: tabular-nums;
}

.mf-shop-balance-icon {
  display: inline-flex;
}

.mf-shop-balance-icon img {
  display: block;
  width: 26px;
  height: 26px;
}

.mf-shop-earn {
  margin: 0;
  max-width: 34em;
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.35;
  color: var(--mf-ink-dim);
}

@media (max-height: 700px) {
  #menu-root > .mf-card.mf-shop-panel .mf-shop-wallet {
    padding: 7px 12px 8px;
    gap: 2px;
  }

  .mf-shop-balance {
    font-size: 23px;
  }

  .mf-shop-balance-icon img {
    width: 21px;
    height: 21px;
  }

  .mf-shop-earn {
    font-size: 12px;
  }
}

:root:root .mf-lang-option.mf-lang-device {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 6px;
}

.mf-lang-device-glyph {
  flex: 0 0 auto;
  opacity: 0.85;
}

#menu-root > .mf-card.mf-noads-panel .mf-card-body {
  gap: 12px;
}

.mf-noads-lead {
  margin: -2px 0 0;
  max-width: 360px;
  font: 700 16px/1.3 var(--mf-font);
  color: var(--mf-ink);
}

.mf-noads-panel .mf-noads-perks {
  gap: 6px;
}

.mf-noads-panel .mf-noads-perk {
  padding-block: 7px;
  font-size: 14px;
}

.mf-noads-way {
  width: 100%;
  max-width: 360px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.mf-noads-way-invite {
  position: relative;
  margin-top: 6px;
  padding: 16px 14px 14px;
  border-radius: calc(var(--mf-radius) + 4px);
  background: radial-gradient(120% 90% at 50% 0%, rgba(255, 216, 102, 0.2), rgba(255, 216, 102, 0.03) 70%), var(--mf-surface);
  border: 1.5px solid rgba(255, 216, 102, 0.55);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.mf-noads-free {
  position: absolute;
  top: -11px;
  inset-inline-start: 14px;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--mf-gold);
  color: #3b2a20;
  font: 800 11px/1.2 var(--mf-font);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.mf-noads-way-head {
  font: 700 16px/1.3 var(--mf-font);
  color: var(--mf-ink);
  text-wrap: balance;
}

.mf-noads-meter {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 4px 10px;
}

.mf-noads-panel .mf-noads-pips {
  gap: 6px;
  margin: 0;
}

.mf-noads-panel .mf-noads-pips .mf-invite-pip {
  width: 12px;
  height: 12px;
}

.mf-noads-progress {
  font: 700 14px/1.2 var(--mf-font);
  color: var(--mf-ink-dim);
  font-variant-numeric: tabular-nums;
}

#menu-root > .mf-card.mf-noads-panel .mf-noads-invite {
  width: 100%;
  min-height: 54px;
  font-size: 18px;
}

.mf-noads-way-buy {
  gap: 4px;
}

.mf-noads-or {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  margin-bottom: 4px;
  font: 600 13px/1.3 var(--mf-font);
  color: var(--mf-ink-dim);
}

.mf-noads-or::before,
.mf-noads-or::after {
  content: '';
  flex: 1 1 0;
  height: 1px;
  background: var(--mf-faint);
}

#menu-root > .mf-card.mf-noads-panel .mf-noads-buy {
  min-height: 48px;
  font-size: 16px;
}

#menu-root > .mf-card.mf-noads-panel .mf-noads-buy.mf-noads-buy-loading::before {
  content: '';
  order: 1;
  flex: 0 0 auto;
  box-sizing: border-box;
  width: 0.9em;
  height: 0.9em;
  border: 2px solid currentColor;
  border-inline-end-color: transparent;
  border-radius: 50%;
  opacity: 0.6;
  animation: mf-noads-price-wait 0.9s linear infinite;
}

@keyframes mf-noads-price-wait {
  to {
    transform: rotate(360deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  #menu-root > .mf-card.mf-noads-panel .mf-noads-buy.mf-noads-buy-loading::before {
    animation: none;
  }
}

@media (max-height: 760px) {
  .mf-noads-panel .mf-noads-mark {
    display: none;
  }

  #menu-root > .mf-card.mf-noads-panel .mf-card-body {
    gap: 9px;
  }

  .mf-noads-lead {
    font-size: 15px;
  }

  .mf-noads-panel .mf-noads-perk {
    padding-block: 5px;
    font-size: 13px;
  }

  .mf-noads-way-invite {
    padding: 14px 12px 12px;
  }

  #menu-root > .mf-card.mf-noads-panel .mf-noads-invite {
    min-height: 48px;
    font-size: 17px;
  }

  #menu-root > .mf-card.mf-noads-panel .mf-noads-buy {
    min-height: 44px;
  }

  #menu-root > .mf-card.mf-noads-panel .mf-noads-restore {
    min-height: 34px;
  }
}

.mf-noads-panel.mf-noads-owned .mf-noads-mark {
  display: block;
}

.mf-invite-panel .mf-invite-same {
  margin: -6px 0 0;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
  color: var(--mf-gold);
  text-align: center;
}

#overlay-root .mf-update-overlay {
  z-index: 41;
}

#overlay-root .mf-update-card {
  width: min(420px, 100%);
}

#overlay-root .mf-update-card:focus {
  outline: none;
}

.mf-update-card .mf-card-body {
  align-items: center;
  text-align: center;
  gap: 12px;
}

.mf-update-mark {
  width: 84px;
  height: 84px;
  margin: 2px auto 0;
  color: var(--mf-accent);
  filter: drop-shadow(0 6px 16px rgba(0, 0, 0, 0.35));
}

.mf-update-mark .mf-update-svg {
  display: block;
  width: 100%;
  height: 100%;
}

.mf-update-mark .mf-update-disc {
  fill: #fff6e3;
  stroke: currentColor;
  stroke-width: 3;
}

.mf-update-mark .mf-update-stroke {
  fill: none;
  stroke: var(--mf-primary-b, currentColor);
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

:root:root #overlay-root .mf-update-card .mf-update-body {
  margin: 0;
  max-width: 340px;
  font-size: 16px;
  line-height: 1.4;
  color: var(--mf-ink);
  text-wrap: balance;
}

.mf-update-card .mf-update-status {
  margin: -2px 0 0;
  max-width: 340px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
  color: #ff9d8f;
}

.mf-btn-row.mf-update-actions {
  flex-wrap: wrap;
  justify-content: center;
}

.mf-btn-row.mf-update-actions > .mf-btn {
  flex: 1 1 auto;
  min-height: 52px;
}

.mf-btn-row.mf-update-actions > .mf-btn:disabled {
  filter: saturate(0.7) brightness(0.85);
}

:lang(ja) .mf-update-card .mf-update-body,
:lang(zh) .mf-update-card .mf-update-body {
  line-break: strict;
}

:lang(ja) .mf-update-card .mf-update-body {
  word-break: auto-phrase;
}

body.mf-short .mf-update-mark {
  width: 64px;
  height: 64px;
}

@media (max-height: 560px) {
  .mf-update-mark {
    display: none;
  }
}

:root,
:root[data-theme="day"],
:root[data-theme="dark"] {
  --pp-night: #0a1424;
  --pp-navy: #12203a;
  --pp-lacquer: #1c2c4a;
  --pp-lacquer-hi: #243a60;
  --pp-lacquer-lo: #131f36;
  --pp-ink: #f3f7ff;
  --pp-mist: #a9bad8;
  --pp-holly: #e8dcc0;
  --pp-cream: #efe4c8;
  --pp-cream-lo: #d9c9a4;
  --pp-walnut-ink: #2a1a0e;
  --pp-lime: #cdea6c;
  --pp-lime-glow: #f0ffc2;
  --pp-lime-deep: #7d9a2c;
  --pp-stripe: #d6f26a;
  --pp-gold: #ffd35a;
  --pp-gold-deep: #c99a1e;
  --pp-ebony: #1b1411;
  --pp-deep: #060d18;
  --pp-moon-ink: #14213a;
  --pp-moon-ink-soft: #1d2d4b;
  
  --pp-seam: linear-gradient(180deg, rgba(6, 13, 24, 0.7) 0 1px, rgba(232, 220, 192, 0.12) 1px 2px);
  --pp-cut: 12px;
  --pp-cut-s: 7px;
  --pp-chamfer: polygon(var(--pp-cut) 0, calc(100% - var(--pp-cut)) 0, 100% var(--pp-cut), 100% calc(100% - var(--pp-cut)),
    calc(100% - var(--pp-cut)) 100%, var(--pp-cut) 100%, 0 calc(100% - var(--pp-cut)), 0 var(--pp-cut));
  --pp-chamfer-s: polygon(var(--pp-cut-s) 0, calc(100% - var(--pp-cut-s)) 0, 100% var(--pp-cut-s), 100% calc(100% - var(--pp-cut-s)),
    calc(100% - var(--pp-cut-s)) 100%, var(--pp-cut-s) 100%, 0 calc(100% - var(--pp-cut-s)), 0 var(--pp-cut-s));
  --pp-tag: polygon(var(--pp-cut-s) 0, calc(100% - var(--pp-cut-s)) 0, 100% 50%, calc(100% - var(--pp-cut-s)) 100%, var(--pp-cut-s) 100%, 0 50%);
  --mf-accent: #cdea6c;
  --mf-font-display: 'Piazzolla', var(--mf-font);
}

@font-face { font-family: 'Piazzolla'; font-style: normal; font-weight: 100 900; font-display: block;
  src: url('assets/fonts/piazzolla-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Piazzolla'; font-style: normal; font-weight: 100 900; font-display: block;
  src: url('assets/fonts/piazzolla-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Piazzolla'; font-style: normal; font-weight: 100 900; font-display: block;
  src: url('assets/fonts/piazzolla-cyrillic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Piazzolla'; font-style: normal; font-weight: 100 900; font-display: block;
  src: url('assets/fonts/piazzolla-cyrillic-ext.woff2') format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F; }
@font-face { font-family: 'Piazzolla'; font-style: normal; font-weight: 100 900; font-display: block;
  src: url('assets/fonts/piazzolla-greek.woff2') format('woff2');
  unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF; }
@font-face { font-family: 'Piazzolla'; font-style: normal; font-weight: 100 900; font-display: block;
  src: url('assets/fonts/piazzolla-greek-ext.woff2') format('woff2');
  unicode-range: U+1F00-1FFF; }
@font-face { font-family: 'Piazzolla'; font-style: normal; font-weight: 100 900; font-display: block;
  src: url('assets/fonts/piazzolla-vietnamese.woff2') format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB; }

.mf-shell,
body {
  background-color: var(--pp-navy);
  background-image: url("assets/menu-bg.webp"), linear-gradient(180deg, #1c3154 0%, var(--pp-navy) 45%, var(--pp-night) 100%);
  background-size: cover, cover;
  background-position: center top, center;
  background-repeat: no-repeat;
}

#menu-root > .mf-card.mf-card-main.pp-front {
  background-image: url("assets/menu-bg.webp"),
    linear-gradient(180deg, #1c3154 0%, var(--pp-navy) 45%, var(--pp-night) 100%);
  background-size: cover, cover;
  background-position: center top, center;
  background-repeat: no-repeat;
}

#menu-root > .mf-card.mf-card-main.pp-front {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  gap: 0;
  padding: calc(10px + var(--mf-safe-top, 0px)) calc(16px + var(--mf-safe-right, 0px))
    calc(12px + var(--mf-safe-bottom, 0px)) calc(16px + var(--mf-safe-left, 0px));
  overflow-x: hidden;
  overflow-y: auto;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  color: var(--pp-ink);
  font-family: var(--mf-font-display);
  --pp-sink: 0.25;
  --pp-box-max: 330px;
  --pp-lh-title: 1.06;
  --pp-lh-label: 1.15;
}

.pp-front > * {
  flex: 0 0 auto;
  width: 100%;
  max-width: 440px;
  margin-inline: auto;
  box-sizing: border-box;
}

.pp-head {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 4px;
  text-align: center;
}

#menu-root > .mf-card.pp-front .pp-title {
  display: block;
  flex: 0 0 auto;
  min-height: 0;
  max-width: 100%;
  margin: 0;
  padding: 0.06em 0.2em 0.14em;
  font: 800 36px/var(--pp-lh-title) var(--mf-font-display);
  font-optical-sizing: auto;
  letter-spacing: 0.005em;
  text-align: center;
  text-wrap: balance;
  overflow-wrap: normal;
  background: linear-gradient(180deg, #ffffff 0%, var(--pp-ink) 40%, var(--pp-holly) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 2px 0 rgba(6, 13, 24, 0.9)) drop-shadow(0 6px 14px rgba(6, 13, 24, 0.55));
  animation: none;
}

.pp-motto {
  margin: 2px 0 0;
  max-width: 30em;
  font: 600 13.5px/1.3 var(--mf-font-display);
  color: var(--pp-mist);
  text-wrap: balance;
}

.pp-sky {
  flex: 1 1 0;
  min-height: 0;
  max-height: calc(var(--pp-box-max) * (1 - var(--pp-sink)) + 34px);
  margin-top: auto;
  position: relative;
  z-index: 1;
  -webkit-clip-path: inset(-400px -400px 0 -400px);
  clip-path: inset(-400px -400px 0 -400px);
  --pp-box: min(76vw, 34vh, 330px);
}

.pp-moonset {
  position: absolute;
  left: 50%;
  bottom: calc(var(--pp-box) * var(--pp-sink) * -1);
  width: var(--pp-box);
  height: var(--pp-box);
  margin-left: calc(var(--pp-box) / -2);
}

.pp-moon-halo {
  position: absolute;
  inset: 3%;
  border-radius: 50%;
  
  box-shadow: 0 0 calc(var(--pp-box) * 0.16) calc(var(--pp-box) * 0.04) rgba(214, 226, 244, 0.22),
    0 0 calc(var(--pp-box) * 0.42) calc(var(--pp-box) * 0.1) rgba(159, 182, 216, 0.1);
  opacity: calc(0.35 + 0.65 * var(--pp-lit, 0.6));
  pointer-events: none;
}

.pp-moon {
  position: absolute;
  inset: 2%;
  width: 96%;
  height: 96%;
  overflow: visible;
  pointer-events: none;
}

.pp-moon-face {
  position: absolute;
  left: 50%;
  width: calc(var(--pp-box) * 0.74);
  height: calc(var(--pp-box) * 0.52);
  margin-left: calc(var(--pp-box) * -0.37);
  bottom: max(calc(var(--pp-box) * (0.33 - var(--pp-sink))), calc(var(--pp-goal-h, 24px) + 4px));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--pp-moon-ink);
}

.pp-best-label {
  font: 800 max(10.5px, calc(var(--pp-box) * 0.048))/1.15 var(--mf-font-display);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--pp-moon-ink-soft);
  margin-inline-start: 0.2em;
}

.pp-best-value {
  display: block;
  max-width: 100%;
  font: 900 calc(var(--pp-box) * 0.205)/1.02 var(--mf-font-display);
  font-variant-numeric: lining-nums tabular-nums;
  letter-spacing: -0.01em;
  white-space: nowrap;
  unicode-bidi: isolate;
  direction: ltr;
  color: var(--pp-moon-ink);
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.35);
  margin-block: 0.04em 0.08em;
}

.pp-streak {
  display: block;
  max-width: 100%;
  font: 700 max(11.5px, calc(var(--pp-box) * 0.046))/var(--pp-lh-label) var(--mf-font-display);
  color: var(--pp-moon-ink-soft);
  text-wrap: balance;
}

.pp-streak-label {
  margin-inline-end: 0.35em;
}

.pp-streak-value {
  font-weight: 900;
  color: var(--pp-moon-ink);
  white-space: nowrap;
  unicode-bidi: isolate;
  direction: ltr;
  font-variant-numeric: lining-nums tabular-nums;
}

.pp-streak::before {
  content: '';
  display: inline-block;
  vertical-align: 0.14em;
  width: 0.9em;
  height: 0.34em;
  margin-inline-end: 0.4em;
  border-radius: 1px;
  background: var(--pp-stripe);
  box-shadow: -0.12em 0 0 0 var(--pp-ebony), 0.12em 0 0 0 var(--pp-ebony);
}

.pp-hint {
  display: none;
  margin: 0;
  max-width: 100%;
  font: 800 max(13px, calc(var(--pp-box) * 0.074))/var(--pp-lh-label) var(--mf-font-display);
  color: var(--pp-moon-ink);
  text-wrap: balance;
}

.pp-front--fresh .pp-hint {
  display: block;
}

.pp-front--fresh .pp-best-label,
.pp-front--fresh .pp-best-value,
.pp-front--fresh .pp-streak {
  display: none;
}

.pp-ledger {
  position: relative;
  z-index: 2;
  filter: drop-shadow(0 6px 10px rgba(6, 13, 24, 0.35));
}

.pp-ledger-body {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 5px 10px 7px;
  -webkit-clip-path: var(--pp-chamfer);
  clip-path: var(--pp-chamfer);
  
  background:
    radial-gradient(60% 30px at 50% 0%, rgba(214, 226, 244, 0.12) 0%, rgba(214, 226, 244, 0) 100%),
    linear-gradient(180deg, rgba(36, 58, 96, 0.64) 0%, rgba(28, 44, 74, 0.6) 26%, rgba(19, 31, 54, 0.6) 100%);
}

.pp-ledger-body::before,
.pp-ledger-body::after {
  content: '';
  position: absolute;
  left: var(--pp-cut);
  right: var(--pp-cut);
  pointer-events: none;
}

.pp-ledger-body::before {
  top: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(244, 248, 255, 0.6) 25%, rgba(244, 248, 255, 0.6) 75%, transparent);
}

.pp-ledger-body::after {
  bottom: 0;
  height: 3px;
  background: rgba(6, 13, 24, 0.5);
}

.pp-goal {
  position: absolute;
  z-index: 3;
  bottom: 100%;
  inset-inline: 0;
  width: max-content;
  max-width: calc(100% - 56px);
  margin: 0 auto -1px;
  padding: 4px 16px 5px;
  box-sizing: border-box;
  -webkit-clip-path: var(--pp-tag);
  clip-path: var(--pp-tag);
  background: linear-gradient(180deg, #213252 0%, #131f36 100%);
  font: 700 13px/var(--pp-lh-label) var(--mf-font-display);
  color: var(--pp-lime);
  text-align: center;
}

.pp-goal-text {
  display: block;
  white-space: nowrap;
}

.pp-goal--two .pp-goal-text {
  white-space: normal;
  text-wrap: balance;
}

.pp-goal bdi {
  font-weight: 900;
  font-variant-numeric: lining-nums;
  unicode-bidi: isolate;
}

#menu-root > .mf-card.pp-front .mf-profile-chip {
  position: relative;
  top: auto;
  left: auto;
  z-index: auto;
  transform: none;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 11px;
  width: 100%;
  max-width: none;
  min-height: 56px;
  height: auto;
  margin: 0;
  padding: 6px 8px 7px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: var(--pp-ink);
  font: 800 18px/var(--pp-lh-label) var(--mf-font-display);
  text-align: start;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

#menu-root > .mf-card.pp-front .mf-profile-chip-face {
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 50%;
  overflow: hidden;
  background: var(--pp-lacquer-lo);
  box-shadow: 0 0 0 2px var(--pp-holly), 0 0 0 3.5px rgba(6, 13, 24, 0.9);
}

#menu-root > .mf-card.pp-front .mf-profile-chip-name {
  min-width: 0;
  white-space: normal;
  text-overflow: clip;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  overflow-wrap: anywhere;
  padding: 0.3em 0.12em;
  margin: -0.3em -0.12em;
}

#menu-root > .mf-card.pp-front .mf-profile-chip--empty .mf-profile-chip-name {
  color: var(--pp-lime);
  overflow-wrap: normal;
}

.pp-pen {
  width: 20px;
  height: 20px;
  color: var(--pp-mist);
}

.mf-profile-chip--empty .pp-pen {
  color: var(--pp-lime);
}

.pp-entry {
  position: relative;
  display: grid;
  grid-template-columns: 32px minmax(0, max-content) minmax(14px, 1fr) max-content;
  align-items: center;
  column-gap: 10px;
  width: 100%;
  min-height: 50px;
  margin: 0;
  padding: 6px 8px;
  border: 0;
  border-radius: 0;
  background: var(--pp-seam) top / 100% 2px no-repeat;
  color: var(--pp-ink);
  font: 750 17px/var(--pp-lh-label) var(--mf-font-display);
  text-align: start;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background-color 140ms ease;
}

.pp-entry:active,
#menu-root > .mf-card.pp-front .mf-profile-chip:active {
  background-color: rgba(232, 220, 192, 0.08);
  transform: none;
}

.pp-entry-icon {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
}

.pp-entry-icon .pp-ico,
.pp-entry-icon .mf-icon-art {
  width: 30px;
  height: 30px;
  filter: drop-shadow(0 2px 2px rgba(6, 13, 24, 0.55));
}

.pp-entry-label {
  min-width: 0;
  overflow-wrap: normal;
  hyphens: manual;
}

.pp-entry-leader {
  align-self: center;
  height: 0;
  margin-top: 0.5em;
  border-bottom: 2px dotted rgba(232, 220, 192, 0.3);
}

.pp-entry--bare .pp-entry-leader {
  visibility: hidden;
}

.pp-entry-value {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font: 800 17px/1 var(--mf-font-display);
  font-variant-numeric: lining-nums tabular-nums;
  white-space: nowrap;
  unicode-bidi: isolate;
  direction: ltr;
  color: var(--pp-ink);
}

.pp-entry-value .pp-ico,
.pp-entry-value .mf-icon-art {
  width: 20px;
  height: 20px;
}

.pp-entry-value--lime { color: var(--pp-lime); }
.pp-entry-value--gold { color: var(--pp-gold); }
.pp-entry-value:empty { display: none; }

.pp-entry-value small {
  font-size: 0.72em;
  font-weight: 700;
  color: var(--pp-mist);
}

.pp-cross {
  margin-top: 10px;
}

#menu-root > .mf-card.pp-front .pp-play {
  
  --pp-cap-w: min(124px, calc((100vw - 32px) * 0.35));
  --pp-plank-h: 46px;
  --pp-cap-h: calc(var(--pp-cap-w) / 2.08);
  --pp-quill-w: calc(var(--pp-cap-w) * 0.84);
  --pp-quill-h: calc(var(--pp-quill-w) / 1.6);
  --pp-land: calc(var(--pp-quill-h) + 2px);
  --pp-far-w: calc(var(--pp-cap-w) * 0.6);
  --pp-aim-w: max(10px, calc(var(--pp-far-w) * 0.16));
  position: relative;
  display: block;
  width: 100%;
  min-width: 0;
  height: calc(var(--pp-land) + var(--pp-cap-h) * 0.94);
  min-height: 0;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  filter: none;
  animation: none;
  transform: none;
  color: var(--pp-walnut-ink);
  font: 800 23px/1 var(--mf-font-display);
  text-shadow: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

#menu-root > .mf-card.pp-front .pp-play::before,
#menu-root > .mf-card.pp-front .pp-play::after {
  content: none;
}

.pp-play > span,
.pp-play img {
  pointer-events: none;
}

.pp-perch-cap,
.pp-far-cap {
  position: absolute;
  z-index: 1;
  display: block;
  object-fit: fill;
}

.pp-perch-cap {
  inset-inline-start: 0;
  top: calc(var(--pp-land) - var(--pp-cap-h) * 0.06);
  width: var(--pp-cap-w);
  height: var(--pp-cap-h);
}

.pp-far-cap {
  inset-inline-end: 0;
  top: calc(var(--pp-land) - var(--pp-far-w) / 2.08 * 0.06);
  width: var(--pp-far-w);
  height: calc(var(--pp-far-w) / 2.08);
  filter: brightness(0.9);
}

.pp-far-aim {
  position: absolute;
  z-index: 2;
  inset-inline-end: calc(var(--pp-far-w) / 2 - var(--pp-aim-w) / 2);
  top: calc(var(--pp-land) - 1px);
  width: var(--pp-aim-w);
  height: 5px;
  background: var(--pp-stripe);
  box-shadow: -2px 0 0 0 var(--pp-ebony), 2px 0 0 0 var(--pp-ebony), 0 0 14px 4px rgba(214, 242, 106, 0.5);
}

.pp-quill {
  position: absolute;
  z-index: 3;
  inset-inline-start: calc(var(--pp-cap-w) * 0.07);
  top: 0;
  width: var(--pp-quill-w);
  height: var(--pp-quill-h);
  object-fit: contain;
  object-position: 50% 100%;
  transform-origin: 50% 100%;
}

.pp-plank {
  position: absolute;
  z-index: 2;
  inset-inline-start: calc(var(--pp-cap-w) - 14px);
  inset-inline-end: calc(var(--pp-far-w) / 2 + var(--pp-aim-w) / 2);
  top: calc(var(--pp-land) + 5px - var(--pp-plank-h));
  height: var(--pp-plank-h);
  filter: drop-shadow(0 8px 10px rgba(6, 13, 24, 0.5)) drop-shadow(0 0 12px rgba(205, 234, 108, 0.24));
  transform-origin: 0% 100%;
}

:root[dir="rtl"] .pp-plank {
  transform-origin: 100% 100%;
}

.pp-plank-face {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 22px 4px;
  -webkit-clip-path: polygon(6px 0, calc(100% - 6px) 0, 100% 6px, 100% calc(100% - 6px), calc(100% - 6px) 100%, 6px 100%, 0 calc(100% - 6px), 0 6px);
  clip-path: polygon(6px 0, calc(100% - 6px) 0, 100% 6px, 100% calc(100% - 6px), calc(100% - 6px) 100%, 6px 100%, 0 calc(100% - 6px), 0 6px);
  background:
    radial-gradient(circle at 13px 46%, #f4f8ff 0 1.6px, #a8c6f0 2.2px 3.4px, #5b7cb8 3.8px 4.4px, rgba(91, 124, 184, 0) 5px),
    radial-gradient(circle at calc(100% - 13px) 46%, #f4f8ff 0 1.6px, #a8c6f0 2.2px 3.4px, #5b7cb8 3.8px 4.4px, rgba(91, 124, 184, 0) 5px),
    linear-gradient(180deg, rgba(255, 255, 255, 0.6) 0 1.5px, transparent 1.5px),
    linear-gradient(0deg, #b9a67f 0 4px, #cbb88f 4px 5px, transparent 5px),
    linear-gradient(180deg, #f6eed8 0%, var(--pp-cream) 42%, var(--pp-cream-lo) 100%);
}

.pp-play-glyph {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
}

.pp-play-glyph .pp-ico,
.pp-play-glyph .mf-icon-art {
  width: 26px;
  height: 26px;
}

.pp-play-label {
  display: block;
  min-width: 0;
  line-height: 1.3;
  white-space: nowrap;
  letter-spacing: 0.01em;
}

.pp-play--bare .pp-play-glyph {
  display: none;
}

.pp-play--two .pp-play-label {
  white-space: normal;
  line-height: 1.12;
  text-align: center;
  font-size: 15px;
}

#menu-root > .mf-card.pp-front .pp-play:active .pp-plank {
  translate: 0 2px;
}

#menu-root > .mf-card.pp-front .pp-play:active .pp-quill {
  scale: 1.03 0.93;
}

:root[dir="rtl"] .pp-quill,
:root[dir="rtl"] .pp-perch-cap,
:root[dir="rtl"] .pp-far-cap {
  transform: scaleX(-1);
}

.pp-foot {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
}

.pp-pegs {
  display: flex;
  gap: 8px;
  margin-inline-start: auto;
}

.pp-peg,
.pp-noads {
  position: relative;
  isolation: isolate;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 46px;
  height: 46px;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--pp-ink);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.pp-peg::before,
.pp-noads::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  -webkit-clip-path: var(--pp-chamfer-s);
  clip-path: var(--pp-chamfer-s);
  background:
    linear-gradient(180deg, rgba(244, 248, 255, 0.4) 0 1px, transparent 1px),
    linear-gradient(180deg, var(--pp-lacquer-hi) 0%, var(--pp-lacquer) 45%, var(--pp-lacquer-lo) 100%);
}

.pp-peg:active::before,
.pp-noads:active::before {
  filter: brightness(1.2);
}

.pp-peg .pp-ico,
.pp-peg .mf-icon-art {
  width: 26px;
  height: 26px;
}

.pp-peg--off .pp-ico,
.pp-peg--off .mf-icon-art {
  opacity: 0.72;
}

.pp-noads {
  flex: 0 1 auto;
  min-width: 0;
  max-width: calc(100% - 3 * 46px - 3 * 8px);
  gap: 7px;
  padding: 0 14px 0 10px;
  color: var(--pp-gold);
  font: 800 14.5px/var(--pp-lh-label) var(--mf-font-display);
}

.pp-noads::before {
  background:
    linear-gradient(180deg, rgba(255, 211, 90, 0.55) 0 1px, transparent 1px),
    linear-gradient(0deg, rgba(255, 211, 90, 0.35) 0 1px, transparent 1px),
    linear-gradient(180deg, #2b261e 0%, #1c1813 100%);
}

.pp-noads .pp-ico,
.pp-noads .mf-icon-art {
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
}

.pp-noads--bare .pp-ico,
.pp-noads--bare .mf-icon-art {
  display: none;
}

.pp-noads--bare {
  padding-inline: 10px;
}

.pp-noads-label {
  min-width: 0;
  text-align: start;
  overflow-wrap: normal;
}

.pp-entry:focus-visible,
#menu-root > .mf-card.pp-front .mf-profile-chip:focus-visible {
  outline: 2px solid var(--pp-lime);
  outline-offset: -4px;
}

.pp-peg:focus-visible,
.pp-noads:focus-visible {
  outline: 2px solid var(--pp-lime);
  outline-offset: 2px;
}

#menu-root > .mf-card.pp-front .pp-play:focus-visible {
  outline: none;
}

#menu-root > .mf-card.pp-front .pp-play:focus-visible .pp-plank-face {
  box-shadow: inset 0 0 0 3px var(--pp-lime-deep);
}

@keyframes pp-plank-lay {
  0% { transform: rotate(-90deg); opacity: 0; }
  12% { opacity: 1; }
  70% { transform: rotate(2.5deg); }
  86% { transform: rotate(-1deg); }
  100% { transform: rotate(0deg); opacity: 1; }
}

@keyframes pp-plank-lay-rtl {
  0% { transform: rotate(90deg); opacity: 0; }
  12% { opacity: 1; }
  70% { transform: rotate(-2.5deg); }
  86% { transform: rotate(1deg); }
  100% { transform: rotate(0deg); opacity: 1; }
}

@keyframes pp-quill-land {
  0% { translate: 0 -22px; opacity: 0; }
  50% { translate: 0 0; scale: 1.06 0.9; opacity: 1; }
  75% { scale: 0.97 1.04; }
  100% { translate: 0 0; scale: 1 1; opacity: 1; }
}

@keyframes pp-quill-hop {
  0% { translate: 0 -8px; }
  55% { translate: 0 0; scale: 1.04 0.94; }
  100% { translate: 0 0; scale: 1 1; }
}

@keyframes pp-quill-breathe {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -1.5px; }
}

@keyframes pp-line-in {
  from { opacity: 0; transform: translateY(6px); }
}

@keyframes pp-tag-in {
  from { opacity: 0; transform: translateY(5px); }
}

@keyframes pp-aim-flash {
  0% { opacity: 0.4; }
  35% { opacity: 1; box-shadow: -2px 0 0 0 var(--pp-ebony), 2px 0 0 0 var(--pp-ebony), 0 0 26px 10px rgba(214, 242, 106, 0.85); }
}

.pp-quill {
  animation: pp-quill-breathe 4.2s ease-in-out 1.4s infinite;
}

.pp-front--first .pp-plank {
  animation: pp-plank-lay 560ms cubic-bezier(0.45, 0, 0.7, 0.45) 0ms backwards;
}

:root[dir="rtl"] .pp-front--first .pp-plank {
  animation-name: pp-plank-lay-rtl;
}

.pp-front--first .pp-far-aim {
  animation: pp-aim-flash 900ms ease-out 380ms backwards;
}

.pp-front--first .pp-quill {
  animation: pp-quill-land 460ms cubic-bezier(0.3, 0.9, 0.4, 1.2) 300ms backwards, pp-quill-breathe 4.2s ease-in-out 1.4s infinite;
}

.pp-front--return .pp-quill {
  animation: pp-quill-hop 340ms cubic-bezier(0.3, 0.9, 0.4, 1.2) 0ms backwards, pp-quill-breathe 4.2s ease-in-out 1.4s infinite;
}

.pp-front--first .pp-ledger-body > * {
  animation: pp-line-in 320ms cubic-bezier(0.2, 0.7, 0.3, 1) backwards;
}

.pp-front--first .pp-goal,
.pp-goal--new {
  animation: pp-tag-in 420ms cubic-bezier(0.2, 0.7, 0.3, 1) 700ms backwards;
}

.pp-fitting .pp-plank,
.pp-fitting .pp-ledger-body > *,
.pp-fitting .pp-goal {
  transform: none !important;
}

@media (max-height: 779px) {
  .pp-motto {
    display: none;
  }
}

@media (max-height: 740px) {
  #menu-root > .mf-card.pp-front .pp-title {
    font-size: 32px;
  }

  #menu-root > .mf-card.pp-front .mf-profile-chip {
    min-height: 50px;
    padding-block: 4px 5px;
  }

  .pp-entry {
    min-height: 46px;
    font-size: 16.5px;
  }

  #menu-root > .mf-card.pp-front .pp-play {
    --pp-cap-w: min(112px, calc((100vw - 32px) * 0.35));
    --pp-plank-h: 44px;
  }

  .pp-cross {
    margin-top: 8px;
  }

  .pp-foot {
    margin-top: 8px;
  }
}

@media (max-height: 680px) {
  #menu-root > .mf-card.mf-card-main.pp-front {
    padding-top: calc(6px + var(--mf-safe-top, 0px));
    padding-bottom: calc(8px + var(--mf-safe-bottom, 0px));
  }

  .pp-head {
    padding-top: 0;
  }

  #menu-root > .mf-card.pp-front .pp-title {
    font-size: 28px;
  }

  #menu-root > .mf-card.pp-front .mf-profile-chip {
    min-height: 46px;
    padding-block: 2px 3px;
    font-size: 17px;
  }

  #menu-root > .mf-card.pp-front .mf-profile-chip-face {
    width: 36px;
    height: 36px;
  }

  .pp-ledger-body {
    padding-block: 3px 5px;
  }

  .pp-entry {
    min-height: 44px;
    padding-block: 3px;
    font-size: 16px;
  }

  .pp-entry-icon .pp-ico,
  .pp-entry-icon .mf-icon-art {
    width: 26px;
    height: 26px;
  }

  #menu-root > .mf-card.pp-front .pp-play {
    --pp-cap-w: min(98px, calc((100vw - 32px) * 0.35));
    --pp-plank-h: 42px;
    font-size: 21px;
  }

  .pp-cross,
  .pp-foot {
    margin-top: 6px;
  }

  .pp-peg,
  .pp-noads {
    min-width: 44px;
    height: 44px;
  }

  .pp-noads {
    max-width: calc(100% - 3 * 44px - 3 * 8px);
  }
}

@media (max-height: 600px) {
  #menu-root > .mf-card.pp-front .pp-title {
    font-size: 24px;
  }

  .pp-entry {
    font-size: 15.5px;
    column-gap: 8px;
  }

  #menu-root > .mf-card.pp-front .pp-play {
    --pp-cap-w: min(86px, calc((100vw - 32px) * 0.35));
    --pp-plank-h: 40px;
    font-size: 20px;
  }

  .pp-goal {
    font-size: 12px;
    padding-block: 3px 4px;
  }
}

.pp-sky--row {
  flex: 0 0 auto;
  max-height: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 44px;
  -webkit-clip-path: none;
  clip-path: none;
  --pp-box: 44px;
  --pp-sink: 0;
}

.pp-sky--row .pp-moonset {
  position: relative;
  left: auto;
  bottom: auto;
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  margin: 0;
}

.pp-sky--row .pp-moon-face {
  position: static;
  width: auto;
  height: auto;
  margin: 0;
  display: grid;
  justify-items: start;
  text-align: start;
  color: var(--pp-ink);
}

.pp-sky--row .pp-best-label {
  font-size: 10.5px;
  color: var(--pp-mist);
}

.pp-sky--row .pp-best-value {
  font-size: 22px;
  color: var(--pp-ink);
  text-shadow: 0 1px 2px rgba(6, 13, 24, 0.8);
  margin: 0;
}

.pp-sky--row .pp-streak {
  display: none;
}

.pp-sky--row .pp-hint {
  font-size: 11.5px;
  line-height: 1.2;
  color: var(--pp-ink);
  max-width: 8.5em;
}

.pp-sky--row ~ .pp-ledger .pp-goal {
  display: none;
}

@media (max-height: 520px) {
  #menu-root > .mf-card.mf-card-main.pp-front {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: auto auto auto auto;
    grid-template-areas:
      "head sky"
      "ledger ledger"
      "cross cross"
      "foot foot";
    align-content: center;
    row-gap: 6px;
    padding: calc(4px + var(--mf-safe-top, 0px)) 16px calc(6px + var(--mf-safe-bottom, 0px));
  }

  .pp-front > * {
    max-width: none;
  }

  .pp-head {
    grid-area: head;
    margin: 0;
    align-items: flex-start;
    justify-content: center;
    padding: 0;
    min-width: 0;
  }

  #menu-root > .mf-card.pp-front .pp-title {
    font-size: 20px;
    text-align: start;
    padding-inline: 0;
  }

  .pp-motto {
    display: none;
  }

  .pp-sky {
    grid-area: sky;
    margin: 0;
    width: auto;
  }

  .pp-ledger {
    grid-area: ledger;
  }

  .pp-ledger-body {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    padding: 2px 8px 5px;
  }

  #menu-root > .mf-card.pp-front .mf-profile-chip {
    grid-column: 1 / -1;
    min-height: 44px;
    padding-block: 0 1px;
    font-size: 16px;
  }

  #menu-root > .mf-card.pp-front .mf-profile-chip-face {
    width: 32px;
    height: 32px;
  }

  .pp-entry {
    grid-template-columns: 24px minmax(0, 1fr);
    grid-template-areas: "icon label" "icon value";
    column-gap: 8px;
    row-gap: 1px;
    align-content: center;
    min-height: 44px;
    padding: 2px 6px;
    font-size: 14.5px;
  }

  .pp-entry-icon {
    grid-area: icon;
    width: 24px;
    height: 24px;
  }

  .pp-entry-icon .pp-ico,
  .pp-entry-icon .mf-icon-art {
    width: 24px;
    height: 24px;
  }

  .pp-entry-label {
    grid-area: label;
  }

  .pp-entry-leader {
    display: none;
  }

  .pp-entry-value {
    grid-area: value;
    justify-self: start;
    font-size: 12.5px;
  }

  .pp-entry-value .pp-ico,
  .pp-entry-value .mf-icon-art {
    width: 14px;
    height: 14px;
  }

  .pp-entry[data-entry="goals"],
  .pp-entry[data-entry="invite"] {
    border-inline-start: 1px solid rgba(232, 220, 192, 0.12);
  }

  .pp-cross {
    grid-area: cross;
    margin: 0;
  }

  #menu-root > .mf-card.pp-front .pp-play {
    --pp-cap-w: 64px;
    --pp-plank-h: 38px;
    font-size: 19px;
  }

  .pp-foot {
    grid-area: foot;
    margin: 0;
  }

  .pp-peg,
  .pp-noads {
    min-width: 44px;
    height: 44px;
  }

  .pp-noads {
    max-width: calc(100% - 3 * 44px - 3 * 8px);
  }
}

@media (min-width: 700px), (min-aspect-ratio: 1/1) {
  .mf-shell {
    background: transparent;
  }

  body {
    background-attachment: scroll;
  }

  #menu-root > .mf-card.mf-card-main.pp-front {
    background-image: radial-gradient(70% 34% at 50% 24%, rgba(214, 226, 244, 0.08) 0%, transparent 72%);
    background-size: cover;
  }

  body:not(.mf-in-run) #game-canvas {
    visibility: hidden;
  }

  body.mf-in-run {
    background-image: linear-gradient(180deg, var(--pp-navy) 0%, var(--pp-night) 100%);
  }

  .mf-overlay.mf-dim {
    position: fixed;
    inset: 0;
  }
}

@media (min-width: 700px) and (min-height: 900px) {
  #menu-root > .mf-card.mf-card-main.pp-front {
    padding-top: calc(28px + var(--mf-safe-top, 0px));
    padding-bottom: calc(28px + var(--mf-safe-bottom, 0px));
    --pp-box-max: 420px;
  }

  .pp-front > * {
    max-width: 500px;
  }

  .pp-sky {
    flex: 0 1 auto;
    height: calc(420px * 0.75 + 34px);
    margin-top: 24px;
  }

  .pp-foot {
    margin-bottom: auto;
  }

  #menu-root > .mf-card.pp-front .pp-title {
    font-size: 46px;
  }

  .pp-motto {
    font-size: 16px;
  }

  .pp-goal {
    font-size: 15px;
    padding: 5px 20px 6px;
  }

  #menu-root > .mf-card.pp-front .mf-profile-chip {
    min-height: 64px;
    font-size: 21px;
  }

  #menu-root > .mf-card.pp-front .mf-profile-chip-face {
    width: 48px;
    height: 48px;
  }

  .pp-entry {
    min-height: 58px;
    font-size: 20px;
    grid-template-columns: 38px minmax(0, max-content) minmax(14px, 1fr) max-content;
  }

  .pp-entry-icon,
  .pp-entry-icon .pp-ico,
  .pp-entry-icon .mf-icon-art {
    width: 36px;
    height: 36px;
  }

  .pp-entry-value {
    font-size: 20px;
  }

  #menu-root > .mf-card.pp-front .pp-play {
    --pp-cap-w: 172px;
    --pp-plank-h: 60px;
    font-size: 30px;
  }

  .pp-play-glyph,
  .pp-play-glyph .pp-ico,
  .pp-play-glyph .mf-icon-art {
    width: 32px;
    height: 32px;
  }

  .pp-cross {
    margin-top: 16px;
  }

  .pp-foot {
    margin-top: 16px;
  }

  .pp-peg,
  .pp-noads {
    min-width: 54px;
    height: 54px;
  }

  .pp-peg .pp-ico,
  .pp-peg .mf-icon-art {
    width: 30px;
    height: 30px;
  }

  .pp-noads {
    font-size: 16.5px;
    max-width: calc(100% - 3 * 54px - 3 * 8px);
  }
}

:root:is(:lang(am), :lang(ar), :lang(bn), :lang(fa), :lang(gu), :lang(he), :lang(hi), :lang(ja), :lang(km),
  :lang(kn), :lang(ko), :lang(lo), :lang(ml), :lang(mr), :lang(my), :lang(ne), :lang(or), :lang(pa), :lang(si),
  :lang(ta), :lang(te), :lang(th), :lang(ur), :lang(zh)) .pp-best-label {
  letter-spacing: 0;
  margin-inline-start: 0;
  text-transform: none;
}

:root:is(:lang(ar), :lang(fa), :lang(ur), :lang(my), :lang(si), :lang(th), :lang(lo), :lang(km), :lang(bn),
  :lang(hi), :lang(mr), :lang(ne), :lang(gu), :lang(pa), :lang(or), :lang(ta), :lang(te), :lang(kn), :lang(ml),
  :lang(am)) #menu-root > .mf-card.mf-card-main.pp-front {
  --pp-lh-title: 1.3;
  --pp-lh-label: 1.32;
}

@media (prefers-reduced-motion: reduce) {
  .pp-quill,
  .pp-plank,
  .pp-far-aim,
  .pp-goal,
  .pp-ledger-body > *,
  .pp-front--first .pp-plank,
  .pp-front--first .pp-quill,
  .pp-front--return .pp-quill,
  .pp-front--first .pp-ledger-body > *,
  .pp-front--first .pp-goal,
  .pp-front--first .pp-far-aim {
    animation: none !important;
  }

  .pp-entry {
    transition: none;
  }
}

:root,
:root[data-theme="day"],
:root[data-theme="dark"] {
  --mf-bg: #12203a;
  --mf-bg-2: #0a1424;
  --mf-surface: rgba(28, 44, 74, 0.82);
  --mf-surface-flat: rgba(19, 31, 54, 0.84);
  --mf-raised-a: #243a60;
  --mf-raised-b: #131f36;
  --mf-secondary-a: #243a60;
  --mf-secondary-b: #16243f;
  --mf-card-border: rgba(232, 220, 192, 0.18);
  --mf-line: rgba(232, 220, 192, 0.2);
  --mf-line-strong: rgba(232, 220, 192, 0.3);
  --mf-faint: rgba(232, 220, 192, 0.1);
  --mf-ink: #f3f7ff;
  --mf-ink-dim: #a9bad8;
  --mf-subtitle: #a9bad8;
  --mf-accent: #cdea6c;
  --mf-accent-soft: rgba(205, 234, 108, 0.16);
  --mf-gold: #ffd35a;
  --mf-title-a: #ffffff;
  --mf-title-b: #f3f7ff;
  --mf-title-c: #e8dcc0;
  --mf-radius: 0px;
  
  --mf-danger-a: #8a3f2a;
  --mf-danger-b: #5a2616;
  --mf-danger-base: #3e190d;
  
  --mf-share-a: #a8c6f0;
  --mf-share-b: #5b7cb8;
  --mf-share-ink: #0e1a2a;
  --mf-share-dim: #d6e4f8;
  --mf-share-line: rgba(168, 198, 240, 0.7);
}

#menu-root > .mf-card:not(.pp-front) {
  background-image: linear-gradient(180deg, rgba(10, 20, 36, 0.52) 0%, rgba(10, 20, 36, 0.6) 100%),
    url("assets/menu-bg.webp"),
    linear-gradient(170deg, var(--pp-navy) 0%, var(--pp-night) 100%);
  background-size: cover, cover, cover;
  background-position: center, center top, center;
  background-repeat: no-repeat;
}

@media (min-width: 700px), (min-aspect-ratio: 1/1) {
  
  #menu-root > .mf-card:not(.pp-front) {
    background-image: linear-gradient(180deg, rgba(10, 20, 36, 0.52) 0%, rgba(10, 20, 36, 0.6) 100%);
  }
}

:root:root .mf-title {
  font-family: var(--mf-font-display);
  font-weight: 800;
  letter-spacing: 0.005em;
  line-height: 1.12;
  padding-block: 0.04em 0.14em;
}

#menu-root > .mf-card:not(.pp-front) > .mf-title:not(.mf-board-title)::after {
  content: '';
  display: block;
  width: min(62%, 240px);
  height: 2px;
  margin: 8px auto 0;
  background: var(--pp-seam);
}

:root:root .mf-btn {
  border: 0;
  border-radius: 0;
  -webkit-clip-path: var(--pp-chamfer-s);
  clip-path: var(--pp-chamfer-s);
  background: linear-gradient(180deg, var(--mf-secondary-a) 0%, var(--mf-secondary-b) 100%);
  box-shadow: inset 0 1px 0 rgba(244, 248, 255, 0.35), inset 0 -3px 0 rgba(6, 13, 24, 0.35);
  color: var(--mf-ink);
  font-family: var(--mf-font-display);
  font-weight: 800;
}

:root:root .mf-btn::after {
  display: none;
}

#menu-root .mf-list-row .mf-btn,
#menu-root > .mf-card .mf-btn,
#overlay-root .mf-btn {
  border-radius: 0;
  border-width: 0;
}

#overlay-root .mf-btn[data-action="invite"] {
  box-shadow: inset 0 0 0 1.5px var(--mf-share-line);
}

:root:root .mf-btn:active {
  transform: translateY(1px);
  box-shadow: inset 0 1px 0 rgba(244, 248, 255, 0.3), inset 0 -2px 0 rgba(6, 13, 24, 0.35);
}

:root:root .mf-btn:focus-visible {
  outline: none;
  box-shadow: inset 0 0 0 3px var(--pp-lime), inset 0 -3px 0 rgba(6, 13, 24, 0.35);
}

:root:root .mf-btn.mf-btn-primary {
  background: linear-gradient(180deg, #f6eed8 0%, var(--pp-cream) 42%, var(--pp-cream-lo) 100%);
  color: var(--pp-walnut-ink);
  box-shadow: inset 0 1.5px 0 rgba(255, 255, 255, 0.6), inset 0 -4px 0 #b9a67f;
}

:root:root .mf-btn.mf-btn-primary:focus-visible {
  box-shadow: inset 0 0 0 3px var(--pp-lime-deep), inset 0 -4px 0 #b9a67f;
}

:root:root .mf-btn.mf-btn-primary .mf-icon-art,
#overlay-root .mf-icon-btn.mf-icon-btn-primary .mf-icon-art {
  filter: drop-shadow(0 0 0.8px rgba(42, 26, 14, 0.9)) drop-shadow(0 1px 1px rgba(42, 26, 14, 0.5));
}

:root:root .mf-btn.mf-btn-ad {
  background: linear-gradient(180deg, #ffe08a 0%, var(--pp-gold) 55%, var(--pp-gold-deep) 100%);
  color: #2a1d10;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6), inset 0 -3px 0 rgba(122, 86, 10, 0.55);
}

:root:root .mf-btn.mf-btn-ad:disabled {
  filter: saturate(0.55) brightness(0.9);
}

:root:root .mf-btn.mf-btn-danger {
  background: linear-gradient(180deg, var(--mf-danger-a) 0%, var(--mf-danger-b) 100%);
  color: #f3e2b8;
}

#menu-root > .mf-card:not(.pp-front) .mf-list,
.mf-lang-list,
.mf-howto-scores {
  -webkit-clip-path: var(--pp-chamfer);
  clip-path: var(--pp-chamfer);
  background: linear-gradient(180deg, rgba(36, 58, 96, 0.62) 0%, rgba(19, 31, 54, 0.6) 100%);
  padding: 4px 8px;
  gap: 0;
}

:root:root .mf-list-row,
:root:root .mf-board-row,
:root:root .mf-howto-score-row,
:root:root .mf-lang-option {
  border: 0;
  border-radius: 0;
  margin: 0;
  background: var(--pp-seam) top / 100% 2px no-repeat;
  box-shadow: none;
}

:root:root .mf-list-row:first-child,
:root:root .mf-board-row:first-child,
:root:root .mf-howto-score-row:first-child,
:root:root .mf-lang-option:first-child {
  background: none;
}

:root:root .mf-list-row.mf-row-equipped,
:root:root .mf-lang-option.mf-lang-active,
:root:root .mf-board-row.mf-board-me {
  border: 0;
  box-shadow: inset 3px 0 0 var(--pp-lime);
  background-color: rgba(205, 234, 108, 0.06);
}

:root[dir="rtl"] .mf-list-row.mf-row-equipped,
:root[dir="rtl"] .mf-lang-option.mf-lang-active,
:root[dir="rtl"] .mf-board-row.mf-board-me {
  box-shadow: inset -3px 0 0 var(--pp-lime);
}

.mf-toggle-group {
  border: 0;
  border-radius: 0;
  background: transparent;
  gap: 8px;
}

:root:root .mf-toggle {
  border: 0;
  border-radius: 0;
  -webkit-clip-path: var(--pp-tag);
  clip-path: var(--pp-tag);
  background: var(--pp-lacquer-lo);
  color: var(--pp-mist);
  font-family: var(--mf-font-display);
  font-weight: 800;
  padding-inline: 18px;
}

:root:root .mf-toggle.mf-toggle-active {
  background: var(--pp-lime);
  color: var(--pp-lacquer-lo);
}

.mf-lang-search,
.mf-profile-input,
.mf-invite-input {
  border-radius: 0;
  -webkit-clip-path: var(--pp-chamfer-s);
  clip-path: var(--pp-chamfer-s);
  background: rgba(10, 20, 36, 0.7);
  box-shadow: inset 0 0 0 1px rgba(232, 220, 192, 0.2);
}

#menu-root > .mf-card.mf-shop-panel .mf-shop-wallet {
  border: 0;
  background: none;
  box-shadow: none;
}

#menu-root .mf-list-row > .mf-active-chip,
.mf-active-chip {
  border: 0;
  border-radius: 0;
  -webkit-clip-path: var(--pp-tag);
  clip-path: var(--pp-tag);
  background: rgba(205, 234, 108, 0.12);
  color: var(--pp-lime);
  font-family: var(--mf-font-display);
  font-weight: 800;
}

.mf-shop-balance {
  -webkit-clip-path: var(--pp-tag);
  clip-path: var(--pp-tag);
  background: linear-gradient(180deg, #f6eed8 0%, var(--pp-cream-lo) 100%);
  color: var(--pp-walnut-ink);
  padding: 6px 20px;
  font-family: var(--mf-font-display);
  font-weight: 900;
}

.mf-shop-earn {
  color: var(--pp-mist);
}

#menu-root .mf-shop-panel .mf-item-preview {
  border-radius: 50%;
  background: var(--pp-lacquer-lo);
  box-shadow: 0 0 0 1px rgba(232, 220, 192, 0.35);
  overflow: visible;
}

#menu-root .mf-shop-panel .mf-item-preview.mf-item-locked {
  filter: none;
  opacity: 0.92;
}

#menu-root .mf-shop-panel .mf-row-equipped .mf-item-preview {
  box-shadow: 0 0 0 2px var(--pp-lime);
}

.mf-item-lock {
  position: absolute;
  inset-inline-end: -4px;
  bottom: -4px;
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  -webkit-clip-path: var(--pp-chamfer-s);
  clip-path: var(--pp-chamfer-s);
  background: linear-gradient(180deg, #ece6da 0%, #bdb4a6 100%);
  color: var(--pp-walnut-ink);
}

.mf-list-hint.mf-list-hint-ad {
  color: #ffe6ad;
}

@media (max-height: 700px) {
  .mf-list-row .mf-list-desc .mf-list-hint.mf-list-hint-ad {
    display: block;
  }
}

.mf-goal-crown {
  border-radius: 50%;
  background: rgba(10, 20, 36, 0.55);
}

.mf-goal-pip {
  border-radius: 0;
  transform: rotate(45deg) scale(0.8);
}

.mf-goal-reward,
.mf-coin-chip {
  border-radius: 0;
  -webkit-clip-path: var(--pp-tag);
  clip-path: var(--pp-tag);
  background: linear-gradient(180deg, #f6eed8 0%, var(--pp-cream-lo) 100%);
  color: var(--pp-walnut-ink);
  padding-inline: 12px;
}

.mf-goal-count {
  font-variant-numeric: lining-nums tabular-nums;
}

.mf-board-rank {
  font-family: var(--mf-font-display);
  font-weight: 900;
  font-variant-numeric: lining-nums tabular-nums;
  color: var(--pp-mist);
}

.mf-list > .mf-board-row:first-child .mf-board-rank,
.mf-board-self + .mf-board-row .mf-board-rank { color: var(--pp-gold); font-size: 1.3em; }
.mf-list > .mf-board-row:first-child + .mf-board-row .mf-board-rank,
.mf-board-self + .mf-board-row + .mf-board-row .mf-board-rank { color: #c9d2de; font-size: 1.2em; }
.mf-list > .mf-board-row:first-child + .mf-board-row + .mf-board-row .mf-board-rank,
.mf-board-self + .mf-board-row + .mf-board-row + .mf-board-row .mf-board-rank { color: #b8743e; font-size: 1.1em; }

.mf-board-score {
  font-family: var(--mf-font-display);
  font-weight: 800;
  font-variant-numeric: lining-nums tabular-nums;
}

.mf-board-self {
  border: 0;
  border-radius: 0;
  -webkit-clip-path: var(--pp-tag);
  clip-path: var(--pp-tag);
  background: linear-gradient(180deg, var(--pp-lacquer-hi) 0%, var(--pp-lacquer-lo) 100%);
  color: var(--pp-holly);
  padding-inline: 18px;
  font-variant-numeric: lining-nums tabular-nums;
}

.mf-board-watch {
  border-radius: 0;
  -webkit-clip-path: var(--pp-chamfer-s);
  clip-path: var(--pp-chamfer-s);
  background: rgba(189, 180, 166, 0.16);
}

.mf-invite-codebox {
  border: 0;
  border-radius: 0;
  -webkit-clip-path: var(--pp-tag);
  clip-path: var(--pp-tag);
  background: linear-gradient(180deg, #f6eed8 0%, var(--pp-cream-lo) 100%);
}

.mf-invite-code {
  color: var(--pp-walnut-ink);
  letter-spacing: 0.18em;
  font-family: var(--mf-font-display);
  font-weight: 900;
}

.mf-invite-pip {
  border-radius: 50%;
  background: radial-gradient(circle at 40% 35%, #e8f1ff 0%, #a8c6f0 45%, #5b7cb8 100%);
  opacity: 0.45;
}

.mf-invite-pip.mf-invite-meter-done,
.mf-invite-meter-done .mf-invite-pip {
  opacity: 1;
  box-shadow: 0 0 0 2px var(--pp-lime);
}

.mf-noads-perk::before {
  background: var(--pp-lime);
  border-radius: 0;
}

#overlay-root .mf-card {
  border: 0;
  border-radius: 0;
  -webkit-clip-path: var(--pp-chamfer);
  clip-path: var(--pp-chamfer);
  background: linear-gradient(180deg, var(--pp-lacquer-hi) 0%, var(--pp-lacquer) 30%, var(--pp-lacquer-lo) 100%);
  box-shadow: inset 0 1px 0 rgba(244, 248, 255, 0.55), inset 0 -4px 0 rgba(6, 13, 24, 0.5);
}

#overlay-root .mf-icon-btn.mf-icon-btn-action {
  border: 0;
  border-radius: 0;
  -webkit-clip-path: var(--pp-chamfer-s);
  clip-path: var(--pp-chamfer-s);
  background: linear-gradient(180deg, var(--mf-secondary-a) 0%, var(--mf-secondary-b) 100%);
  box-shadow: inset 0 1px 0 rgba(244, 248, 255, 0.35), inset 0 -3px 0 rgba(6, 13, 24, 0.35);
  font-family: var(--mf-font-display);
}

:root:root:root #overlay-root .mf-icon-btn.mf-icon-btn-primary {
  background: linear-gradient(180deg, #f6eed8 0%, var(--pp-cream) 42%, var(--pp-cream-lo) 100%);
  color: var(--pp-walnut-ink);
  box-shadow: inset 0 1.5px 0 rgba(255, 255, 255, 0.6), inset 0 -4px 0 #b9a67f;
}

#overlay-root .mf-icon-btn.mf-mute-btn,
#overlay-root .mf-icon-btn.mf-howto-btn {
  border: 0;
  border-radius: 0;
  -webkit-clip-path: var(--pp-chamfer-s);
  clip-path: var(--pp-chamfer-s);
  background: linear-gradient(180deg, var(--pp-lacquer-hi) 0%, var(--pp-lacquer-lo) 100%);
}

.mf-revive-bar-track {
  border-radius: 0;
  background: var(--pp-deep);
  box-shadow: inset 0 0 0 1px rgba(232, 220, 192, 0.14);
}

.mf-revive-bar {
  border-radius: 0 3px 3px 0;
  background: linear-gradient(180deg, #e0b784 0 2px, #b9895a 2px 100%);
}

.mf-summary {
  border: 0;
  border-radius: 0;
  background: transparent;
}

.mf-summary-row {
  background: var(--pp-seam) top / 100% 2px no-repeat;
  border: 0;
}

.mf-summary-row:first-child {
  background: none;
}

.mf-summary-value {
  font-family: var(--mf-font-display);
  font-weight: 800;
  font-variant-numeric: lining-nums tabular-nums;
}

.mf-newbest {
  border-radius: 0;
  -webkit-clip-path: var(--pp-tag);
  clip-path: var(--pp-tag);
  background: var(--pp-lime);
  color: var(--pp-lacquer-lo);
  font-family: var(--mf-font-display);
  font-weight: 900;
}

#overlay-root .mf-goal-cheer {
  border: 0;
  border-radius: 0;
  -webkit-clip-path: var(--pp-tag);
  clip-path: var(--pp-tag);
  background: linear-gradient(180deg, #f6eed8 0%, var(--pp-cream-lo) 100%);
  color: var(--pp-walnut-ink);
}

:root:root .mf-toast {
  border: 0;
  border-radius: 0;
  -webkit-clip-path: var(--pp-tag);
  clip-path: var(--pp-tag);
  background: linear-gradient(180deg, var(--pp-lacquer-hi) 0%, var(--pp-lacquer-lo) 100%);
  color: var(--pp-holly);
  padding-inline: 24px;
  font-family: var(--mf-font-display);
  font-weight: 700;
  box-shadow: inset 0 1px 0 rgba(244, 248, 255, 0.45);
}

:root:root .mf-ad-status {
  border-radius: 0;
  -webkit-clip-path: var(--pp-tag);
  clip-path: var(--pp-tag);
  background: linear-gradient(180deg, var(--pp-lacquer) 0%, var(--pp-lacquer-lo) 100%);
  border: 0;
  box-shadow: inset 0 1px 0 rgba(255, 211, 90, 0.6), inset 0 -1px 0 rgba(255, 211, 90, 0.35);
  color: #ffe6ad;
  font: 700 13px/1.3 var(--mf-font-display);
}

:root:root .mf-ad-status.mf-ad-status--good {
  box-shadow: inset 0 1px 0 var(--pp-lime), inset 0 -1px 0 rgba(205, 234, 108, 0.5);
  color: #eef8c8;
}

:root:root .mf-ad-status.mf-ad-status--bad {
  box-shadow: inset 0 1px 0 #bdb4a6, inset 0 -1px 0 rgba(189, 180, 166, 0.5);
  color: #ece6da;
}

.mf-update-mark .mf-update-disc {
  fill: var(--pp-lacquer);
  stroke: var(--pp-holly);
}

.mf-update-mark .mf-update-stroke {
  stroke: var(--pp-lime);
}

.mf-noads-svg > circle {
  fill: var(--pp-lacquer);
}

.mf-noads-svg > path:last-child {
  stroke: var(--pp-holly);
}

#pause-btn {
  border-radius: 0;
  -webkit-clip-path: var(--pp-chamfer-s);
  clip-path: var(--pp-chamfer-s);
  background: linear-gradient(180deg, var(--pp-lacquer-hi) 0%, var(--pp-lacquer-lo) 100%);
  box-shadow: inset 0 1px 0 rgba(244, 248, 255, 0.45);
}

@media (prefers-reduced-motion: reduce) {
  :root:root .mf-btn:active {
    transform: none;
  }
}

.pp-front--held .pp-plank,
.pp-front--held .pp-quill,
.pp-front--held .pp-far-aim,
.pp-front--held .pp-ledger-body > *,
.pp-front--held .pp-goal {
  -webkit-animation-play-state: paused;
  animation-play-state: paused;
}

.mf-invite-pip.mf-invite-pip-on {
  opacity: 1;
  border-color: rgba(205, 234, 108, 0.9);
  background: radial-gradient(circle at 40% 35%, #f4f8ff 0%, #a8c6f0 45%, #5b7cb8 100%);
  box-shadow: 0 0 0 2px var(--pp-lime), 0 0 8px rgba(205, 234, 108, 0.35);
}

#overlay-root .mf-btn[data-action="invite"] {
  box-shadow: inset 0 0 0 1.5px var(--mf-share-line) !important;
}

#overlay-root .mf-btn[data-action="invite"]:focus-visible {
  box-shadow: inset 0 0 0 3px var(--pp-lime), inset 0 -3px 0 rgba(6, 13, 24, 0.35) !important;
}

#overlay-root .mf-btn[data-action="video"]:focus-visible {
  box-shadow: inset 0 0 0 3px var(--pp-lime), 0 8px 22px rgba(0, 0, 0, 0.34) !important;
}

@media (min-width: 700px) {
  .mf-shell,
  .mf-shell.mf-shell {
    --mf-pause-top: max(calc(max(12px, var(--mf-safe-top, 0px)) + 44px), calc(min(16.12vw, 9.07vh) - var(--mf-pause-size) / 2));
  }
}

#menu-root > .mf-card.pp-front .pp-play {
  --pp-cap-h: calc(var(--pp-cap-w) / 2.4265);
}

.pp-far-cap {
  top: calc(var(--pp-land) - var(--pp-far-w) / 2.4265 * 0.06);
  height: calc(var(--pp-far-w) / 2.4265);
}

@media (min-width: 700px), (min-aspect-ratio: 1/1) {
  body.mf-in-run {
    background-color: #0b1729;
    background-image:
      radial-gradient(120% 85% at 50% 40%, rgba(6, 13, 24, 0) 45%, rgba(6, 13, 24, 0.55) 100%),
      linear-gradient(180deg, #14305f 0%, #11294f 36%, #0e2242 50%, #0a182f 62%, #060f1d 78%, #050b15 100%);
    background-size: cover, cover;
    background-position: center, center;
    background-repeat: no-repeat, no-repeat;
  }

  body.pp-panel-up:not(.mf-in-run) {
    background-image: linear-gradient(180deg, rgba(10, 20, 36, 0.52) 0%, rgba(10, 20, 36, 0.6) 100%),
      url("assets/menu-bg.webp"),
      linear-gradient(180deg, #1c3154 0%, var(--pp-navy) 45%, var(--pp-night) 100%);
    background-size: cover, cover, cover;
    background-position: center, center top, center;
    background-repeat: no-repeat, no-repeat, no-repeat;
  }

  body.pp-panel-up:not(.mf-in-run) #menu-root > .mf-card:not(.pp-front) {
    background-image: none;
  }
}

:root:root .mf-toggle-group {
  border: 0;
  border-radius: 0;
  background: transparent;
}

:root:root .mf-newbest {
  border: 0;
  background: var(--pp-lime);
  color: var(--pp-lacquer-lo);
}

:root:root .mf-revive-bar-track {
  background: var(--pp-deep);
}

:root:root .mf-lang-list {
  background: linear-gradient(180deg, rgba(36, 58, 96, 0.62) 0%, rgba(19, 31, 54, 0.6) 100%);
}

#menu-root .mf-shop-panel .mf-item-preview {
  position: relative;
}

.pp-sky--row .pp-moon-face {
  padding: 2px 8px;
  margin: -2px -8px;
  border-radius: 10px;
  background: rgba(6, 13, 24, 0.5);
  box-shadow: 0 0 14px 8px rgba(6, 13, 24, 0.5);
}

.pp-sky--row .pp-best-label {
  color: var(--pp-ink);
  text-shadow: 0 1px 2px rgba(6, 13, 24, 0.85);
}

#menu-root:not(.mf-hidden) ~ .mf-toast-root {
  top: calc(max(8px, var(--mf-safe-top, 0px)) + 6px);
  bottom: auto;
}

#menu-root:not(.mf-hidden) ~ .mf-toast-root .mf-toast:not(.mf-toast-show) {
  transform: translateY(-10px);
}

#overlay-root .mf-goal-cheer .mf-goal-cheer-title,
#overlay-root .mf-goal-cheer .mf-goal-cheer-more {
  color: #634010;
}

#overlay-root .mf-goal-cheer .mf-goal-cheer-goal {
  color: var(--pp-walnut-ink);
}

#overlay-root .mf-gameover-card .mf-gameover-emblem {
  filter: drop-shadow(0 0 10px rgba(232, 220, 192, 0.18));
}

@media (min-width: 700px) and (min-aspect-ratio: 10/16), (min-aspect-ratio: 1/1) {
  body.mf-in-run #game-canvas {
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 32px, #000 calc(100% - 32px), transparent 100%);
    mask-image: linear-gradient(90deg, transparent 0, #000 32px, #000 calc(100% - 32px), transparent 100%);
  }
}

@media (min-aspect-ratio: 1/1) and (max-height: 500px) {
  #menu-root .mf-board-title ~ .mf-card-body {
    flex-shrink: 0;
  }

  #menu-root .mf-board-title ~ .mf-card-body .mf-board-list {
    max-height: none;
    overflow: visible;
  }

  #menu-root .mf-board-title ~ .mf-btn-row {
    position: -webkit-sticky;
    position: sticky;
    bottom: calc(-20px - var(--mf-safe-bottom, 0px));
    z-index: 2;
    margin-top: -10px;
    margin-bottom: calc(-20px - var(--mf-safe-bottom, 0px));
    padding-top: 12px;
    padding-bottom: calc(20px + var(--mf-safe-bottom, 0px));
    background: linear-gradient(180deg, rgba(10, 20, 36, 0) 0%, rgba(10, 20, 36, 0.97) 12px);
  }
}

#menu-root > .mf-card.pp-front .pp-title {
  align-items: normal;
  justify-content: normal;
}

.pp-pouch {
  position: absolute;
  top: calc(var(--mf-pause-top) + var(--mf-pause-size) + 8px);
  left: max(12px, var(--mf-safe-left, 0px));
  z-index: 20;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  margin: 0;
  padding: 0;
  pointer-events: none;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}

.pp-pouch.pp-pouch--down,
#game-shell.mf-run-hud-off .pp-pouch {
  display: none;
}

.pp-medal {
  pointer-events: auto;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.pp-medal[data-state="hidden"] {
  visibility: hidden;
  pointer-events: none;
}

.pp-medal[data-state="held"]::before,
.pp-medal[data-state="landed"]::before,
.pp-medal[data-state="carried"]::before,
.pp-medal[data-state="far"]::before,
.pp-medal[data-state="active"]::before,
.pp-medal[data-state="cracked"]::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  -webkit-clip-path: var(--pp-chamfer-s);
  clip-path: var(--pp-chamfer-s);
  background: linear-gradient(180deg, var(--pp-lacquer-hi) 0%, var(--pp-lacquer-lo) 100%);
  box-shadow: inset 0 0 0 1px rgba(106, 210, 176, 0.26), inset 0 1px 0 rgba(244, 248, 255, 0.45);
  pointer-events: none;
}

.pp-medal:focus-visible {
  outline: 2px solid var(--pp-holly);
  outline-offset: 2px;
  border-radius: 8px;
}

.pp-pouch .pp-tip {
  top: calc(2 * (44px + 6px)) !important;
  left: 66px;
  box-sizing: border-box;
  min-height: 36px;
  max-width: min(260px, calc(100vw - 90px));
  padding: 7px 16px 8px 40px;
  border: 0;
  border-radius: 0;
  -webkit-clip-path: var(--pp-tag);
  clip-path: var(--pp-tag);
  background: linear-gradient(180deg, var(--pp-lacquer-hi) 0%, var(--pp-lacquer-lo) 100%);
  box-shadow: inset 0 1px 0 rgba(244, 248, 255, 0.45), inset 0 -1px 0 rgba(6, 13, 24, 0.5);
  color: var(--pp-holly);
  font: 700 13px/1.3 var(--mf-font-display);
  text-align: start;
  overflow-wrap: break-word;
  pointer-events: none;
}

.pp-pouch .pp-tip[data-charm="moss"] {
  background: url(assets/charms/charm-moss.webp) 13px 50% / 22px 22px no-repeat, linear-gradient(180deg, var(--pp-lacquer-hi) 0%, var(--pp-lacquer-lo) 100%);
}

.pp-pouch .pp-tip[data-charm="leap"] {
  background: url(assets/charms/charm-leap.webp) 13px 50% / 22px 22px no-repeat, linear-gradient(180deg, var(--pp-lacquer-hi) 0%, var(--pp-lacquer-lo) 100%);
}

.pp-pouch .pp-tip[data-charm="sap"] {
  background: url(assets/charms/charm-sap.webp) 13px 50% / 22px 22px no-repeat, linear-gradient(180deg, var(--pp-lacquer-hi) 0%, var(--pp-lacquer-lo) 100%);
}

@media (prefers-reduced-motion: reduce) {
  .pp-pouch .pp-tip,
  .pp-pouch .pp-tip.pp-tip--up {
    transform: none;
    transition: none;
  }
}

#overlay-root.mf-gameover-up ~ .mf-toast-root {
  top: calc(max(8px, var(--mf-safe-top, 0px)) + 6px);
  bottom: auto;
}

#overlay-root.mf-gameover-up ~ .mf-toast-root .mf-toast:not(.mf-toast-show) {
  transform: translateY(-10px);
}

:root:root .mf-ad-status {
  top: calc(var(--mf-pause-top) + var(--mf-pause-size));
  bottom: auto;
  left: max(12px, var(--mf-safe-left, 0px));
  right: auto;
  width: max-content;
  max-width: min(420px, calc(100% - max(12px, var(--mf-safe-left, 0px)) - var(--mf-pause-right) - var(--mf-pause-size) - 10px));
  transform: translateY(-100%);
  animation: pp-ad-status-in 0.26s ease-out;
}

:root:root .mf-ad-status.mf-ad-status--leaving {
  opacity: 0;
  transform: translateY(calc(-100% - 6px));
}

@keyframes pp-ad-status-in {
  from {
    opacity: 0;
    transform: translateY(calc(-100% - 8px));
  }
  to {
    opacity: 1;
    transform: translateY(-100%);
  }
}

@keyframes pp-ad-status-fade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  :root:root .mf-ad-status {
    animation: pp-ad-status-fade 0.26s ease-out;
  }

  :root:root .mf-ad-status.mf-ad-status--leaving {
    transform: translateY(-100%);
  }
}
