.page-shell {
  width: min(var(--mn-container), calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0 28px;
}

.mn-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 16px;
  min-height: 78px;
  padding: 12px 16px;
  border: 1px solid rgba(32, 54, 58, 0.08);
  border-radius: var(--mn-radius-lg);
  background: rgba(255, 255, 255, 0.88);
  box-shadow: var(--mn-shadow-soft);
  backdrop-filter: blur(10px);
}

.mn-header-left,
.mn-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.mn-header-left {
  justify-self: start;
}

.mn-header-actions {
  justify-self: end;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.mn-brand {
  display: inline-flex;
  align-items: center;
  flex: none;
  min-width: 0;
  color: var(--mn-ink);
  text-decoration: none;
}

.mn-brand img {
  display: block;
  width: clamp(106px, 15vw, 138px);
  height: auto;
}

.mn-title {
  justify-self: center;
  min-width: 0;
  text-align: center;
}

.mn-title h1 {
  margin: 0;
  color: var(--mn-teal);
  font-size: clamp(1.65rem, 3vw, 2.45rem);
  font-weight: 800;
  line-height: 1.06;
}

.mn-home-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid var(--mn-line);
  border-radius: 999px;
  background: var(--mn-surface-strong);
  color: var(--mn-teal);
  font-size: 0.92rem;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}

.tool-intro {
  max-width: 760px;
  margin: 18px auto 22px;
  text-align: center;
}

.tool-intro p {
  margin: 0;
  color: var(--mn-ink-soft);
  font-size: 1.05rem;
  line-height: 1.65;
}

.layout,
.app-grid {
  display: grid;
  gap: 18px;
  align-items: start;
}

.mn-footer {
  margin-top: 24px;
  padding: 36px 12px 34px;
  color: #3f4544;
  text-align: center;
}

.mn-footer p {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 400;
}

@media (max-width: 640px) {
  .page-shell {
    width: min(100% - 24px, var(--mn-container));
    padding-top: 12px;
  }

  .mn-header {
    grid-template-columns: auto minmax(0, 1fr);
    justify-items: stretch;
    min-height: 0;
  }

  .mn-header-left,
  .mn-header-actions {
    align-self: center;
  }

  .mn-header-actions {
    justify-self: end;
  }

  .mn-title {
    grid-column: 1 / -1;
    order: -1;
    justify-self: stretch;
  }
}

@media (max-width: 560px) {
  .page-shell {
    width: min(100% - 20px, var(--mn-container));
  }

  .mn-header {
    padding: 12px;
    border-radius: 18px;
  }

  .mn-brand img {
    width: 112px;
  }

  .tool-intro {
    margin-top: 14px;
  }
}
