:root {
  --mm-bg: #f4f8fb;
  --mm-text: #172033;
  --mm-muted: #5b6b7f;
  --mm-glass: rgba(255, 255, 255, .58);
  --mm-glass-strong: rgba(255, 255, 255, .76);
  --mm-border: rgba(255, 255, 255, .78);
  --mm-shadow: 0 18px 50px rgba(71, 101, 130, .16);
  --mm-accent: #16a34a;
}

html.mm-dark {
  --mm-bg: #0b1018;
  --mm-text: #eef6ff;
  --mm-muted: #a7b5c7;
  --mm-glass: rgba(24, 35, 49, .6);
  --mm-glass-strong: rgba(27, 39, 54, .78);
  --mm-border: rgba(148, 184, 214, .18);
  --mm-shadow: 0 20px 60px rgba(0, 0, 0, .38);
  --mm-accent: #4ade80;
}

html, body { background: var(--mm-bg); color: var(--mm-text); transition: background .25s ease, color .25s ease; }
body::before, body::after { content: ''; position: fixed; z-index: -1; pointer-events: none; border-radius: 999px; filter: blur(60px); opacity: .42; }
body::before { width: 28rem; height: 28rem; top: -10rem; left: -8rem; background: #7dd3fc; }
body::after { width: 26rem; height: 26rem; right: -8rem; bottom: -10rem; background: #86efac; }

.mm-liquid-glass { background: var(--mm-glass); border: 1px solid var(--mm-border); box-shadow: var(--mm-shadow); backdrop-filter: blur(22px) saturate(145%); -webkit-backdrop-filter: blur(22px) saturate(145%); }
.mm-liquid-glass-strong { background: var(--mm-glass-strong); border: 1px solid var(--mm-border); box-shadow: var(--mm-shadow); backdrop-filter: blur(24px) saturate(155%); -webkit-backdrop-filter: blur(24px) saturate(155%); }

.mm-theme-switch { display: inline-flex; align-items: center; justify-content: center; width: 2.9rem; height: 2.9rem; padding: .2rem; border: 1px solid var(--mm-border); border-radius: 999px; background: var(--mm-glass-strong); box-shadow: 0 8px 24px rgba(31, 41, 55, .12); cursor: pointer; }
.mm-theme-switch input { position: absolute; opacity: 0; pointer-events: none; }
.mm-theme-slider { position: relative; display: block; width: 2.35rem; height: 1.45rem; border-radius: 999px; background: #cbd5e1; transition: background .2s ease; }
.mm-theme-slider::after { content: '☀'; position: absolute; top: .15rem; left: .15rem; display: flex; align-items: center; justify-content: center; width: 1.15rem; height: 1.15rem; border-radius: 50%; background: #fff; color: #f59e0b; font-size: .72rem; box-shadow: 0 1px 3px rgba(15, 23, 42, .28); transition: transform .2s ease; }
.mm-theme-switch input:checked + .mm-theme-slider { background: #166534; }
.mm-theme-switch input:checked + .mm-theme-slider::after { content: '☾'; transform: translateX(.95rem); color: #334155; }
.mm-theme-switch input:focus-visible + .mm-theme-slider { outline: 3px solid rgba(34, 211, 238, .45); outline-offset: 2px; }

.mm-theme-switch-wrap { display: inline-flex; align-items: center; }
.mm-theme-floating { position: fixed; top: 1rem; right: 1rem; z-index: 9999; }
