: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-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;
}

@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: #101b47;
  --mf-bg-2: #080c26;
  
  --mf-surface: rgba(28, 41, 96, 0.78);
  --mf-surface-flat: rgba(12, 18, 52, 0.74);
  
  --mf-ink: #f5ead2;
  --mf-ink-dim: #b7aa8b;
  --mf-faint: rgba(245, 234, 210, 0.14);
  
  --mf-accent: #2fb8c4;
  --mf-accent-soft: rgba(47, 184, 196, 0.16);
  
  --mf-danger: #c2415f;
  --mf-up: #2fb8c4;
  
  --mf-card-border: rgba(168, 131, 74, 0.35);
  
  --mf-gold: #f0cc48;
  --mf-brand-ink: #f5ead2;
  --mf-radius: 14px;

  --mf-primary-a: #fbf3e0;
  --mf-primary-b: #eadbb8;
  --mf-primary-base: #a8834a;
  --mf-primary-ink: #1c2960;

  --mf-secondary-a: #243372;
  --mf-secondary-b: #172354;

  --mf-raised-a: #22306a;
  --mf-raised-b: #141d4a;
  --mf-line: rgba(168, 131, 74, 0.38);
  --mf-line-strong: rgba(168, 131, 74, 0.55);

  --mf-danger-a: #d4566f;
  --mf-danger-b: #a3324e;
  --mf-danger-base: #5e1a2e;

  --mf-title-a: #fffaf0;
  --mf-title-b: #f5ead2;
  --mf-title-c: #d9c49a;
  --mf-title-edge: rgba(8, 12, 38, 0.85);
  --mf-icon-edge: rgba(8, 12, 38, 0.7);
  --mf-subtitle: #c9bb98;
  
  --mf-share-a: #b8405e;
  --mf-share-b: #7e2440;
  --mf-share-ink: #fff5f0;
  --mf-share-dim: #f0c2cc;
  --mf-share-line: rgba(184, 64, 94, 0.72);
}

#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);
}

:root,
:root[data-theme="day"],
:root[data-theme="dark"] {
  --mf-font-display: 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: 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;
}

.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);
}

#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"] {
  --mi-lapis: #1c2960;
  --mi-lapis-deep: #101b47;
  --mi-ink-indigo: #080c26;
  --mi-parchment: #f5ead2;
  --mi-parchment-hi: #fbf3e0;
  --mi-parchment-lo: #eadbb8;
  --mi-leaf: #a8834a;
  --mi-leaf-soft: rgba(168, 131, 74, 0.45);
  --mi-leaf-faint: rgba(168, 131, 74, 0.22);
  --mi-firuze: #2fb8c4;
  --mi-gold: #f0cc48;
  --mi-gold-ink: #f7dc7a;
  --mi-garnet: #a3324e;
  --mi-ink-line: #1c1633;
  
  --mi-card: linear-gradient(180deg, rgba(34, 48, 108, 0.94) 0%, rgba(20, 29, 74, 0.95) 100%);
  
  --mi-rule: inset 0 0 0 3px rgba(16, 27, 71, 0.92), inset 0 0 0 4px rgba(168, 131, 74, 0.3);
  --mi-drop: 0 10px 24px rgba(4, 6, 20, 0.5);
  
  --mi-medallion: radial-gradient(120% 120% at 50% 18%, #fffaf0 0%, #fbf3e0 42%, #eadbb8 100%);
  
  --mi-lattice: repeating-linear-gradient(45deg, rgba(168, 131, 74, 0.045) 0 1px, transparent 1px 26px),
    repeating-linear-gradient(-45deg, rgba(168, 131, 74, 0.045) 0 1px, transparent 1px 26px);
  
  --mi-heading-rule: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 10'%3E%3Cpath d='M2 5H49M71 5H118' stroke='%23a8834a' stroke-width='1.2' stroke-linecap='round'/%3E%3Ccircle cx='53' cy='5' r='1.4' fill='%23a8834a'/%3E%3Ccircle cx='67' cy='5' r='1.4' fill='%23a8834a'/%3E%3Cpath d='M60 1l4.2 4-4.2 4-4.2-4z' fill='%23a8834a'/%3E%3C/svg%3E");
  --mi-radius: 14px;
}

@font-face {
  font-family: 'Philosopher';
  font-style: normal;
  font-weight: 700;
  font-display: block;
  src: url('assets/fonts/philosopher-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: 'Philosopher';
  font-style: normal;
  font-weight: 700;
  font-display: block;
  src: url('assets/fonts/philosopher-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;
}

@font-face {
  font-family: 'Philosopher';
  font-style: normal;
  font-weight: 700;
  font-display: block;
  src: url('assets/fonts/philosopher-700-cyrillic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
  font-family: 'Philosopher';
  font-style: normal;
  font-weight: 700;
  font-display: block;
  src: url('assets/fonts/philosopher-700-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: 'Philosopher';
  font-style: normal;
  font-weight: 700;
  font-display: block;
  src: url('assets/fonts/philosopher-700-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;
}

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

#menu-root > .mf-card.mf-card-main.mi-front {
  position: relative;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  grid-template-columns: minmax(0, 1fr);
  align-items: stretch;
  justify-content: stretch;
  gap: 0;
  width: 100%;
  max-width: none;
  height: 100%;
  margin: 0;
  padding: calc(12px + var(--mf-safe-top, 0px)) calc(12px + var(--mf-safe-right, 0px))
    calc(14px + var(--mf-safe-bottom, 0px)) calc(12px + var(--mf-safe-left, 0px));
  box-sizing: border-box;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: none;
  backdrop-filter: none;
  overflow: hidden;
  container-type: size;
}

.mi-top {
  grid-row: 1;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}

#menu-root > .mf-card.mi-front .mi-title {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex: 0 1 auto;
  gap: 8px;
  min-width: 0;
  min-height: 0;
  max-width: calc(100% - 58px);
  margin: 0;
  padding: 0;
  font: 700 clamp(29px, 8.6vw, 44px)/0.98 var(--mf-font-display);
  letter-spacing: 0.01em;
  text-align: start;
  color: var(--mi-parchment);
  -webkit-text-fill-color: currentColor;
  background: none;
  filter: drop-shadow(0 2px 0 rgba(8, 12, 38, 0.9)) drop-shadow(0 6px 14px rgba(4, 6, 20, 0.7));
}

.mi-title-words {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 0.08em 0.06em 0.14em;
}

.mi-title-line {
  display: block;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  background: linear-gradient(180deg, #fffaf0 10%, var(--mi-parchment) 55%, #d9c49a 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  padding-block: 0.04em;
}

.mi-title-line + .mi-title-line {
  padding-inline-start: 0.5em;
}

.mi-title-words::after {
  content: '';
  display: block;
  width: min(100%, 150px);
  height: 9px;
  margin-top: 3px;
  background: var(--mi-heading-rule) left center / 100% 100% no-repeat;
  opacity: 0.9;
}

:root[dir="rtl"] .mi-title-words::after {
  background-position: right center;
}

.mi-lamp {
  position: relative;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
}

.mi-lamp-svg,
.mi-lamp-art {
  grid-area: 1 / 1;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

:root[dir="rtl"] .mi-lamp {
  transform: scaleX(-1);
}

#menu-root > .mf-card.mi-front .mi-title-lamp {
  width: 1.3em;
  height: 1.3em;
  align-self: center;
  margin-top: -0.2em;
  margin-inline-end: -0.1em;
}

.mi-round {
  position: relative;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin: 0;
  padding: 0;
  border: 1.5px solid rgba(168, 131, 74, 0.8);
  border-radius: 50%;
  background: radial-gradient(circle at 50% 30%, #2a3a82 0%, var(--mi-lapis) 60%, var(--mi-lapis-deep) 100%);
  box-shadow: var(--mi-rule), var(--mi-drop);
  color: var(--mi-parchment);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: transform 120ms ease, background-color 140ms ease;
}

.mi-round:active {
  transform: scale(0.94);
}

.mi-round .mi-glyph {
  width: 24px;
  height: 24px;
}

.mi-menu-btn[aria-expanded="true"] {
  border-color: var(--mi-firuze);
  color: var(--mi-firuze);
}

.mi-rail {
  grid-row: 2;
  justify-self: end;
  align-self: center;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
  width: max(72px, 15.3vw);
  margin-inline-end: -8px;
  padding: 0;
}

@supports (width: 1cqw) {
  .mi-rail {
    width: max(72px, calc(15.28cqw + 8px));
  }
}

.mi-rail-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--mi-parchment);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.mi-rail-icon {
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  border: 1.5px solid rgba(168, 131, 74, 0.8);
  border-radius: 50%;
  background: radial-gradient(circle at 50% 30%, #2a3a82 0%, var(--mi-lapis) 60%, var(--mi-lapis-deep) 100%);
  box-shadow: var(--mi-rule), var(--mi-drop);
  transition: transform 120ms ease;
}

.mi-rail-item:active .mi-rail-icon {
  transform: scale(0.93);
}

.mi-rail-icon .mf-icon-art {
  width: 30px;
  height: 30px;
}

.mi-rail-label {
  display: block;
  width: 100%;
  font: 700 11.5px/1.12 var(--mf-font-display);
  letter-spacing: 0.01em;
  text-align: center;
  color: var(--mi-parchment);
  overflow-wrap: break-word;
  hyphens: manual;
  text-shadow: 0 1px 0 rgba(8, 12, 38, 0.95), 0 0 6px rgba(8, 12, 38, 0.9), 0 0 12px rgba(8, 12, 38, 0.7);
}

.mi-foot {
  grid-row: 3;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: end;
  column-gap: 10px;
  min-width: 0;
}

.mi-plaque {
  justify-self: start;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
  min-width: 0;
  max-width: 100%;
  padding: 7px 9px 8px;
  border: 1px solid var(--mi-leaf-soft);
  border-radius: var(--mi-radius);
  background: var(--mi-card);
  box-shadow: var(--mi-rule), var(--mi-drop);
}

#menu-root > .mf-card.mi-front .mf-profile-chip {
  position: relative;
  top: auto;
  left: auto;
  transform: none;
  display: flex;
  align-items: center;
  gap: 7px;
  max-width: 100%;
  height: auto;
  min-height: 40px;
  margin: 0;
  padding: 0 2px 6px 0;
  border: 0;
  border-bottom: 1px solid var(--mi-leaf-faint);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: var(--mi-parchment);
  font: 700 13px/1.12 var(--mf-font-display);
  text-align: start;
}

#menu-root > .mf-card.mi-front .mf-profile-chip:active {
  transform: scale(0.97);
}

#menu-root > .mf-card.mi-front .mf-profile-chip-face {
  width: 34px;
  height: 34px;
  border: 1.5px solid var(--mi-leaf);
  box-shadow: 0 0 0 2px rgba(16, 27, 71, 0.9);
}

#menu-root > .mf-card.mi-front .mf-profile-chip-name {
  white-space: normal;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  overflow-wrap: break-word;
}

#menu-root > .mf-card.mi-front .mf-profile-chip--empty .mf-profile-chip-name {
  color: var(--mi-firuze);
}

@media (max-width: 340px) {
  #menu-root > .mf-card.mi-front .mi-plaque .mf-profile-chip-face {
    display: none;
  }
}

.mi-log {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-inline: 2px;
}

.mi-log-row {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  min-width: 0;
  font: 700 16px/1.15 var(--mf-font-display);
  color: var(--mi-parchment);
}

.mi-log-row .mf-icon-art {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
}

.mi-log-text {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  column-gap: 5px;
  row-gap: 0;
  min-width: 0;
}

.mi-log-value {
  white-space: nowrap;
  unicode-bidi: isolate;
  direction: ltr;
  font-variant-numeric: tabular-nums;
}

.mi-log-coins .mi-log-value {
  color: var(--mi-gold-ink);
}

.mi-log-label {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11.5px;
  letter-spacing: 0.02em;
  color: var(--mf-ink-dim);
}

#menu-root > .mf-card.mi-front .mi-fly {
  justify-self: center;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  width: 104px;
  height: 104px;
  min-height: 0;
  margin: 0;
  padding: 10px 13px 12px;
  border: 2px solid var(--mi-leaf);
  border-radius: 50%;
  background: var(--mi-medallion);
  color: var(--mi-lapis);
  font: 700 18px/1 var(--mf-font-display);
  letter-spacing: 0.02em;
  box-shadow: inset 0 0 0 4px rgba(251, 243, 224, 0.95), inset 0 0 0 5.5px rgba(168, 131, 74, 0.55),
    0 0 0 5px rgba(16, 27, 71, 0.55), 0 12px 26px rgba(4, 6, 20, 0.6);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  animation: mi-fly-land 560ms cubic-bezier(0.22, 1.2, 0.36, 1) 140ms backwards;
  transition: transform 120ms ease;
}

#menu-root > .mf-card.mi-front .mi-fly::before {
  content: '';
  position: absolute;
  inset: -11px;
  border-radius: 50%;
  border: 1.5px solid rgba(47, 184, 196, 0.55);
  box-shadow: 0 0 14px rgba(47, 184, 196, 0.3);
  pointer-events: none;
  animation: mi-fly-breathe 2.8s ease-in-out infinite;
}

#menu-root > .mf-card.mi-front .mi-fly:active {
  transform: translateY(2px) scale(0.97);
}

#menu-root > .mf-card.mi-front .mi-fly-lamp {
  width: 50px;
  height: 50px;
  margin-top: -4px;
}

.mi-fly-label {
  display: block;
  max-width: 100%;
  line-height: 1.04;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: clip;
}

#menu-root > .mf-card.mi-front .mi-fly.mi-fly--two .mi-fly-lamp {
  width: 38px;
  height: 38px;
  margin-top: 0;
}

#menu-root > .mf-card.mi-front .mi-fly.mi-fly--two {
  padding-inline: 7px;
}

.mi-fly--two .mi-fly-label {
  white-space: normal;
  overflow-wrap: normal;
  hyphens: manual;
  font-size: 12px;
}

@keyframes mi-fly-land {
  0% {
    transform: translateY(10px) scale(0.9);
    opacity: 0;
  }
  60% {
    transform: translateY(0) scale(1.04);
    opacity: 1;
  }
  100% {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}

@keyframes mi-fly-breathe {
  0%,
  100% {
    opacity: 0.35;
    transform: scale(0.97);
  }
  50% {
    opacity: 1;
    transform: scale(1.03);
  }
}

.mi-tag-cell {
  justify-self: end;
  display: flex;
  justify-content: flex-end;
  align-items: flex-end;
  min-width: 0;
  max-width: 100%;
}

.mi-noads {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  max-width: 100%;
  min-height: 42px;
  margin: 0;
  padding: 4px 11px 4px 6px;
  border: 1px solid rgba(240, 204, 72, 0.62);
  border-radius: 12px;
  background: var(--mi-card);
  box-shadow: inset 0 0 0 2px rgba(16, 27, 71, 0.9), inset 0 0 0 3px rgba(240, 204, 72, 0.18), var(--mi-drop);
  color: var(--mi-gold-ink);
  font: 700 12.5px/1.12 var(--mf-font-display);
  text-align: start;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.mi-noads:active {
  transform: scale(0.96);
}

.mi-noads-mark {
  flex: 0 0 auto;
  display: grid;
}

.mi-noads-mark svg {
  width: 26px;
  height: 26px;
}

.mi-noads-label {
  min-width: 0;
  overflow-wrap: normal;
}

.mi-noads.mi-noads--text {
  padding-inline: 10px;
}

.mi-noads--text .mi-noads-mark,
.mi-noads--mark .mi-noads-label {
  display: none;
}

.mi-noads.mi-noads--mark {
  gap: 0;
  padding-inline: 8px;
}

.mi-scrim {
  position: fixed;
  inset: 0;
  z-index: 5;
  background: rgba(6, 9, 30, 0.5);
}

.mi-sheet {
  position: absolute;
  z-index: 6;
  top: calc(12px + var(--mf-safe-top, 0px) + 58px);
  inset-inline-end: calc(12px + var(--mf-safe-right, 0px));
  display: flex;
  flex-direction: column;
  gap: 0;
  width: min(290px, calc(100% - 24px));
  max-height: calc(100% - 96px - var(--mf-safe-top, 0px));
  overflow-y: auto;
  padding: 8px;
  box-sizing: border-box;
  border: 1px solid rgba(168, 131, 74, 0.7);
  border-radius: 16px;
  background: linear-gradient(180deg, #22306a 0%, #141d4a 100%);
  box-shadow: var(--mi-rule), 0 22px 50px rgba(4, 6, 20, 0.7);
  animation: mi-sheet-in 170ms ease-out both;
}

.mi-sheet::before {
  content: '';
  position: absolute;
  top: -7px;
  inset-inline-end: 18px;
  width: 12px;
  height: 12px;
  background: #22306a;
  border-top: 1px solid rgba(168, 131, 74, 0.7);
  border-left: 1px solid rgba(168, 131, 74, 0.7);
  transform: rotate(45deg);
}

@keyframes mi-sheet-in {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.mi-sheet-row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 50px;
  margin: 0;
  padding: 6px 10px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--mi-parchment);
  font: 700 16px/1.2 var(--mf-font-display);
  text-align: start;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.mi-sheet-row + .mi-sheet-row {
  box-shadow: inset 0 1px 0 rgba(168, 131, 74, 0.2);
}

.mi-sheet-row:active {
  background: rgba(245, 234, 210, 0.08);
}

.mi-sheet-icon {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
}

.mi-sheet-icon .mf-icon-art {
  width: 28px;
  height: 28px;
}

.mi-sheet-label {
  flex: 1 1 auto;
  min-width: 0;
  overflow-wrap: break-word;
}

.mi-sheet-row--gold {
  color: var(--mi-gold-ink);
}

.mi-switch {
  flex: 0 0 auto;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  width: 40px;
  height: 24px;
  padding: 3px;
  box-sizing: border-box;
  border-radius: 999px;
  background: var(--mi-firuze);
  box-shadow: inset 0 1px 2px rgba(4, 6, 20, 0.4);
}

.mi-switch::after {
  content: '';
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--mi-parchment-hi);
  box-shadow: 0 1px 2px rgba(4, 6, 20, 0.5);
}

.mi-sheet-row--off .mi-switch {
  justify-content: flex-start;
  background: rgba(245, 234, 210, 0.18);
}

.mi-sheet-legal {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 16px;
  margin-top: 4px;
  padding: 8px 10px 2px;
  border-top: 1px solid rgba(168, 131, 74, 0.3);
}

#menu-root .mi-sheet .mf-legal-link {
  margin: 0;
  padding: 6px 0;
  border: 0;
  background: none;
  color: var(--mf-ink-dim);
  font: 600 13px/1.3 var(--mf-font);
  text-decoration: underline;
  text-decoration-color: rgba(183, 170, 139, 0.5);
  text-underline-offset: 3px;
  cursor: pointer;
}

@supports (width: 1cqw) {
  #menu-root > .mf-card.mi-front .mi-fly {
    width: clamp(88px, min(12.4cqh, 29cqw), 128px);
    height: clamp(88px, min(12.4cqh, 29cqw), 128px);
  }

  #menu-root > .mf-card.mi-front .mi-fly-lamp {
    width: clamp(46px, 6cqh, 62px);
    height: clamp(46px, 6cqh, 62px);
  }

  #menu-root > .mf-card.mi-front .mi-title {
    font-size: clamp(29px, 8.6cqw, 46px);
  }
}

@media (min-height: 1000px) {
  .mi-rail {
    gap: 16px;
  }

  .mi-rail-icon {
    width: 58px;
    height: 58px;
  }

  .mi-rail-icon .mf-icon-art {
    width: 34px;
    height: 34px;
  }

  .mi-rail-label {
    font-size: 13px;
  }

  .mi-plaque {
    padding: 9px 12px 10px;
  }

  .mi-log-row {
    font-size: 18px;
  }

  .mi-noads {
    font-size: 14px;
    min-height: 46px;
  }

  #menu-root > .mf-card.mi-front .mf-profile-chip {
    font-size: 15px;
  }
}

@media (max-height: 700px) {
  .mi-rail {
    gap: 8px;
  }

  .mi-rail-icon {
    width: 46px;
    height: 46px;
  }

  .mi-rail-icon .mf-icon-art {
    width: 27px;
    height: 27px;
  }

  #menu-root > .mf-card.mi-front .mf-profile-chip {
    min-height: 36px;
    padding-bottom: 5px;
  }

  #menu-root > .mf-card.mi-front .mf-profile-chip-face {
    width: 30px;
    height: 30px;
  }

  .mi-log-row {
    font-size: 15px;
  }
}

@container (max-width: 350px) {
  .mi-foot {
    column-gap: 7px;
  }

  .mi-plaque {
    padding: 6px 7px 7px;
  }

  #menu-root > .mf-card.mi-front .mf-profile-chip {
    gap: 5px;
  }

  #menu-root > .mf-card.mi-front .mf-profile-chip-face {
    width: 28px;
    height: 28px;
  }

  .mi-log-row {
    gap: 5px;
    font-size: 15px;
  }

  .mi-log-row .mf-icon-art {
    width: 18px;
    height: 18px;
  }

  .mi-noads {
    padding-inline: 5px 8px;
    gap: 5px;
  }

  .mi-noads-mark svg {
    width: 22px;
    height: 22px;
  }
}

@media (max-height: 540px) {
  #menu-root > .mf-card.mf-card-main.mi-front {
    padding-top: calc(8px + var(--mf-safe-top, 0px));
    padding-bottom: calc(6px + var(--mf-safe-bottom, 0px));
  }

  #menu-root > .mf-card.mi-front .mi-title {
    font-size: 24px;
  }

  .mi-title-words {
    flex-direction: row;
    gap: 0.25em;
  }

  .mi-title-line + .mi-title-line {
    padding-inline-start: 0;
  }

  .mi-title-words::after {
    display: none;
  }

  .mi-rail {
    gap: 6px;
  }

  .mi-rail-icon {
    width: 42px;
    height: 42px;
  }

  .mi-rail-icon .mf-icon-art {
    width: 25px;
    height: 25px;
  }

  .mi-rail-label {
    display: none;
  }

  #menu-root > .mf-card.mi-front .mi-fly {
    width: 80px;
    height: 80px;
    padding: 6px 8px;
    font-size: 15px;
  }

  #menu-root > .mf-card.mi-front .mi-fly.mi-fly--two {
    padding-inline: 5px;
  }

  #menu-root > .mf-card.mi-front .mi-fly::before {
    inset: -6px;
  }

  #menu-root > .mf-card.mi-front .mi-fly-lamp {
    width: 36px;
    height: 36px;
  }

  #menu-root > .mf-card.mi-front .mf-profile-chip {
    min-height: 32px;
    font-size: 12px;
  }

  #menu-root > .mf-card.mi-front .mf-profile-chip-face {
    width: 28px;
    height: 28px;
  }

  .mi-log-row {
    font-size: 14px;
  }

  .mi-noads {
    min-height: 38px;
  }
}

@media (prefers-reduced-motion: reduce) {
  #menu-root > .mf-card.mi-front .mi-fly,
  #menu-root > .mf-card.mi-front .mi-fly::before,
  .mi-sheet {
    animation: none;
  }
}

#menu-root > .mf-card:not(.mi-front) {
  background-color: var(--mi-ink-indigo);
  background-image: radial-gradient(80% 40% at 50% 8%, rgba(47, 70, 150, 0.35) 0%, transparent 72%),
    var(--mi-lattice),
    radial-gradient(130% 95% at 50% 45%, transparent 45%, rgba(4, 6, 20, 0.6) 100%),
    linear-gradient(170deg, var(--mi-lapis-deep) 0%, var(--mi-ink-indigo) 100%);
  background-size: cover, auto, auto, cover, cover;
  background-repeat: no-repeat, repeat, repeat, no-repeat, no-repeat;
  backdrop-filter: none;
}

:root:root .mf-title {
  font-weight: 700;
  letter-spacing: 0.01em;
}

#menu-root > .mf-card:not(.mi-front) > .mf-title:not(.mf-board-title)::after,
#overlay-root .mf-card > .mf-title::after {
  content: '';
  display: block;
  width: min(52%, 170px);
  height: 10px;
  margin: 6px auto 0;
  background: var(--mi-heading-rule) center / 100% 100% no-repeat;
}

:root:root .mf-btn {
  border-radius: 12px;
  background: linear-gradient(180deg, var(--mf-secondary-a) 0%, var(--mf-secondary-b) 100%);
  border: 1px solid rgba(168, 131, 74, 0.7);
  box-shadow: var(--mi-rule), 0 6px 14px rgba(4, 6, 20, 0.45);
}

:root:root .mf-btn::after {
  display: none;
}

:root:root .mf-btn:active {
  transform: translateY(1px) scale(0.985);
  box-shadow: var(--mi-rule), 0 3px 8px rgba(4, 6, 20, 0.45);
}

:root:root .mf-btn.mf-btn-primary {
  background: var(--mi-medallion);
  border: 1.5px solid var(--mi-leaf);
  color: var(--mi-lapis);
  box-shadow: inset 0 0 0 3px rgba(251, 243, 224, 0.95), inset 0 0 0 4px rgba(168, 131, 74, 0.5),
    0 8px 18px rgba(4, 6, 20, 0.5);
}

:root:root .mf-btn.mf-btn-primary:active {
  transform: translateY(2px) scale(0.99);
  box-shadow: inset 0 0 0 3px rgba(251, 243, 224, 0.95), inset 0 0 0 4px rgba(168, 131, 74, 0.5),
    0 4px 10px rgba(4, 6, 20, 0.5);
}

:root:root .mf-btn.mf-btn-danger {
  border: 1px solid rgba(240, 194, 204, 0.45);
  box-shadow: inset 0 0 0 3px rgba(94, 26, 46, 0.55), inset 0 0 0 4px rgba(240, 194, 204, 0.2),
    0 6px 14px rgba(4, 6, 20, 0.45);
  
  color: var(--mi-parchment);
}

: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(28, 22, 51, 0.95)) drop-shadow(0 0 0.8px rgba(28, 22, 51, 0.95));
}

:root:root .mf-btn.mf-btn-ad {
  background: linear-gradient(180deg, #f7dc7a 0%, #e2b53a 100%);
  color: #2a1d10;
  border: 1px solid rgba(255, 240, 184, 0.8);
  box-shadow: inset 0 0 0 3px rgba(156, 116, 32, 0.28), 0 8px 18px rgba(240, 204, 72, 0.22);
}

:root:root .mf-btn.mf-btn-ad:disabled {
  filter: saturate(0.55) brightness(0.9);
}

@media (max-height: 700px) {
  .mf-list-row .mf-list-desc .mf-list-hint.mf-list-hint-ad {
    display: block;
  }
}

:root:root .mf-list-row,
:root:root .mf-board-row,
:root:root .mf-howto-score-row {
  border-radius: 12px;
  border-color: var(--mi-leaf-faint);
  box-shadow: inset 0 1px 0 rgba(245, 234, 210, 0.04);
}

:root:root .mf-list-row.mf-row-equipped,
:root:root .mf-lang-option.mf-lang-active {
  border-color: var(--mi-firuze);
  box-shadow: 0 0 0 1px rgba(47, 184, 196, 0.25), 0 0 14px rgba(47, 184, 196, 0.14);
}

:root:root .mf-toggle,
.mf-toggle-group {
  border-radius: 12px;
}

#menu-root .mf-shop-panel .mf-item-preview {
  position: relative;
  width: 54px;
  height: 54px;
  border-radius: 12px;
  overflow: visible;
  background: radial-gradient(circle at 50% 35%, #26357a 0%, var(--mi-lapis-deep) 100%);
  border: 1px solid var(--mi-leaf-soft);
  box-shadow: inset 0 0 0 2px rgba(8, 12, 38, 0.6), 0 5px 12px rgba(4, 6, 20, 0.5);
}

#menu-root .mf-shop-panel .mf-item-preview-art {
  border-radius: 12px;
}

#menu-root .mf-shop-panel .mf-item-preview.mf-item-locked {
  filter: none;
  opacity: 1;
}

#menu-root .mf-shop-panel .mf-row-equipped .mf-item-preview {
  border-color: var(--mi-firuze);
  box-shadow: 0 0 0 1px var(--mi-firuze), 0 0 12px rgba(47, 184, 196, 0.35), 0 5px 12px rgba(4, 6, 20, 0.5);
}

.mf-item-lock {
  position: absolute;
  right: -5px;
  bottom: -4px;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #2a3a82 0%, var(--mi-ink-indigo) 100%);
  box-shadow: 0 0 0 1.5px rgba(240, 204, 72, 0.85), 0 3px 8px rgba(4, 6, 20, 0.65);
  color: var(--mi-gold);
  pointer-events: none;
}

.mf-item-lock .mf-glyph {
  width: 13px;
  height: 13px;
}

@media (max-height: 800px) {
  #menu-root .mf-shop-panel .mf-item-preview {
    width: 48px;
    height: 48px;
  }
}

@media (max-height: 700px) {
  #menu-root .mf-shop-panel .mf-item-preview {
    width: 42px;
    height: 42px;
    border-radius: 11px;
  }

  #menu-root .mf-shop-panel .mf-item-preview-art {
    border-radius: 11px;
  }

  .mf-item-lock {
    width: 19px;
    height: 19px;
    right: -4px;
    bottom: -3px;
  }

  .mf-item-lock .mf-glyph {
    width: 11px;
    height: 11px;
  }
}

.mf-profile-tile--picked {
  border-color: var(--mi-firuze);
  box-shadow: 0 0 0 3px rgba(47, 184, 196, 0.3), 0 0 14px rgba(47, 184, 196, 0.3);
}

#menu-root .mf-profile-face {
  border-color: var(--mi-leaf);
}

#menu-root .mf-profile-grid {
  max-height: calc(4 * 72px + 3 * 8px + 2 * 8px + 2px);
  grid-template-columns: repeat(4, minmax(0, 72px));
  justify-content: center;
}

@media (min-width: 700px) and (min-height: 900px) {
  #menu-root .mf-profile-grid {
    max-height: calc(4 * 128px + 3 * 10px + 2 * 10px + 2px);
    grid-template-columns: repeat(4, minmax(0, 128px));
  }

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

#overlay-root .mf-card {
  border-radius: 18px;
  border: 1px solid rgba(168, 131, 74, 0.7);
  background-color: var(--mi-lapis-deep);
  background-image: var(--mi-lattice), linear-gradient(180deg, var(--mf-raised-a) 0%, var(--mf-raised-b) 100%);
  box-shadow: inset 0 0 0 4px rgba(16, 27, 71, 0.92), inset 0 0 0 5px rgba(168, 131, 74, 0.3),
    0 24px 60px rgba(4, 6, 20, 0.65);
}

#overlay-root .mf-icon-btn.mf-icon-btn-action {
  border-radius: 14px;
  background: linear-gradient(180deg, var(--mf-secondary-a) 0%, var(--mf-secondary-b) 100%);
  border: 1px solid rgba(168, 131, 74, 0.7);
  box-shadow: var(--mi-rule), 0 6px 14px rgba(4, 6, 20, 0.45);
  font-family: var(--mf-font-display);
}

:root:root:root #overlay-root .mf-icon-btn.mf-icon-btn-primary {
  background: var(--mi-medallion);
  border: 1.5px solid var(--mi-leaf);
  color: var(--mi-lapis);
  box-shadow: inset 0 0 0 3px rgba(251, 243, 224, 0.95), inset 0 0 0 4px rgba(168, 131, 74, 0.5),
    0 8px 18px rgba(4, 6, 20, 0.5);
}

#overlay-root .mf-icon-btn-action .mf-action-label {
  font-weight: 700;
}

#overlay-root .mf-icon-btn.mf-mute-btn,
#overlay-root .mf-icon-btn.mf-howto-btn {
  border-radius: 50%;
  background: radial-gradient(circle at 50% 30%, #2a3a82 0%, var(--mi-lapis) 60%, var(--mi-lapis-deep) 100%);
  border: 1.5px solid rgba(168, 131, 74, 0.8);
  box-shadow: var(--mi-rule);
}

#overlay-root .mf-card .mf-mascot.mf-pause-mascot,
#overlay-root .mf-card .mf-mascot.mf-gameover-mascot {
  display: block;
}

#overlay-root .mf-card .mf-mascot.mf-gameover-mascot {
  width: 120px !important;
  height: 120px;
  margin: 0 auto 4px !important;
}

body.mf-short #overlay-root .mf-card .mf-mascot.mf-gameover-mascot {
  width: 84px !important;
  height: 84px;
  margin: -4px auto -6px !important;
}

.mf-noads-svg > circle {
  fill: var(--mi-lapis);
  stroke: #c2415f;
}

.mf-noads-svg > path:last-child {
  stroke: #c2415f;
}

.mf-update-mark .mf-update-disc {
  fill: var(--mi-lapis);
  stroke: var(--mi-firuze);
}

.mf-update-mark .mf-update-stroke {
  stroke: var(--mi-firuze);
}

:root:root .mf-toast {
  border-radius: 14px;
  border: 1px solid rgba(168, 131, 74, 0.6);
}

#menu-root:not(.mf-hidden) ~ .mf-toast-root {
  bottom: calc(14px + var(--mf-safe-bottom, 0px) + 128px + 14px);
}

@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));
  }
}

@media (min-width: 700px) {
  html body .mf-shell,
  html body .mf-shell.mf-shell {
    --mf-safe-left: 0px;
    --mf-safe-right: 0px;
  }
}

.mf-howto-score-value:not(.mf-howto-score-effect) {
  direction: ltr;
  unicode-bidi: isolate;
}

.mf-corner-stat {
  text-shadow: 0 1px 0 rgba(8, 12, 38, 0.95), 0 0 6px rgba(8, 12, 38, 0.9), 0 0 12px rgba(8, 12, 38, 0.7);
}

:root:root .mf-ad-status {
  background: linear-gradient(180deg, rgba(34, 48, 106, 0.97) 0%, rgba(20, 29, 74, 0.97) 100%);
  border: 1px solid rgba(240, 204, 72, 0.55);
  box-shadow: 0 8px 22px rgba(4, 6, 20, 0.5);
  color: var(--mi-gold-ink);
}

@media (min-width: 700px), (min-aspect-ratio: 1/1) {
  body {
    background-color: var(--mi-ink-indigo);
    background-image: var(--mi-lattice), radial-gradient(120% 90% at 50% 40%, transparent 40%, rgba(4, 6, 20, 0.55) 100%),
      linear-gradient(170deg, var(--mi-lapis-deep) 0%, var(--mi-ink-indigo) 100%);
    background-size: auto, auto, cover, cover;
    background-repeat: repeat, repeat, no-repeat, no-repeat;
  }

  .mf-overlay.mf-dim {
    position: fixed;
    inset: 0;
  }
}
