:root {
  color-scheme: dark;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
  --canvas: #05070f;
  --canvas-2: #0a0e1c;
  --surface: rgba(255, 255, 255, .045);
  --surface-2: rgba(255, 255, 255, .08);
  --surface-solid: #0f1424;
  --line: rgba(255, 255, 255, .09);
  --line-strong: rgba(255, 255, 255, .18);
  --text: #f3f6ff;
  --muted: #8d95b2;
  --muted-2: #b7bdd6;
  --accent: #7dd3fc;
  --accent-2: #a78bfa;
  --accent-3: #f0abfc;
  --gradient: linear-gradient(120deg, #67e8f9 0%, #818cf8 52%, #c084fc 100%);
  --glow: 0 0 0 1px rgba(129, 140, 248, .35), 0 12px 40px -8px rgba(99, 102, 241, .55);
  --shadow: 0 20px 60px -20px rgba(0, 0, 0, .8);
  --radius: 18px;
  --radius-sm: 12px;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, monospace;
  --ease: cubic-bezier(.2, .7, .2, 1);
  background: var(--canvas);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; min-width: 280px; min-height: 100svh;
  background: var(--canvas);
  position: relative;
}
/* Ambient aurora + grid field behind every surface. */
body::before, body::after {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
}
body::before {
  background:
    radial-gradient(900px 600px at 8% -10%, rgba(99, 102, 241, .22), transparent 60%),
    radial-gradient(700px 500px at 100% 0%, rgba(34, 211, 238, .14), transparent 60%),
    radial-gradient(900px 700px at 60% 110%, rgba(192, 132, 252, .14), transparent 60%),
    var(--canvas);
}
body::after {
  opacity: .35;
  background-image:
    linear-gradient(rgba(255, 255, 255, .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .035) 1px, transparent 1px);
  background-size: 72px 72px;
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 0%, transparent 100%);
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 0%, transparent 100%);
}
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
button { color: inherit; cursor: pointer; }
a { color: inherit; }
img { max-width: 100%; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
#root:focus { outline: none; }
::selection { background: rgba(129, 140, 248, .45); }
.skip-to-content {
  position: fixed; z-index: 30; top: 8px; left: 12px; padding: 10px 16px; border-radius: 999px;
  color: #0a0a19; background: var(--gradient); font-weight: 700; transform: translateY(-150%);
}
.skip-to-content:focus { transform: none; }
@keyframes my-rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes my-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes my-drift { from { transform: scale(1.04) translate3d(0, 0, 0); } to { transform: scale(1.1) translate3d(-1.2%, -1%, 0); } }
@keyframes my-pulse { 0%, 100% { opacity: .55; } 50% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: 0s !important; animation-duration: 0s !important; }
}

/* The page arrives with its content written out as plain HTML for search engines and for
   browsers without scripts. Until the viewer takes over, that copy stays out of sight and the
   wordmark holds the screen, so nobody watches an unstyled page rearrange itself. */
#root[data-ssr] > * { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
#root[data-ssr]::before { content: ""; display: block; height: 100vh; height: 100dvh; background: url(assets/wordmark.png) center / min(42vw, 190px) auto no-repeat; animation: ssr-wait 1.4s ease-in-out infinite alternate; }
@keyframes ssr-wait { from { opacity: .35; } to { opacity: .9; } }
@media (prefers-reduced-motion: reduce) { #root[data-ssr]::before { animation: none; opacity: .7; } }

/* ---- 页面切换 ---- */
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .24s; animation-timing-function: cubic-bezier(.2, .8, .2, 1); }
::view-transition-new(root) { animation-name: mh-page-in; }
::view-transition-old(root) { animation-name: mh-page-out; }
::view-transition-group(mh-picture) { animation-duration: .34s; animation-timing-function: cubic-bezier(.2, .8, .2, 1); }
::view-transition-old(mh-picture), ::view-transition-new(mh-picture) { height: 100%; object-fit: cover; }
@keyframes mh-page-in { from { opacity: 0; transform: translateY(8px); } }
@keyframes mh-page-out { to { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; } }

/* ---- 断网提示 ---- */
.mh-offline { position: fixed; left: 50%; top: calc(10px + env(safe-area-inset-top, 0px)); z-index: 200; transform: translateX(-50%); padding: 8px 16px; border-radius: 999px; font-size: 13px; color: #fff; background: rgba(28, 18, 24, .82); border: .5px solid rgba(253, 164, 175, .4); box-shadow: 0 10px 30px rgba(0, 0, 0, .45); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); white-space: nowrap; animation: mh-drop .3s cubic-bezier(.2, .8, .2, 1); }
.mh-offline[hidden] { display: none; }
.mh-offline[data-state="up"] { background: rgba(10, 28, 22, .82); border-color: rgba(110, 231, 183, .4); }
@keyframes mh-drop { from { opacity: 0; transform: translate(-50%, -8px); } }
