@layer components {

  .page-container {
      max-width: 840px;
      margin-left: auto;
      margin-right: auto;
      padding: 32px 20px 80px 20px;
  }

  .page-title {
      @apply text-center font-semibold text-2xl tracking-tight text-gray-900 mt-0 mb-2;
  }

  .page-subtitle {
      @apply text-center text-base text-gray-500 mb-8 leading-relaxed;
  }

  .section-title {
      @apply text-lg font-semibold text-gray-900 mt-6 mb-2;
  }

  .empty-state {
      @apply text-center my-10 leading-relaxed;
  }

  .empty-state-title {
      @apply text-lg font-medium text-gray-700 mb-1;
  }

  .empty-state-subtitle {
      @apply text-sm text-gray-500;
  }

  .mm-btn-primary {
      @apply inline-block bg-blue-500 text-white px-6 py-3 rounded-full font-medium text-center transition hover:bg-blue-600;
  }

  .mm-btn-secondary {
      @apply inline-block bg-white border border-blue-200 text-blue-600 px-4 py-2 rounded-full transition hover:bg-blue-50;
  }

  .btn-row {
      @apply flex justify-center gap-3 mt-5;
  }

  .mm-card {
      @apply bg-white rounded-xl p-6 shadow-md;
  }

} /* end @layer components */

/* MM_UI_STANDARD_FOUNDATION_V1: START */

/*
  Mind Mirror Shared UI Foundation

  Purpose:
  - Calm Apple-like app-wide visual language
  - Shared page, card, button, input, and text classes
  - Backward-compatible foundation only
  - No template logic changes required

  Homepage-aligned standard:
  - Primary blue: #0071e3
  - Hover blue: #147ce5
  - Main text: #1d1d1f
  - Muted text: #6e6e73
  - Quiet text: #86868b
  - Soft background: #f5f5f7 / #fbfbfd
*/

:root {
  --mm-blue: #0071e3;
  --mm-blue-hover: #147ce5;
  --mm-ink: #1d1d1f;
  --mm-muted: #6e6e73;
  --mm-quiet: #86868b;
  --mm-soft-bg: #f5f5f7;
  --mm-page-bg: #fbfbfd;
  --mm-white: #ffffff;
  --mm-border: rgba(29, 29, 31, 0.08);
  --mm-border-strong: rgba(29, 29, 31, 0.12);
  --mm-shadow-soft: 0 24px 60px rgba(29, 29, 31, 0.07);
  --mm-shadow-button: 0 10px 24px rgba(0, 113, 227, 0.18);
  --mm-shadow-button-hover: 0 14px 30px rgba(0, 113, 227, 0.22);
  --mm-radius-lg: 24px;
  --mm-radius-xl: 32px;
  --mm-radius-pill: 9999px;
  --mm-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.mm-page-shell {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: clamp(28px, 5vw, 64px) clamp(18px, 4vw, 40px);
  color: var(--mm-ink);
  font-family: var(--mm-font);
}

.mm-page-header {
  max-width: 820px;
  margin-bottom: clamp(28px, 5vw, 52px);
}

.mm-eyebrow {
  display: block;
  margin-bottom: 12px;
  color: var(--mm-quiet);
  font-size: 0.78rem;
  line-height: 1.2;
  font-weight: 650;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.mm-page-title {
  margin: 0;
  color: var(--mm-ink);
  font-size: clamp(2rem, 5vw, 3.5rem);
  line-height: 0.98;
  font-weight: 650;
  letter-spacing: -0.055em;
}

.mm-page-subtitle {
  max-width: 720px;
  margin-top: 16px;
  color: var(--mm-muted);
  font-size: clamp(1.05rem, 2vw, 1.35rem);
  line-height: 1.45;
  font-weight: 400;
}

.mm-section {
  margin-top: clamp(28px, 4vw, 48px);
}

.mm-card,
.mm-soft-card {
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid var(--mm-border);
  border-radius: var(--mm-radius-xl);
  box-shadow: var(--mm-shadow-soft);
  padding: clamp(22px, 4vw, 36px);
  color: var(--mm-ink);
}

.mm-soft-card {
  background:
    linear-gradient(180deg, rgba(255,255,255,0.92), rgba(255,255,255,0.78));
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.mm-primary-button,
.mm-secondary-button,
.mm-danger-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.78rem 1.35rem;
  border-radius: var(--mm-radius-pill);
  font-family: var(--mm-font);
  font-size: 0.95rem;
  line-height: 1;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition:
    transform 180ms ease,
    background-color 180ms ease,
    border-color 180ms ease,
    color 180ms ease,
    box-shadow 180ms ease,
    opacity 180ms ease;
}

.mm-primary-button {
  background: var(--mm-blue);
  color: #ffffff;
  border: 1px solid var(--mm-blue);
  box-shadow: var(--mm-shadow-button);
}

.mm-primary-button:hover {
  background: var(--mm-blue-hover);
  border-color: var(--mm-blue-hover);
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: var(--mm-shadow-button-hover);
}

.mm-secondary-button {
  background: rgba(255, 255, 255, 0.8);
  color: var(--mm-ink);
  border: 1px solid var(--mm-border-strong);
  box-shadow: 0 8px 20px rgba(29, 29, 31, 0.04);
}

.mm-secondary-button:hover {
  background: #ffffff;
  color: var(--mm-ink);
  border-color: rgba(29, 29, 31, 0.18);
  transform: translateY(-1px);
  box-shadow: 0 12px 28px rgba(29, 29, 31, 0.06);
}

.mm-danger-button {
  background: rgba(255, 59, 48, 0.08);
  color: #b42318;
  border: 1px solid rgba(255, 59, 48, 0.18);
  box-shadow: none;
}

.mm-danger-button:hover {
  background: rgba(255, 59, 48, 0.12);
  color: #9f1f17;
  border-color: rgba(255, 59, 48, 0.26);
  transform: translateY(-1px);
}

.mm-input {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--mm-border-strong);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.86);
  color: var(--mm-ink);
  font-family: var(--mm-font);
  font-size: 1rem;
  line-height: 1.5;
  padding: 0.9rem 1rem;
  outline: none;
  transition:
    border-color 160ms ease,
    background-color 160ms ease,
    box-shadow 160ms ease;
}

.mm-input:focus {
  background: #ffffff;
  border-color: rgba(0, 113, 227, 0.55);
  box-shadow: 0 0 0 4px rgba(0, 113, 227, 0.10);
}

.mm-text-muted {
  color: var(--mm-muted);
}

@media (max-width: 640px) {
  .mm-page-shell {
    padding: 28px 18px 40px;
  }

  .mm-page-header {
    margin-bottom: 30px;
  }

  .mm-page-title {
    font-size: clamp(2rem, 11vw, 2.75rem);
    line-height: 1.02;
  }

  .mm-page-subtitle {
    font-size: 1.05rem;
    line-height: 1.5;
  }

  .mm-card,
  .mm-soft-card {
    border-radius: 24px;
    padding: 22px;
  }

  .mm-primary-button,
  .mm-secondary-button,
  .mm-danger-button {
    width: 100%;
    min-height: 46px;
  }
}

/* MM_UI_STANDARD_FOUNDATION_V1: END */

/* MM_STABLE_SCROLLBAR_2G_V1: START */
html {
  overflow-y: scroll;
  scrollbar-gutter: stable;
}
/* MM_STABLE_SCROLLBAR_2G_V1: END */
