.mn-page {
  --mn-ink: #24183a;
  --mn-muted: #635871;
  --mn-accent: #5c40c8;
  --mn-line: #e7dfea;
  --mn-paper: #f8f7fb;
  margin: 0;
  color: var(--mn-ink);
  background: var(--mn-paper);
  font: 15px/1.45 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.mn-page *, .mn-page *::before, .mn-page *::after { box-sizing: border-box; }
.mn-page a { text-decoration: none; }
.mn-main button, .mn-direction-dialog button { color: inherit; font: inherit; cursor: pointer; }
.mn-page :is(a, button, input):focus-visible { outline: 2px solid #6c4adc; outline-offset: 3px; }
.mn-page h1[tabindex="-1"]:focus { outline: none; }
.mn-main :is(h1, h2, h3, p) { margin: 0; }
.mn-page img { display: block; max-width: 100%; }
.mn-page svg { flex-shrink: 0; vertical-align: middle; }

.mn-art-filter { position: absolute; overflow: hidden; pointer-events: none; }

.mn-art-stage {
  -webkit-mask-image: radial-gradient(ellipse 50% 50% at center, #000 80%, transparent);
  mask-image: radial-gradient(ellipse 50% 50% at center, #000 80%, transparent);
}

.mn-page .kv-sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 204px;
  height: 100dvh;
  overflow: auto;
  z-index: 10;
}

.mn-page .mn-desktop-header { padding-inline: 32px; }

.mn-exercise .mn-button {
  display: inline-flex;
  min-height: 46px;
  padding: 8px 14px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: 9px;
  text-align: center;
  font-size: 14px;
  font-weight: 720;
  line-height: 1.2;
}

.mn-exercise .mn-primary { color: #fff; background: var(--mn-accent); border-color: #5438c0; }
.mn-exercise .mn-secondary { color: #503b79; background: #fff; border-color: #ded3ee; }
.mn-exercise .mn-primary:active { background: #482cae; }
.mn-exercise .mn-secondary:active { background: #f0eaf9; }

.mn-main .mn-exercise-sound {
  display: inline-grid;
  width: 44px;
  height: 44px;
  padding: 0;
  place-items: center;
  border: 1px solid #e4d6f3;
  border-radius: 11px;
  color: #6043bd;
  background: #f0e8fb;
}

.mn-voice-credit {
  margin: 24px auto 16px;
  padding-inline: 16px;
  color: var(--mn-muted);
  text-align: center;
  font-size: 12px;
}

.mn-voice-credit a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }

.mn-audio-status {
  position: fixed;
  inset: 76px 12px auto auto;
  z-index: 15;
  max-width: calc(100vw - 24px);
  margin: 0;
  padding: 8px 12px;
  border: 1px solid var(--mn-line);
  border-radius: 8px;
  color: var(--mn-ink);
  background: var(--mn-paper);
  font-size: 13px;
  pointer-events: none;
}

.mn-audio-status:empty { display: none; }

.mn-direction-dialog {
  width: min(316px, calc(100% - 28px));
  max-height: calc(100dvh - 28px);
  padding: 12px 16px 16px;
  overflow: auto;
  border: 1px solid #e7dfea;
  border-radius: 17px;
  background: #fff;
  color: var(--mn-ink);
  box-shadow: 0 15px 52px #24183a2f;
}

.mn-direction-dialog::backdrop { background: #21153777; }
.mn-page:has(.mn-direction-dialog[open]) { overflow: hidden; }

.mn-dialog-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 4px;
  margin-bottom: 8px;
}

.mn-dialog-head h2 { margin: 0; font-size: clamp(17px, 5.5vw, 19px); line-height: 1.2; }

.mn-direction-dialog .mn-dialog-close {
  display: grid;
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #59428b;
}

.mn-dialog-directions { display: grid; gap: 8px; }

.mn-dialog-directions button {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  min-height: 50px;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid #e1d4ef;
  border-radius: 10px;
  background: #f6f1fc;
  color: #493376;
  font-size: 15px;
  font-weight: 650;
}

.mn-dialog-directions button > :first-child { justify-self: end; }
.mn-dialog-directions button > :last-child { justify-self: start; }

.mn-dialog-directions button:active, .mn-dialog-close:active { background: #e9def7; }

@media (prefers-reduced-motion: no-preference) {
  .mn-direction-dialog[open] { animation: mn-dialog-open 150ms ease-out; }
  .mn-direction-dialog[open]::backdrop { animation: mn-dialog-fade 150ms ease-out; }
}

@keyframes mn-dialog-open {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: none; }
}

@keyframes mn-dialog-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

@media (min-width: 1024px) {
  .mn-page { padding-left: 204px; }
}

@media (max-width: 1023px) {
  .mn-page .kv-sidebar, .mn-page .mn-desktop-header { display: none !important; }
  .mn-page .kum-mobile-top {
    --kum-mobile-bar: calc(54px + env(safe-area-inset-top, 0px));
    position: sticky;
    top: 0;
    z-index: 8;
    background: #f7f4fc;
  }
  .mn-page .kum-mobile-title { inset-inline: 61px; }
}

@media (hover: hover) {
  .mn-exercise .mn-primary:hover { background: #4d30b9; }
  .mn-exercise .mn-secondary:hover { background: #f7f1fe; }
  .mn-dialog-directions button:hover, .mn-dialog-close:hover { background: #eee7f9; }
}
