﻿/* ==========================================================================
   鐡︾撼娴峰濡欏宸ュ叿 路 鐙珛鏀嚎鏍峰紡
   ========================================================================== */

:root {
  --night: #070b1c;
  --night-2: #0c1430;
  --ink: #e9eefc;
  --muted: #9fb0cf;
  --muted-2: #6f7f9e;
  --gold: #e8c87a;
  --mint: #7ee8c8;
  --rose: #ffb4c8;
  --line: rgba(126, 232, 200, 0.16);

  --paper: #fbf6ea;
  --paper-2: #f3ebda;
  --paper-line: #e4d8c2;
  --paper-ink: #2a241b;
  --paper-muted: #6b5f4e;
  --cinnabar: #b5462f;

  --serif: "Songti SC", "Noto Serif SC", "Source Han Serif SC", STSong, SimSun, serif;
  --sans: "PingFang SC", "HarmonyOS Sans SC", "MiSans", "Microsoft YaHei", system-ui, sans-serif;
  --mono: "JetBrains Mono", "SFMono-Regular", Consolas, monospace;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.75;
  color: var(--ink);
  background: var(--night);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: radial-gradient(60% 50% at 82% -4%, rgba(126, 232, 200, 0.11), transparent 70%),
    radial-gradient(52% 44% at 4% 18%, rgba(232, 200, 122, 0.07), transparent 70%),
    radial-gradient(70% 60% at 50% 110%, rgba(62, 92, 180, 0.12), transparent 70%);
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea,
select {
  font: inherit;
  color: inherit;
}

h1,
h2,
h3,
p,
figure {
  margin: 0;
}

::selection {
  background: var(--mint);
  color: #06121f;
}

:focus-visible {
  outline: 2px solid var(--mint);
  outline-offset: 3px;
  border-radius: 4px;
}

.mm-container {
  position: relative;
  z-index: 2;
  width: min(1120px, 100% - 40px);
  margin-inline: auto;
}

.mm-stars {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.5;
  background-image: radial-gradient(1px 1px at 12% 18%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 72% 12%, #d8ecff 50%, transparent 51%),
    radial-gradient(1.4px 1.4px at 38% 64%, #ffe9b8 50%, transparent 51%),
    radial-gradient(1px 1px at 88% 72%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 24% 88%, #bfeee4 50%, transparent 51%),
    radial-gradient(1px 1px at 56% 36%, #fff 50%, transparent 51%),
    radial-gradient(1.2px 1.2px at 8% 52%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 94% 40%, #cfe3ff 50%, transparent 51%);
  background-size: 340px 340px, 280px 280px, 430px 430px, 390px 390px, 460px 460px, 320px 320px,
    300px 300px, 410px 410px;
  animation: mm-twinkle 9s ease-in-out infinite alternate;
}

@keyframes mm-twinkle {
  from {
    opacity: 0.32;
  }
  to {
    opacity: 0.62;
  }
}

/* Header ------------------------------------------------------------------ */

.mm-header {
  position: relative;
  z-index: 3;
  padding: 22px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.mm-header .mm-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.mm-back {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.04em;
  transition: color 0.2s;
}

.mm-back:hover {
  color: var(--mint);
}

.mm-brand {
  color: var(--gold);
  font-family: var(--serif);
  font-size: 12.5px;
  letter-spacing: 0.2em;
  white-space: nowrap;
}

/* Hero -------------------------------------------------------------------- */

.mm-hero {
  position: relative;
  z-index: 2;
  padding: 86px 0 34px;
}

.mm-kicker {
  color: var(--mint);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.28em;
  text-transform: uppercase;
}

.mm-hero h1 {
  margin: 18px 0 20px;
  font-family: var(--serif);
  font-size: clamp(3.1rem, 7.4vw, 5.9rem);
  font-weight: 600;
  line-height: 1.04;
  letter-spacing: -0.03em;
}

.mm-hero h1 span {
  display: block;
}

.mm-hero h1 .grad {
  background: linear-gradient(108deg, #f4fbff 6%, #a9f0df 56%, #e8c87a 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.mm-lede {
  max-width: 37em;
  color: var(--muted);
  font-size: 14.5px;
  line-height: 1.95;
}

.mm-rule {
  width: 64px;
  height: 1px;
  margin-top: 30px;
  background: linear-gradient(90deg, var(--mint), transparent);
}

/* Tool cards -------------------------------------------------------------- */

.mm-tools {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  width: min(1120px, 100% - 40px);
  margin-inline: auto;
  padding: 46px 0 92px;
}

.mm-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 328px;
  overflow: hidden;
  padding: 30px;
  border: 1px solid rgba(126, 232, 200, 0.17);
  border-radius: 24px;
  background: linear-gradient(155deg, rgba(255, 255, 255, 0.065), rgba(255, 255, 255, 0.018));
  transition: transform 0.35s var(--ease), border-color 0.25s, box-shadow 0.35s;
}

.mm-card::before {
  content: "";
  position: absolute;
  right: -40%;
  top: -45%;
  width: 90%;
  height: 90%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(126, 232, 200, 0.12), transparent 68%);
  pointer-events: none;
  transition: opacity 0.35s;
}

.mm-card--soon {
  border-color: rgba(232, 200, 122, 0.18);
}

.mm-card--soon::before {
  background: radial-gradient(circle, rgba(232, 200, 122, 0.12), transparent 68%);
}

.mm-card:hover {
  transform: translateY(-6px);
  border-color: rgba(126, 232, 200, 0.48);
  box-shadow: 0 34px 70px -42px rgba(0, 0, 0, 0.95);
}

.mm-card--soon:hover {
  border-color: rgba(232, 200, 122, 0.5);
}

.mm-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.mm-icon {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border: 1px solid rgba(126, 232, 200, 0.28);
  border-radius: 16px;
  background: rgba(126, 232, 200, 0.09);
  color: var(--mint);
}

.mm-card--soon .mm-icon {
  border-color: rgba(232, 200, 122, 0.3);
  background: rgba(232, 200, 122, 0.08);
  color: var(--gold);
}

.mm-icon svg {
  width: 26px;
  height: 26px;
}

.mm-index {
  color: rgba(255, 255, 255, 0.13);
  font-family: var(--serif);
  font-size: 48px;
  line-height: 1;
}

.mm-card h2 {
  margin: 22px 0 8px;
  font-family: var(--serif);
  font-size: clamp(1.7rem, 2.6vw, 2.15rem);
  font-weight: 600;
  letter-spacing: -0.01em;
}

.mm-card .desc {
  max-width: 30em;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.85;
}

.mm-card .mm-badge {
  display: inline-flex;
  align-self: flex-start;
  margin-top: 14px;
  padding: 4px 9px;
  border: 1px solid rgba(232, 200, 122, 0.3);
  border-radius: 999px;
  color: var(--gold);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
}

.mm-card-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  padding-top: 22px;
  color: var(--mint);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.mm-card--soon .mm-card-cta {
  color: var(--gold);
}

.mm-card-cta svg {
  width: 16px;
  height: 16px;
  transition: transform 0.25s var(--ease);
}

.mm-card:hover .mm-card-cta svg {
  transform: translateX(4px);
}

/* Footer ------------------------------------------------------------------ */

.mm-footer {
  position: relative;
  z-index: 2;
  padding: 24px 0 34px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.mm-footer .mm-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  color: var(--muted-2);
  font-size: 11.5px;
}

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

.mm-footer a:hover {
  color: var(--mint);
}

/* Tool page: 鎵х瑪鐢绘 ------------------------------------------------------ */

.zb-main {
  position: relative;
  z-index: 2;
  padding: 52px 0 84px;
}

.zb-head {
  max-width: 720px;
}

.zb-head h1 {
  margin: 14px 0 12px;
  font-family: var(--serif);
  font-size: clamp(2.6rem, 5vw, 4rem);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.025em;
}

.zb-head p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.9;
}

.zb-layout {
  display: grid;
  grid-template-columns: 386px minmax(0, 1fr);
  gap: 24px;
  align-items: stretch;
  margin-top: 34px;
}

.zb-panel {
  padding: 22px;
  border: 1px solid var(--paper-line);
  border-radius: 22px;
  background: var(--paper);
  color: var(--paper-ink);
  box-shadow: 0 30px 70px -44px rgba(0, 0, 0, 0.85);
}

.zb-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  color: var(--paper-muted);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.zb-section-title .count {
  color: #9b8a70;
  font-weight: 500;
  letter-spacing: 0.06em;
}

.point-rows {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.point-row {
  display: grid;
  grid-template-columns: 1fr 1fr 30px;
  gap: 8px;
  align-items: end;
}

.point-field {
  display: flex;
  flex-direction: column;
  gap: 3px;
  color: var(--paper-muted);
  font-size: 10px;
  letter-spacing: 0.08em;
}

.point-field input {
  width: 100%;
  height: 36px;
  padding: 0 9px;
  border: 1px solid #d9cbb2;
  border-radius: 8px;
  background: #fffdf8;
  color: var(--paper-ink);
  font-family: var(--mono);
  font-size: 13px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.point-field input:focus {
  border-color: var(--cinnabar);
  outline: none;
  box-shadow: 0 0 0 3px rgba(181, 70, 47, 0.12);
}

.row-remove {
  display: grid;
  place-items: center;
  width: 30px;
  height: 36px;
  border: 1px solid #e0d3bd;
  border-radius: 8px;
  background: transparent;
  color: #9b8a70;
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}

.row-remove:hover {
  border-color: var(--cinnabar);
  background: rgba(181, 70, 47, 0.06);
  color: var(--cinnabar);
}

.zb-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0 18px;
}

.zb-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 38px;
  padding: 0 16px;
  border: 0;
  border-radius: 9px;
  background: #2a241b;
  color: var(--paper);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s, opacity 0.2s;
}

.zb-btn:hover {
  background: var(--cinnabar);
}

.zb-btn:active {
  transform: translateY(1px);
}

.zb-btn--ghost {
  border: 1px solid #d6c7ad;
  background: transparent;
  color: #564a3a;
}

.zb-btn--ghost:hover {
  background: #f0e6d3;
  color: #2a241b;
}

.zb-field {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 0;
  border-top: 1px solid #e7dcc7;
}

.zb-field label {
  color: var(--paper-ink);
  font-size: 12.5px;
  font-weight: 600;
}

.zb-field select {
  height: 36px;
  padding: 0 30px 0 10px;
  border: 1px solid #d9cbb2;
  border-radius: 8px;
  background: #fffdf8;
  color: var(--paper-ink);
  font-size: 12.5px;
  cursor: pointer;
}

.zb-field select:focus {
  border-color: var(--cinnabar);
  outline: none;
}

.zb-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 4px 0 16px;
}

.zb-chip {
  padding: 5px 10px;
  border: 1px solid #d9cbb2;
  border-radius: 999px;
  background: transparent;
  color: #6b5f4e;
  font-size: 11px;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.zb-chip:hover {
  border-color: #b9a789;
  background: #f1e7d5;
  color: #2a241b;
}

.zb-fit {
  width: 100%;
  height: 42px;
  font-size: 13px;
  letter-spacing: 0.04em;
}

.zb-result {
  margin-top: 16px;
  padding: 14px;
  border: 1px solid #e3d6be;
  border-radius: 12px;
  background: #f4ecdc;
  min-height: 76px;
}

.zb-equation {
  color: #2a241b;
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.7;
  overflow-wrap: anywhere;
}

.zb-equation .eq-prefix {
  color: var(--cinnabar);
}

.zb-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  margin-top: 8px;
  color: var(--paper-muted);
  font-size: 10.5px;
}

.zb-stats b {
  color: #3f3528;
  font-weight: 600;
}

.zb-error {
  color: #a13c2b;
  font-size: 12px;
  line-height: 1.7;
}

.zb-plot-panel {
  display: flex;
  flex-direction: column;
  padding: 16px;
}

.zb-plot-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 2px 4px 12px;
  color: var(--paper-muted);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.zb-download {
  height: 30px;
  padding: 0 10px;
  border: 1px solid #d6c7ad;
  border-radius: 7px;
  background: transparent;
  color: #6b5f4e;
  font-size: 10.5px;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.zb-download:hover {
  background: #f1e7d5;
  color: #2a241b;
}

.zb-plot {
  display: flex;
  flex: 1;
  flex-direction: column;
  justify-content: center;
  padding: 6px;
  border: 1px solid #eadfc9;
  border-radius: 14px;
  background: #fffdf8;
}

.zb-plot svg {
  display: block;
  width: 100%;
  height: auto;
}

.zb-hint {
  padding: 10px 4px 0;
  color: var(--paper-muted);
  font-size: 10.5px;
  line-height: 1.7;
}

/* 鑻ヨ兘鍐嶇浉瑙?-------------------------------------------------------------- */

.rn-main {
  position: relative;
  z-index: 2;
  padding: 64px 0 92px;
}

.rn-hero {
  text-align: center;
}

.rn-hero h1 {
  margin: 16px 0 14px;
  font-family: var(--serif);
  font-size: clamp(2.9rem, 6.6vw, 5.2rem);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.03em;
  background: linear-gradient(108deg, #fdf7e8 10%, #ffd9e2 50%, #e8c87a 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.rn-hero .rn-lede {
  max-width: 34em;
  margin: 0 auto;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.95;
}

.rn-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 22px;
  padding: 6px 13px;
  border: 1px solid rgba(232, 200, 122, 0.3);
  border-radius: 999px;
  color: var(--gold);
  font-size: 10.5px;
  letter-spacing: 0.08em;
}

.rn-badge i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 12px var(--gold);
}

.rn-constellation {
  width: min(540px, 92%);
  margin: 22px auto 8px;
}

.rn-constellation svg {
  display: block;
  width: 100%;
  height: auto;
}

.rn-card {
  width: min(560px, 100%);
  margin: 26px auto 0;
  padding: 24px;
  border: 1px solid rgba(232, 200, 122, 0.18);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.035);
  text-align: left;
}

.rn-card h2 {
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 600;
}

.rn-card p {
  margin-top: 6px;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.8;
}

.rn-card textarea {
  width: 100%;
  min-height: 104px;
  margin-top: 14px;
  padding: 12px 14px;
  border: 1px solid rgba(232, 200, 122, 0.22);
  border-radius: 12px;
  background: rgba(7, 11, 28, 0.55);
  color: var(--ink);
  font-size: 13px;
  line-height: 1.8;
  resize: vertical;
}

.rn-card textarea::placeholder {
  color: #6f7f9e;
}

.rn-card textarea:focus {
  border-color: rgba(232, 200, 122, 0.55);
  outline: none;
  box-shadow: 0 0 0 3px rgba(232, 200, 122, 0.08);
}

.rn-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
}

.rn-save {
  height: 38px;
  padding: 0 16px;
  border: 1px solid rgba(232, 200, 122, 0.35);
  border-radius: 999px;
  background: rgba(232, 200, 122, 0.1);
  color: var(--gold);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.rn-save:hover {
  background: rgba(232, 200, 122, 0.2);
  color: #fff3d6;
}

.rn-saved {
  color: var(--mint);
  font-size: 11.5px;
}

.rn-back {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 32px;
  color: var(--muted);
  font-size: 12.5px;
}

.rn-back:hover {
  color: var(--gold);
}

/* Toast ------------------------------------------------------------------- */

.mm-toast {
  position: fixed;
  left: 50%;
  bottom: 34px;
  z-index: 50;
  padding: 10px 18px;
  border: 1px solid rgba(126, 232, 200, 0.25);
  border-radius: 999px;
  background: rgba(7, 11, 28, 0.92);
  color: var(--mint);
  font-size: 12px;
  opacity: 0;
  transform: translate(-50%, 12px);
  pointer-events: none;
  transition: opacity 0.3s, transform 0.3s var(--ease);
}

.mm-toast.is-show {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* Responsive -------------------------------------------------------------- */

@media (max-width: 920px) {
  .mm-hero {
    padding: 58px 0 26px;
  }

  .mm-tools {
    grid-template-columns: 1fr;
    padding-top: 32px;
  }

  .mm-card {
    min-height: 280px;
  }

  .zb-layout {
    grid-template-columns: 1fr;
  }

  .zb-head h1 {
    font-size: 2.8rem;
  }
}

@media (max-width: 560px) {
  .mm-container {
    width: calc(100% - 32px);
  }

  .mm-brand {
    font-size: 10.5px;
    letter-spacing: 0.14em;
  }

  .mm-back {
    font-size: 11px;
  }

  .mm-hero h1 {
    font-size: 2.9rem;
  }

  .mm-card {
    padding: 24px;
    border-radius: 20px;
  }

  .mm-index {
    font-size: 38px;
  }

  .zb-main {
    padding: 40px 0 60px;
  }

  .zb-panel {
    padding: 18px;
  }

  .zb-plot-panel {
    padding: 12px;
  }

  .point-row {
    grid-template-columns: 1fr 1fr 28px;
  }

  .rn-main {
    padding: 44px 0 70px;
  }

  .rn-card {
    padding: 20px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

