/* ==========================================================================
   ZODIAC 星轨终端 — HUD design system
   纯 CSS，无 Web Font，无图片依赖（图形全部由渐变/SVG 生成）
   ========================================================================== */

:root {
  --void: #04060c;
  --void-2: #060a12;
  --panel: rgba(11, 19, 33, .74);
  --panel-solid: #0a1220;
  --panel-2: rgba(16, 27, 45, .6);

  --line: rgba(53, 230, 255, .14);
  --line-mid: rgba(53, 230, 255, .28);
  --line-hot: rgba(53, 230, 255, .55);

  --cyan: #35e6ff;
  --cyan-2: #19b6d6;
  --amber: #ffb340;
  --rose: #ff3d81;
  --violet: #9b7bff;
  --mint: #4fd1a5;

  --text: #dbe7f6;
  --text-soft: #a8bcd4;
  --dim: #74899f;
  --dim-2: #4c5f75;

  --mono: ui-monospace, "SFMono-Regular", "Cascadia Mono", "Segoe UI Mono", Consolas, "Liberation Mono", monospace;
  --sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;

  --r: 2px;
  --gutter: clamp(16px, 4vw, 40px);
  --maxw: 1220px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--void);
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.75;
  letter-spacing: .01em;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* 背景：星野 + 网格 + 极光，全部用渐变，零请求 */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(1200px 700px at 78% -10%, rgba(53, 230, 255, .10), transparent 60%),
    radial-gradient(900px 600px at 12% 8%, rgba(155, 123, 255, .09), transparent 62%),
    radial-gradient(800px 800px at 50% 110%, rgba(255, 61, 129, .06), transparent 60%),
    linear-gradient(180deg, #04060c 0%, #050810 55%, #04060c 100%);
}
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: .5;
  background-image:
    linear-gradient(to right, rgba(53, 230, 255, .045) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(53, 230, 255, .035) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: radial-gradient(circle at 50% 30%, #000 0%, transparent 78%);
  -webkit-mask-image: radial-gradient(circle at 50% 30%, #000 0%, transparent 78%);
}

::selection { background: rgba(53, 230, 255, .28); color: #fff; }

a { color: var(--cyan); text-decoration: none; }
a:hover { color: #8bf2ff; }

img, svg { max-width: 100%; }

h1, h2, h3, h4 { margin: 0 0 .5em; line-height: 1.25; font-weight: 650; letter-spacing: .01em; }
h1 { font-size: clamp(28px, 4.6vw, 46px); }
h2 { font-size: clamp(22px, 3vw, 30px); }
h3 { font-size: clamp(18px, 2.2vw, 21px); }
p { margin: 0 0 1em; }
ul, ol { margin: 0 0 1em; padding-left: 1.2em; }
li { margin: .3em 0; }
hr { border: 0; border-top: 1px solid var(--line); margin: 2.4em 0; }

.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.dim { color: var(--dim); }
.soft { color: var(--text-soft); }
.tiny { font-size: 12px; letter-spacing: .12em; text-transform: uppercase; font-family: var(--mono); }
.nowrap { white-space: nowrap; }
.center { text-align: center; }

/* ---------------------------------------------------------------- layout */
.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }
.section { padding: clamp(38px, 6vw, 76px) 0; position: relative; }
.section--tight { padding: clamp(24px, 3vw, 40px) 0; }
.grid { display: grid; gap: 18px; }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid--6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.split { display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(20px, 4vw, 46px); align-items: start; }

@media (max-width: 980px) {
  .grid--4, .grid--6 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .split { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  body { font-size: 16px; }
  .grid--2, .grid--3, .grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid--6 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .grid { gap: 12px; }
}

/* ---------------------------------------------------------------- header */
.hud-head {
  position: sticky;
  top: 0;
  z-index: 60;
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  background: linear-gradient(180deg, rgba(4, 6, 12, .92), rgba(4, 6, 12, .72));
  border-bottom: 1px solid var(--line);
}
.hud-head__inner {
  display: flex;
  align-items: center;
  gap: 18px;
  height: 64px;
}
.brand { display: flex; align-items: center; gap: 11px; color: var(--text); flex: 0 0 auto; }
.brand__mark {
  width: 26px; height: 26px; position: relative; flex: 0 0 auto;
  border: 1px solid var(--line-hot);
  border-radius: 50%;
  box-shadow: 0 0 14px rgba(53, 230, 255, .35), inset 0 0 10px rgba(53, 230, 255, .18);
}
.brand__mark::before {
  content: ""; position: absolute; inset: 6px; border-radius: 50%;
  border: 1px dashed rgba(255, 179, 64, .8);
  animation: spin 14s linear infinite;
}
.brand__mark::after {
  content: ""; position: absolute; left: 50%; top: 50%; width: 4px; height: 4px;
  margin: -2px 0 0 -2px; border-radius: 50%; background: var(--cyan);
  box-shadow: 0 0 10px var(--cyan);
}
.brand__code { font-family: var(--mono); font-weight: 700; font-size: 15px; letter-spacing: .22em; }
.brand__cn { font-size: 13px; color: var(--dim); letter-spacing: .16em; }
@media (max-width: 520px) { .brand__cn { display: none; } }

.nav { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.nav a {
  font-family: var(--mono); font-size: 12.5px; letter-spacing: .08em;
  color: var(--text-soft); padding: 8px 10px; border-radius: var(--r);
  border: 1px solid transparent; transition: .18s;
  white-space: nowrap;
}
.nav a:hover { color: var(--cyan); border-color: var(--line); background: rgba(53, 230, 255, .05); }
.nav a[aria-current="page"] { color: var(--cyan); border-color: var(--line-mid); background: rgba(53, 230, 255, .07); }
.nav__toggle { display: none; }
@media (max-width: 900px) {
  .nav { display: none; position: fixed; inset: 64px 0 auto; flex-direction: column; gap: 0;
         background: rgba(4, 6, 12, .98); border-bottom: 1px solid var(--line); padding: 10px var(--gutter) 18px; }
  .nav.is-open { display: flex; }
  .nav a { font-size: 15px; padding: 12px 4px; border-bottom: 1px solid rgba(53, 230, 255, .07); }
  .nav__toggle { display: flex; margin-left: auto; flex-direction: column; gap: 4px; background: none;
                 border: 1px solid var(--line); border-radius: var(--r); padding: 9px 8px; cursor: pointer; }
  .nav__toggle span { width: 18px; height: 1px; background: var(--cyan); display: block; }
}


/* h1 里的英文副标题：桌面显示，窄屏隐藏，避免换行错位 */
.h1-en {
  font-family: var(--mono); font-size: .5em; letter-spacing: .06em;
  color: var(--dim); white-space: nowrap;
}
@media (max-width: 760px) { .h1-en { display: none; } }

/* ---------------------------------------------------------------- panels */
.panel {
  position: relative;
  border: 1px solid var(--line);
  background: var(--panel);
  padding: 22px;
  border-radius: var(--r);
}
.panel::before {
  content: ""; position: absolute; left: -1px; top: -1px; width: 14px; height: 14px;
  border-left: 1px solid var(--line-hot); border-top: 1px solid var(--line-hot);
}
.panel::after {
  content: ""; position: absolute; right: -1px; bottom: -1px; width: 14px; height: 14px;
  border-right: 1px solid var(--line-hot); border-bottom: 1px solid var(--line-hot);
}
.panel--flat::before, .panel--flat::after { display: none; }
.panel--glow { box-shadow: 0 0 0 1px rgba(53, 230, 255, .06), 0 24px 60px -40px rgba(53, 230, 255, .6); }

.label {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--mono); font-size: 11.5px; letter-spacing: .2em; text-transform: uppercase;
  color: var(--cyan); margin-bottom: 16px;
}
.label::before { content: ""; width: 18px; height: 1px; background: var(--cyan); opacity: .8; }
.label--amber { color: var(--amber); }
.label--amber::before { background: var(--amber); }
.label--rose { color: var(--rose); }
.label--rose::before { background: var(--rose); }

/* ---------------------------------------------------------------- hero */
.hero { position: relative; padding: clamp(44px, 8vw, 92px) 0 clamp(30px, 5vw, 56px); }
.hero__eyebrow {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--mono); font-size: 11.5px; letter-spacing: .22em; color: var(--cyan);
  border: 1px solid var(--line-mid); padding: 6px 12px; border-radius: 999px;
  background: rgba(53, 230, 255, .05); margin-bottom: 22px;
}
.hero__eyebrow i { width: 5px; height: 5px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 8px var(--mint); font-style: normal; }
.hero h1 { margin-bottom: 14px; }
.hero h1 em { font-style: normal; color: var(--cyan); text-shadow: 0 0 26px rgba(53, 230, 255, .45); }
.hero__lede { font-size: clamp(15.5px, 1.9vw, 18.5px); color: var(--text-soft); max-width: 62ch; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }

/* ---------------------------------------------------------------- buttons */
.btn {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--mono); font-size: 13px; letter-spacing: .1em; text-transform: uppercase;
  padding: 13px 22px; border: 1px solid var(--line-mid); color: var(--cyan);
  background: rgba(53, 230, 255, .06); border-radius: var(--r); cursor: pointer;
  transition: .18s; clip-path: polygon(9px 0, 100% 0, 100% calc(100% - 9px), calc(100% - 9px) 100%, 0 100%, 0 9px);
}
.btn:hover { background: rgba(53, 230, 255, .14); border-color: var(--line-hot); color: #b7f7ff; box-shadow: 0 0 30px -8px rgba(53, 230, 255, .6); }
.btn--solid { background: var(--cyan); color: #04121a; border-color: var(--cyan); font-weight: 700; }
.btn--solid:hover { background: #7ef0ff; color: #04121a; }
.btn--ghost { background: transparent; color: var(--text-soft); border-color: var(--line); }
.btn--ghost:hover { color: var(--cyan); }

/* ---------------------------------------------------------------- readouts */
.readouts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); }
@media (max-width: 820px) { .readouts { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.readout { background: rgba(6, 10, 18, .82); padding: 16px 16px 14px; }
.readout__k { font-family: var(--mono); font-size: 10.5px; letter-spacing: .16em; color: var(--dim); text-transform: uppercase; margin-bottom: 8px; }
.readout__v { font-family: var(--mono); font-size: clamp(20px, 3.1vw, 27px); color: var(--text); line-height: 1.15; font-variant-numeric: tabular-nums; }
.readout__v small { font-size: 12px; color: var(--dim); letter-spacing: .06em; margin-left: 4px; }
.readout__v.is-cyan { color: var(--cyan); text-shadow: 0 0 18px rgba(53, 230, 255, .35); }
.readout__v.is-amber { color: var(--amber); text-shadow: 0 0 18px rgba(255, 179, 64, .3); }
.readout__v.is-rose { color: var(--rose); }
.readout__sub { margin-top: 6px; font-size: 12px; color: var(--dim); font-family: var(--mono); }

/* ---------------------------------------------------------------- glyphs */
.glyph {
  display: inline-flex; width: 30px; height: 30px; flex: 0 0 auto;
  color: var(--cyan); vertical-align: middle;
}
.glyph svg { width: 100%; height: 100%; display: block; }
.glyph--xs { width: 20px; height: 20px; }
.glyph--sm { width: 24px; height: 24px; }
.glyph--lg { width: 62px; height: 62px; }
.el-fire { color: #ff7a52; }
.el-earth { color: #4fd1a5; }
.el-air { color: #54c8ff; }
.el-water { color: #9b7bff; }
.pcode {
  font-family: var(--mono); font-size: 11px; letter-spacing: .1em;
  color: var(--cyan); border: 1px solid var(--line-mid); border-radius: 2px;
  padding: 1px 5px; background: rgba(53, 230, 255, .05); white-space: nowrap;
}

/* ---------------------------------------------------------------- sign grid */
.signs { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 980px) { .signs { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 620px) { .signs { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.sign-card {
  position: relative; display: flex; flex-direction: column; align-items: flex-start;
  padding: 16px 14px 14px; color: var(--text); min-height: 118px;
  border: 1px solid var(--line); background: rgba(9, 15, 26, .7);
  border-radius: var(--r); transition: .2s; overflow: hidden;
}
.sign-card::after {
  content: ""; position: absolute; inset: auto 0 0 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(53, 230, 255, .5), transparent);
  opacity: 0; transition: .2s;
}
.sign-card:hover { border-color: var(--line-hot); background: rgba(53, 230, 255, .06); transform: translateY(-2px); color: #fff; }
.sign-card:hover::after { opacity: 1; }
.sign-card__glyph { margin-bottom: 10px; }
.sign-card__name { font-size: 15px; font-weight: 600; letter-spacing: .02em; }
.sign-card__date { font-family: var(--mono); font-size: 10.5px; color: var(--dim); letter-spacing: .04em; margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.sign-card__score {
  position: absolute; right: 10px; top: 12px; font-family: var(--mono); font-size: 15px;
  color: var(--amber); letter-spacing: .02em;
}
.sign-card__score::after { content: "PTS"; display: block; font-size: 8px; color: var(--dim-2); letter-spacing: .16em; text-align: right; }

/* ---------------------------------------------------------------- article */
.prose { max-width: 74ch; }
.prose h2 { margin-top: 2em; padding-top: .2em; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { margin-top: 1.6em; color: var(--text); }
.prose p { color: var(--text-soft); }
.prose strong { color: var(--text); }
.prose blockquote {
  margin: 1.4em 0; padding: 14px 20px; border-left: 2px solid var(--cyan);
  background: rgba(53, 230, 255, .04); color: var(--text-soft);
}

/* ---------------------------------------------------------------- chips/tags */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip--on { border-color: rgba(255, 182, 72, .55); color: var(--amber, #ffb648); }
.chip {
  font-family: var(--mono); font-size: 11.5px; letter-spacing: .06em;
  padding: 4px 10px; border: 1px solid var(--line); border-radius: 999px; color: var(--text-soft);
  background: rgba(53, 230, 255, .03);
}
.chip--fire { border-color: rgba(255, 90, 60, .4); color: #ff9a80; }
.chip--earth { border-color: rgba(79, 209, 165, .4); color: #86e8c8; }
.chip--air { border-color: rgba(84, 200, 255, .4); color: #8fdcff; }
.chip--water { border-color: rgba(155, 123, 255, .4); color: #bda9ff; }

/* ---------------------------------------------------------------- tables */
.data { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.data th, .data td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.data th { font-family: var(--mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--dim); font-weight: 500; }
.data td { color: var(--text-soft); }
.data tr:hover td { background: rgba(53, 230, 255, .03); }
.data .num { font-family: var(--mono); font-variant-numeric: tabular-nums; color: var(--text); }

/* ---------------------------------------------------------------- forms */
.field { display: flex; flex-direction: column; gap: 7px; margin-bottom: 16px; }
.field > label { font-family: var(--mono); font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--dim); }
.input, .select {
  width: 100%; padding: 12px 14px; background: rgba(4, 8, 16, .8);
  border: 1px solid var(--line-mid); color: var(--text); border-radius: var(--r);
  font-family: var(--mono); font-size: 15px; outline: none; transition: .15s;
}
.input:focus, .select:focus { border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(53, 230, 255, .12); }
.select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--cyan) 50%), linear-gradient(135deg, var(--cyan) 50%, transparent 50%); background-position: calc(100% - 18px) 20px, calc(100% - 13px) 20px; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; }
.form-row { display: grid; grid-template-columns: 1.45fr 1fr 1fr; gap: 12px; }
/* type=date 需要足够宽度显示 YYYY/MM/DD，否则会被裁成「1995/0」 */
input[type="date"] { min-width: 148px; }
.form-row select { min-width: 96px; }
@media (max-width: 640px) { .form-row { grid-template-columns: 1fr; } }
.tool-layout { display: grid; grid-template-columns: minmax(300px, 380px) minmax(0, 1fr); gap: clamp(20px, 3vw, 38px); align-items: start; }
@media (max-width: 980px) { .tool-layout { grid-template-columns: 1fr; } }
.hint { font-size: 12.5px; color: var(--dim); }

/* ---------------------------------------------------------------- ticker */
.ticker {
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  background: rgba(4, 8, 16, .6); overflow: hidden; position: relative;
  display: flex; align-items: center; min-height: 36px;
}
.ticker__track {
  display: flex; align-items: center; gap: 40px; padding: 8px 0; margin: 0;
  white-space: nowrap; line-height: 1.4;
  font-family: var(--mono); font-size: 11.5px; letter-spacing: .12em; color: var(--dim);
  animation: marquee 46s linear infinite;
}
.ticker__track b { color: var(--cyan); font-weight: 500; }
.ticker__track em { color: var(--amber); font-style: normal; }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ---------------------------------------------------------------- badge */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--mono); font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase;
  padding: 3px 8px; border-radius: 2px;
  border: 1px solid currentColor; color: var(--mint); opacity: .9;
}
.badge--amber { color: var(--amber); }
.badge--rose { color: var(--rose); }
.badge--dim { color: var(--dim); }

/* ---------------------------------------------------------------- footer */
.foot { border-top: 1px solid var(--line); padding: 44px 0 34px; margin-top: 40px; }
.foot__grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 30px; }
@media (max-width: 860px) { .foot__grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .foot__grid { grid-template-columns: 1fr; } }
.foot h4, .foot__title { font-family: var(--mono); font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: var(--dim); margin-bottom: 12px; }
.foot a { display: block; color: var(--text-soft); font-size: 14px; padding: 3px 0; }
.foot a:hover { color: var(--cyan); }
.foot__title { margin: 0; }
.foot__legal { margin-top: 34px; padding-top: 18px; border-top: 1px solid rgba(53, 230, 255, .08); font-family: var(--mono); font-size: 11.5px; color: var(--dim-2); letter-spacing: .04em; display: flex; flex-wrap: wrap; gap: 14px; justify-content: space-between; }
.foot__legal a { color: var(--dim); font-size: 11.5px; }

/* ---------------------------------------------------------------- utility */
.kv { display: grid; grid-template-columns: auto 1fr; gap: 8px 18px; font-size: 14.5px; }
.kv dt { font-family: var(--mono); font-size: 11.5px; letter-spacing: .1em; color: var(--dim); text-transform: uppercase; padding-top: 3px; }
.kv dd { margin: 0; color: var(--text-soft); }
.list-clean { list-style: none; padding: 0; }
.list-clean li { padding-left: 18px; position: relative; }
.list-clean li::before { content: "▸"; position: absolute; left: 0; color: var(--cyan); opacity: .7; }

.reveal { transform: translateY(12px); transition: transform .4s ease; }
.reveal.is-in { transform: none; }

/* 配对数表分数色 */
a.score-cyan { color: var(--cyan); }
a.score-amber { color: var(--amber); }
a.score-rose { color: var(--rose); }
a.score-cyan:hover, a.score-amber:hover, a.score-rose:hover { text-decoration: underline; }

.scanlines {
  position: fixed; inset: 0; z-index: 90; pointer-events: none; opacity: .16;
  background: repeating-linear-gradient(180deg, rgba(255, 255, 255, .05) 0 1px, transparent 1px 3px);
  mix-blend-mode: overlay;
}

.corner-note {
  position: fixed; right: 14px; bottom: 12px; z-index: 80;
  font-family: var(--mono); font-size: 10px; letter-spacing: .16em; color: var(--dim-2);
  pointer-events: none;
}
@media (max-width: 760px) { .corner-note { display: none; } }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 0%, 100% { opacity: .35; } 50% { opacity: 1; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  html { scroll-behavior: auto; }
  .reveal, .reveal.is-in { transform: none; }
}

/* ---------------------------------------------------------------- print */
@media (max-width: 760px) {
  .data { display: block; overflow-x: auto; white-space: nowrap; -webkit-overflow-scrolling: touch; }
  .data th, .data td { padding: 9px 10px; }
}
@media print {
  body { background: #fff; color: #000; }
  body::before, body::after, .scanlines, .hud-head, .foot { display: none; }
  .panel { border-color: #ccc; background: #fff; }
}
