/* justraincoat.top — 设计令牌与组件
   风格：单一 Action Blue、明暗色块交替、8px 栅格、极简层次 */

:root {
  --primary: #0066cc;
  --primary-on-dark: #2997ff;
  --ink: #1d1d1f;
  --body-muted: #7a7a7a;
  --on-dark: #ffffff;
  --body-on-dark: #cccccc;
  --hairline: #e0e0e0;
  --divider-soft: #f0f0f0;
  --canvas: #ffffff;
  --parchment: #f5f5f7;
  --tile: #272729;
  --tile-2: #2a2a2c;
  --ok: #34c759;

  --r-xs: 5px;
  --r-sm: 8px;
  --r-md: 11px;
  --r-lg: 18px;
  --r-pill: 9999px;

  --s-xs: 8px;
  --s-sm: 12px;
  --s-md: 17px;
  --s-lg: 24px;
  --s-xl: 32px;
  --s-2xl: 48px;
  --s-section: 80px;

  --shell: 1200px;
  --font-display: "Inter Tight", "Noto Sans SC", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  /* 鼠标跟随速度（由 assets/fx.js 读取，改这里即可调手感）
     越接近 1 越黏手；chase 越小，拖尾越长 */
  --fx-lerp-tight: 0.48;
  --fx-lerp-chase: 0.085;
  --fx-lerp-glow: 0.045;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.47;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

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

.shell { width: min(100% - 64px, var(--shell)); margin: 0 auto; }

/* ------------------------------------------------------------------ nav */
.nav {
  position: sticky; top: 0; z-index: 20;
  background: #000;
  color: #fff;
}
.nav__inner {
  height: 64px; display: flex; align-items: center; justify-content: space-between;
  width: min(100% - 48px, var(--shell)); margin: 0 auto;
}
.brand { display: inline-flex; align-items: center; gap: 9px; color: #fff; }
.brand:hover { text-decoration: none; }
.brand__word { font-family: var(--font-display); font-weight: 600; font-size: 14px; letter-spacing: .01em; }
.brand__sep { width: 1px; height: 14px; background: #3a3a3c; }
.brand__page { font-size: 13px; font-weight: 500; color: #7a7a7a; }
.nav__links { display: flex; align-items: center; gap: 26px; }
.nav__links a { color: #cccccc; font-size: 12px; }
.nav__links a.is-current { color: #fff; font-weight: 500; }
.nav__links a.accent { color: var(--primary-on-dark); }
.nav__cta {
  display: inline-flex; align-items: center; height: 28px; padding: 0 16px;
  background: var(--primary); color: #fff; border-radius: var(--r-pill); font-size: 12px;
}
.nav__cta:hover { text-decoration: none; background: var(--primary-on-dark); }

/* ---------------------------------------------------------------- hero */
.hero { padding: 96px 0 64px; text-align: center; }
.badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--parchment); border-radius: var(--r-pill);
  padding: 7px 14px; font-size: 12px; color: var(--ink);
}
.badge i { width: 6px; height: 6px; border-radius: 50%; background: var(--primary); }
.hero h1 {
  margin: 24px 0 0;
  font-family: var(--font-display);
  font-size: clamp(34px, 5vw, 54px);
  font-weight: 600; line-height: 1.22; letter-spacing: -0.02em;
}
.hero h1 em { font-style: normal; color: var(--primary); }
.hero__sub {
  margin: 24px auto 0; max-width: 760px;
  font-size: 18px; line-height: 1.7; color: var(--body-muted);
}
.hero__ctas { display: flex; gap: 16px; justify-content: center; margin-top: 24px; flex-wrap: wrap; }
.hero__meta {
  margin-top: 24px; font-family: var(--font-mono); font-size: 12px; color: var(--body-muted);
  display: flex; gap: 10px; justify-content: center; flex-wrap: wrap;
}

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 46px; padding: 0 28px; border-radius: var(--r-pill);
  font-size: 15px; border: 0; cursor: pointer; font-family: inherit;
  background: var(--primary); color: #fff; transition: transform .15s ease, background .15s ease;
}
.btn:hover { background: #0071e3; text-decoration: none; }
.btn:active { transform: scale(.97); }
.btn--ghost { background: var(--parchment); color: var(--primary); }
.btn--ghost:hover { background: #ececf0; }
.btn--dark { background: var(--tile-2); color: #fff; }
.btn--sm { height: 38px; padding: 0 20px; font-size: 14px; }

.visual {
  margin-top: 48px; background: var(--tile); border-radius: var(--r-lg);
  padding: 36px; color: #fff; text-align: left;
}
.visual__top { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.visual__kicker { font-family: var(--font-mono); font-size: 12px; color: var(--body-muted); }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  background: var(--tile-2); border-radius: var(--r-pill); padding: 5px 12px;
  font-family: var(--font-mono); font-size: 11px; color: #cccccc;
}
.chip--accent { color: var(--primary-on-dark); }
.visual__divider { height: 1px; background: #3a3a3c; margin: 28px 0; }
.visual__stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.stat__label { font-size: 12px; color: var(--body-muted); }
.stat__value { font-family: var(--font-display); font-size: 40px; font-weight: 600; letter-spacing: -0.01em; margin-top: 4px; }
.stat__value.accent { color: var(--primary-on-dark); }
.stat__sub { font-family: var(--font-mono); font-size: 11px; color: var(--body-muted); margin-top: 4px; }

/* ------------------------------------------------------------ sections */
.section { padding: var(--s-section) 0; }
.section--dark { background: var(--tile); color: #fff; }
.section--parchment { background: var(--parchment); }
.kicker { font-family: var(--font-mono); font-size: 12px; font-weight: 500; letter-spacing: .14em; color: var(--primary); }
.section--dark .kicker { color: var(--primary-on-dark); }
.section h2 {
  margin: 20px 0 0; font-family: var(--font-display);
  font-size: clamp(28px, 3.2vw, 40px); font-weight: 600; letter-spacing: -0.02em;
}
.section__desc { margin: 20px 0 0; max-width: 720px; font-size: 17px; color: var(--body-muted); }
.section--dark .section__desc { color: var(--body-on-dark); }
.section__head { margin-bottom: 48px; }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 24px; }
.card {
  background: var(--tile-2); border-radius: var(--r-lg); padding: 28px;
  display: flex; flex-direction: column; gap: 14px;
}
.section:not(.section--dark) .card { background: var(--parchment); }
.card--plain { background: #fff !important; }
.card__icon { width: 28px; height: 28px; }
.card__title { font-size: 21px; font-weight: 600; margin: 0; }
.card__body { margin: 0; font-size: 15px; line-height: 1.7; color: var(--body-on-dark); }
.section:not(.section--dark) .card__body { color: var(--body-muted); }
.card__link { font-size: 14px; margin-top: auto; }
.card__link--stub { color: var(--body-muted); }

/* 写作卡片（等高铁、链接贴底） */
.posts { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 24px; }
.post {
  background: var(--parchment); border-radius: var(--r-lg); padding: 24px;
  display: flex; flex-direction: column; gap: 8px; min-height: 236px;
}
.post__tag { font-family: var(--font-mono); font-size: 11px; color: var(--body-muted); }
.post__title { font-size: 19px; font-weight: 600; margin: 0; }
.post__body { margin: 0; font-size: 14px; line-height: 1.7; color: var(--body-muted); flex: 1; }
.post__link { font-size: 14px; }
.post--todo .post__link { color: var(--body-muted); }

.chips-wrap { display: flex; flex-wrap: wrap; gap: 12px; }
.tagchip {
  background: #fff; border: 1px solid var(--hairline); border-radius: var(--r-pill);
  padding: 10px 18px; font-family: var(--font-mono); font-size: 14px;
}

.center-cta { text-align: center; }
.center-cta h2 { font-size: clamp(30px, 3.6vw, 44px); }
.center-cta .section__desc { margin-left: auto; margin-right: auto; text-align: center; }
.center-cta .btn { margin-top: 24px; }
.meta-line { margin-top: 20px; font-size: 12px; color: var(--body-muted); }

/* --------------------------------------------------------------- footer */
.footer { background: #000; color: #fff; padding: 72px 0 40px; }
.footer__brand { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.footer__word { font-family: var(--font-display); font-size: 40px; font-weight: 600; letter-spacing: -0.02em; }
.footer__tag { font-size: 13px; color: var(--body-muted); }
.footer__divider { height: 1px; background: var(--tile-2); margin: 36px 0; }
.footer__bottom { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.footer__links { display: flex; gap: 28px; flex-wrap: wrap; }
.footer__links a { color: #cccccc; font-size: 12px; }
.footer__meta { display: flex; gap: 18px; flex-wrap: wrap; font-size: 12px; color: var(--body-muted); }
.footer__meta a { color: var(--body-muted); }

/* -------------------------------------------------------------- console */
.page { background: var(--parchment); min-height: 100vh; }
.wrap { width: min(100% - 48px, 1312px); margin: 0 auto; padding: 40px 0 64px; }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 24px; }
.page-head h1 { margin: 0; font-family: var(--font-display); font-size: 32px; font-weight: 600; letter-spacing: -0.02em; }
.page-head__sub { margin: 4px 0 0; font-family: var(--font-mono); font-size: 13px; color: var(--body-muted); }
.status-inline { display: inline-flex; align-items: center; gap: 10px; font-size: 12px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); flex: none; }
.dot--bad { background: #ff3b30; }
.dot--warn { background: #ff9f0a; }

.metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; }
.metric { background: #fff; border-radius: var(--r-lg); padding: 24px; display: flex; flex-direction: column; gap: 12px; }
.metric__label { font-size: 12px; color: var(--body-muted); }
.metric__value { font-family: var(--font-display); font-size: 36px; font-weight: 600; letter-spacing: -0.01em; }
.metric__sub { font-family: var(--font-mono); font-size: 11px; color: var(--body-muted); }
.bar { height: 6px; border-radius: var(--r-pill); background: var(--divider-soft); overflow: hidden; }
.bar > span { display: block; height: 100%; border-radius: var(--r-pill); background: var(--primary); }

.grid-2 { display: grid; grid-template-columns: 2fr 1fr; gap: 20px; margin-top: 20px; }
.grid-2--even { grid-template-columns: 1fr 1fr; }
.panel { background: #fff; border-radius: var(--r-lg); padding: 24px; display: flex; flex-direction: column; gap: 14px; }
.panel__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.panel__head h2 { margin: 0; font-size: 16px; font-weight: 600; display: inline-flex; align-items: center; gap: 10px; }
.badge-sm {
  background: var(--parchment); border-radius: var(--r-pill); padding: 4px 10px;
  font-family: var(--font-mono); font-size: 11px; color: var(--body-muted);
}
.panel__divider { height: 1px; background: var(--divider-soft); }
.kv { display: flex; gap: 40px; flex-wrap: wrap; }
.kv__item { display: flex; flex-direction: column; gap: 3px; }
.kv__label { font-size: 11px; color: var(--body-muted); }
.kv__value { font-family: var(--font-mono); font-size: 14px; }
.kv__note { margin-left: 6px; font-family: var(--font-body); font-size: 11px; color: var(--body-muted); }
.log { font-family: var(--font-mono); font-size: 11px; color: var(--body-muted); line-height: 1.9; overflow-x: auto; }
.log b { color: var(--ink); font-weight: 400; }
.rows { display: flex; flex-direction: column; }
.row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  min-height: 46px; border-bottom: 1px solid var(--divider-soft); font-size: 14px;
}
.row:last-child { border-bottom: 0; }
.row__value { font-family: var(--font-mono); font-size: 13px; color: var(--body-muted); }
.row__value.accent { color: var(--primary); font-weight: 500; }
.link-rows { display: flex; flex-direction: column; gap: 12px; }
.link-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  height: 44px; padding: 0 14px; border-radius: var(--r-md); background: var(--parchment);
  color: var(--ink); font-size: 14px;
}
.link-row:hover { background: #ececf0; text-decoration: none; }
.link-row span:last-child { font-family: var(--font-mono); font-size: 11px; color: var(--body-muted); }
.note { font-size: 12px; line-height: 1.7; color: var(--body-muted); }
.note code { font-family: var(--font-mono); font-size: 11px; background: var(--parchment); border-radius: 4px; padding: 1px 5px; }
.mini-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.mini-stats--4 { grid-template-columns: repeat(4, 1fr); }
.mini-stats .metric__value { font-size: 32px; }
.mini-stats--4 .metric__value { font-size: 28px; }

.grid-1 { display: grid; grid-template-columns: 1fr; gap: 20px; margin-top: 20px; }

/* ------------------------------------------- 用量折线图（纯 SVG，无外部依赖） */
.usage-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; flex-wrap: wrap; margin-bottom: 16px;
}
.usage-head__range { font-family: var(--font-mono); font-size: 11px; color: var(--body-muted); }
.sub-h { margin: 0; font-size: 13px; font-weight: 500; }

.seg { display: inline-flex; gap: 2px; padding: 2px; background: var(--parchment); border-radius: var(--r-pill); }
.seg__btn {
  border: 0; cursor: pointer; font: inherit; font-size: 12px; color: var(--body-muted);
  background: transparent; border-radius: var(--r-pill); padding: 5px 14px;
}
.seg__btn:hover { color: var(--ink); }
.seg__btn.is-on { background: #fff; color: var(--ink); font-weight: 500; box-shadow: 0 1px 2px rgba(0,0,0,.08); }

.lc { position: relative; }
.lc__canvas svg { display: block; width: 100%; height: auto; touch-action: pan-y; }
.lc__grid { stroke: var(--divider-soft); stroke-width: 1; }
.lc__ylab { fill: var(--body-muted); font-family: var(--font-mono); font-size: 10px; text-anchor: end; }
.lc__xlab { fill: var(--body-muted); font-family: var(--font-mono); font-size: 10px; }
.lc__area { fill: url(#lc-grad); }
.lc__line { fill: none; stroke: var(--primary); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.lc__guide { stroke: var(--hairline); stroke-width: 1; stroke-dasharray: 3 3; }
.lc__dot { fill: #fff; stroke: var(--primary); stroke-width: 2; }
.lc__tip {
  position: absolute; z-index: 3; pointer-events: none; transform: translate(-50%, -100%);
  background: var(--tile); color: var(--on-dark); border-radius: var(--r-sm);
  padding: 7px 10px; font-size: 11px; line-height: 1.5; white-space: nowrap;
  box-shadow: 0 6px 18px rgba(0,0,0,.18);
}
.lc__tip[hidden] { display: none; }
.lc__tip b { font-weight: 600; }

.usage-stats {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px 24px;
  margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--divider-soft);
}
.stat { display: flex; flex-direction: column; gap: 3px; }
.stat__label { font-size: 11px; color: var(--body-muted); }
.stat__value { font-family: var(--font-mono); font-size: 17px; }
.stat__sub { font-size: 11px; color: var(--body-muted); }

/* ----------------------------------------------------------- clipboard */
.clip-main { display: grid; grid-template-columns: 460px 1fr; gap: 20px; }
.clip-list { background: #fff; border-radius: var(--r-lg); padding: 20px; display: flex; flex-direction: column; gap: 10px; }
.search {
  display: flex; align-items: center; gap: 10px; height: 44px; padding: 0 14px;
  background: var(--parchment); border-radius: var(--r-md);
}
.search input { border: 0; background: transparent; outline: none; font: inherit; font-size: 13px; width: 100%; }
.clip-items { display: flex; flex-direction: column; gap: 10px; overflow-y: auto; max-height: 460px; }
.clip-item {
  text-align: left; border: 0; cursor: pointer; font: inherit;
  background: var(--parchment); border-radius: var(--r-md); padding: 14px;
  display: flex; flex-direction: column; gap: 6px;
}
.clip-item.is-active { background: #eaf2fc; }
.clip-item__title { font-size: 13px; font-weight: 500; }
.clip-item__meta { font-family: var(--font-mono); font-size: 11px; color: var(--body-muted); }
.clip-item.is-active .clip-item__meta { color: var(--primary); }
.clip-editor { background: #fff; border-radius: var(--r-lg); padding: 24px; display: flex; flex-direction: column; gap: 14px; min-height: 560px; }
.clip-editor__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.clip-editor input.title {
  border: 0; outline: none; font: inherit; font-size: 16px; font-weight: 600; flex: 1 1 260px; padding: 0;
}
.clip-editor textarea {
  flex: 1; min-height: 320px; resize: vertical; border: 0; outline: none;
  background: var(--parchment); border-radius: var(--r-md); padding: 16px;
  font-family: var(--font-mono); font-size: 13px; line-height: 1.7; color: var(--ink);
}
.clip-editor__foot { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

/* ---------- 剪贴板：文件支持 ---------- */
.clip-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.select { border: 0; height: 38px; padding: 0 10px; font-family: inherit; cursor: pointer; }
.clip-body { flex: 1; display: flex; min-height: 320px; }
.clip-body > textarea { flex: 1; }
.chipmini {
  display: inline-block; min-width: 30px; margin-right: 8px; padding: 1px 5px;
  border-radius: 5px; background: #e6e6ea; color: #6c6c70;
  font-family: var(--font-mono); font-size: 9px; letter-spacing: .04em; text-align: center;
}
.chipmini--img { background: #e2eefb; color: var(--primary); }
.clip-item.is-active .chipmini { background: #d3e4f8; }
.preview { margin: 0; flex: 1; border-radius: var(--r-md); background: var(--parchment); overflow: auto; }
figure.preview { display: grid; place-items: center; padding: 16px; }
figure.preview img { max-width: 100%; max-height: 420px; border-radius: var(--r-sm); }
pre.preview {
  padding: 16px; font-family: var(--font-mono); font-size: 13px;
  line-height: 1.7; white-space: pre-wrap; word-break: break-word;
}
.filecard { display: flex; align-items: center; gap: 16px; padding: 28px; }
.filecard__meta { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.filecard__meta strong { font-size: 15px; word-break: break-all; }
.filecard__meta span { font-family: var(--font-mono); font-size: 11px; color: var(--body-muted); word-break: break-all; }
.dropzone {
  position: fixed; inset: 0; z-index: 60; display: grid; place-items: center;
  background: rgba(0, 0, 0, .5); backdrop-filter: blur(8px);
  color: #fff; font-size: 22px; font-weight: 600; letter-spacing: .02em;
}
.dropzone::after {
  content: ''; position: absolute; inset: 24px; border: 2px dashed rgba(255, 255, 255, .5);
  border-radius: 24px;
}

/* --------------------------------------------------------------- login */
.login { display: grid; grid-template-columns: 620px 1fr; min-height: 100vh; }
.login__panel {
  background: #000; color: #fff; padding: 64px; display: flex; flex-direction: column; gap: 28px;
}
.login__panel .spacer { flex: 1; }
.login__headline { font-family: var(--font-display); font-size: clamp(30px, 3vw, 40px); font-weight: 600; line-height: 1.25; letter-spacing: -0.02em; margin: 0; }
.login__body { font-size: 15px; line-height: 1.75; color: var(--body-on-dark); margin: 0; }
.login__meta { font-family: var(--font-mono); font-size: 12px; color: var(--body-muted); margin: 0; }
.login__form-wrap { display: flex; align-items: center; justify-content: center; padding: 64px; }
.login__form { width: min(100%, 400px); display: flex; flex-direction: column; gap: 18px; }
.login__form h1 { margin: 0; font-family: var(--font-display); font-size: 34px; font-weight: 600; letter-spacing: -0.02em; }
.login__form .sub { margin: 0; font-size: 14px; color: var(--body-muted); }
.field { display: flex; flex-direction: column; gap: 8px; }
.field label { font-size: 13px; }
.field input {
  height: 48px; border: 1px solid transparent; background: var(--parchment);
  border-radius: var(--r-md); padding: 0 16px; font: inherit; font-size: 15px;
  font-family: var(--font-mono); outline: none;
}
.field input:focus { border-color: var(--primary); background: #fff; }
.login__form .btn { height: 50px; }
.alert { font-size: 13px; color: #d70015; min-height: 18px; }
.hint { font-family: var(--font-mono); font-size: 12px; color: var(--body-muted); margin: 0; }

.hidden { display: none !important; }

/* ==========================================================================
   动效层
   只在 html.fx-ready 存在时生效（由 assets/fx.js 添加；弱网 / 手机端 / 减少动效
   的用户根本不加载该文件，页面保持静态但完全可读可操作）。
   ========================================================================== */

/* 顶部滚动进度 */
.fx-progress {
  position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 40;
  background: linear-gradient(90deg, var(--primary), var(--primary-on-dark));
  transform-origin: 0 50%; transform: scaleX(0);
  opacity: 0; transition: opacity .35s ease;
}

/* 粒子画布：浮在内容之上、导航之下；没有深色区块时什么也不画 */
.fx-canvas { position: fixed; inset: 0; z-index: 8; pointer-events: none; }

/* 鼠标跟随：三层 —— 紧密跟随 / 后方追赶 / 环境光晕
   速度来自 --fx-lerp-tight / --fx-lerp-chase / --fx-lerp-glow */
.fx-glow, .fx-ring {
  position: fixed; top: 0; left: 0; z-index: 9;
  pointer-events: none; opacity: 0; will-change: transform;
  transition: opacity .45s ease;
}
.fx-glow {
  width: 460px; height: 460px; margin: -230px 0 0 -230px; border-radius: 50%;
  background: radial-gradient(closest-side,
    rgba(0, 102, 204, .13), rgba(0, 102, 204, .045) 54%, rgba(0, 102, 204, 0) 76%);
  transition: opacity .45s ease, width .4s cubic-bezier(.2, .7, .3, 1),
              height .4s cubic-bezier(.2, .7, .3, 1), margin .4s cubic-bezier(.2, .7, .3, 1);
}
.fx-ring {
  border-radius: 50%;
  border: 1px solid rgba(0, 102, 204, .5);
  transition: opacity .45s ease, width .32s cubic-bezier(.2, .7, .3, 1),
              height .32s cubic-bezier(.2, .7, .3, 1), margin .32s cubic-bezier(.2, .7, .3, 1),
              border-color .3s ease;
}
.fx-ring--tight { width: 22px; height: 22px; margin: -11px 0 0 -11px; border-color: rgba(0, 102, 204, .62); }
.fx-ring--chase { width: 56px; height: 56px; margin: -28px 0 0 -28px; border-color: rgba(0, 102, 204, .3); }

body.fx-has-pointer .fx-glow { opacity: 1; }
body.fx-has-pointer .fx-ring--tight { opacity: .85; }
body.fx-has-pointer .fx-ring--chase { opacity: .7; }

/* 悬停到可交互元素：追赶环张开一点 */
body.fx-hot .fx-ring--chase { width: 76px; height: 76px; margin: -38px 0 0 -38px; border-color: rgba(0, 102, 204, .45); }
body.fx-hot .fx-glow { width: 560px; height: 560px; margin: -280px 0 0 -280px; }

/* 深色区块上蓝光圈太抢戏 → 换成极淡的冰蓝，整体降透明度 */
body.fx-dark .fx-glow {
  background: radial-gradient(closest-side,
    rgba(150, 205, 255, .05), rgba(150, 205, 255, .02) 55%, rgba(150, 205, 255, 0) 76%);
}
body.fx-dark .fx-ring { border-color: rgba(255, 255, 255, .34); }
body.fx-dark .fx-ring--tight { border-color: rgba(255, 255, 255, .5); }
body.fx-dark .fx-ring--chase { border-color: rgba(255, 255, 255, .18); }
body.fx-dark.fx-has-pointer .fx-ring--tight { opacity: .8; }
body.fx-dark.fx-has-pointer .fx-ring--chase { opacity: .55; }
body.fx-dark .fx-progress { background: linear-gradient(90deg, #2997ff, #7cc0ff); }

/* 导航毛玻璃：滚起来才出现 */
.nav { transition: background .32s ease, box-shadow .32s ease; }
.fx-ready .nav.is-stuck {
  background: rgba(0, 0, 0, .66);
  backdrop-filter: blur(18px) saturate(1.7);
  -webkit-backdrop-filter: blur(18px) saturate(1.7);
  box-shadow: inset 0 -1px 0 rgba(255, 255, 255, .07);
}

/* 深色区块上的卡片改为真·毛玻璃 */
.section--dark .card {
  background: rgba(255, 255, 255, .055);
  border: 1px solid rgba(255, 255, 255, .075);
  backdrop-filter: blur(14px) saturate(1.35);
  -webkit-backdrop-filter: blur(14px) saturate(1.35);
}
.fx-ready .visual {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08),
              0 24px 70px -34px rgba(0, 0, 0, .65);
}

/* 悬停微抬升（只在真有指针的设备上启用） */
@media (hover: hover) {
  .fx-ready .card,
  .fx-ready .post,
  .fx-ready .panel,
  .fx-ready .metric,
  .fx-ready .tagchip {
    transition: transform .38s cubic-bezier(.2, .7, .3, 1),
                box-shadow .38s ease, background .38s ease, border-color .38s ease;
  }
  .fx-ready .card:hover,
  .fx-ready .post:hover,
  .fx-ready .panel:hover {
    transform: translateY(-3px);
    box-shadow: 0 20px 44px -26px rgba(0, 0, 0, .38);
  }
  .fx-ready .tagchip:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, .7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 10px 24px -16px rgba(0, 0, 0, .4);
  }
  .fx-ready .nav__cta:hover,
  .fx-ready .btn:hover { transform: translateY(-1px); }
}

/* 滚动入场 */
.fx-ready .reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .62s cubic-bezier(.2, .7, .3, 1),
              transform .62s cubic-bezier(.2, .7, .3, 1);
  transition-delay: var(--rv-delay, 0ms);
}
.fx-ready .reveal.is-in { opacity: 1; transform: none; }

/* 减少动效 / 不支持毛玻璃时全部退化为静态 */
@media (prefers-reduced-motion: reduce) {
  .fx-ready .reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
  .fx-glow, .fx-ring, .fx-canvas, .fx-progress { display: none !important; }
  .fx-ready .nav.is-stuck { background: #000; backdrop-filter: none; -webkit-backdrop-filter: none; }
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .fx-ready .nav.is-stuck { background: rgba(0, 0, 0, .92); }
  .section--dark .card { background: var(--tile-2); }
}

/* ==========================================================================
   Raincoat 形象挂件（右下角 idle）
   形象与动作同源（设计稿基准 E4）：呼吸浮动、随机眨眼、视线跟随指针、
   悬停抬头、单击摸头（缩头侧躲）、双击摇头、连点三次开心。
   只在「网络与设备都吃得消」时加载（见 index.html 末尾的引导脚本），
   加载与否都不影响页面内容与可读性。
   给 .rc-pet 加 data-bare 可以去掉底下的"夜色底盘"，让形象完全透明地浮在页面
   （此时只有身处深色区块才好看）。
   ========================================================================== */
.rc-pet {
  position: fixed; right: 20px; bottom: 16px;
  width: 184px; height: 184px; z-index: 15;
  --rc-gx: 0px; --rc-gy: 0px; --rc-gr: 0deg;
  opacity: 0; transform: translateY(18px) scale(.94);
  transition: opacity .7s ease, transform .7s cubic-bezier(.2, .7, .3, 1);
  pointer-events: none;                 /* 只有舞台那一层接事件，不挡页面 */
}
.rc-pet.is-on { opacity: 1; transform: none; }

.rc-pet__stage {
  position: absolute; inset: 0;
  pointer-events: auto; cursor: pointer; outline: none;
  border-radius: 50%;
  /* 夜色底盘：形象是霓虹线稿，浅色页面上需要一层暗底才立得住 */
  background: radial-gradient(closest-side,
    rgba(8, 9, 13, .97) 64%, rgba(8, 9, 13, .60) 84%, rgba(8, 9, 13, 0) 100%);
  transform-origin: 50% 82%;
  transition: transform .42s cubic-bezier(.2, .7, .3, 1), filter .42s ease;
  filter: drop-shadow(0 16px 30px rgba(0, 0, 0, .22));
}
.rc-pet[data-bare] .rc-pet__stage { background: none; filter: none; }
.rc-pet__stage:focus-visible { box-shadow: 0 0 0 2px var(--primary-on-dark); }

.rc-pet__gaze,
.rc-pet__body { position: absolute; }
.rc-pet__gaze {
  inset: 22px;                           /* 人物比底盘小一圈，头脚才落在暗底里 */
  transform: translate3d(var(--rc-gx), var(--rc-gy), 0) rotate(var(--rc-gr));
  transition: transform .6s cubic-bezier(.2, .7, .3, 1);
}
.rc-pet__body { inset: 0; animation: rc-breathe 3.8s ease-in-out infinite; }

.rc-pet__frame {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  opacity: 0; transition: opacity .15s linear;
  user-select: none; -webkit-user-drag: none;
}
.rc-pet[data-state="idle"]  .rc-pet__frame[data-f="idle"],
.rc-pet[data-state="blink"] .rc-pet__frame[data-f="blink"],
.rc-pet[data-state="happy"] .rc-pet__frame[data-f="happy"],
.rc-pet[data-state="shy"]   .rc-pet__frame[data-f="shy"],
.rc-pet[data-state="shake"] .rc-pet__frame[data-f="shake"] { opacity: 1; }

/* 摇头只用一帧，左右各放一次 —— 镜像就够了 */
.rc-pet[data-mirror="1"] .rc-pet__frame[data-f="shake"] { transform: scaleX(-1); }

@keyframes rc-breathe {
  0%, 100% { transform: translateY(0) scale(1); }
  50%      { transform: translateY(-2.4%) scale(1.02); }
}

@media (hover: hover) {
  .rc-pet.is-hover .rc-pet__stage {
    transform: translateY(-7px) scale(1.04);
    filter: drop-shadow(0 20px 34px rgba(0, 0, 0, .26))
            drop-shadow(0 0 26px rgba(255, 150, 40, .34));
  }
}

/* 被摸头：整体下沉收窄，姿态帧本身也已经缩过一档，两层加起来才是"缩" */
.rc-pet[data-state="shy"] .rc-pet__stage { transform: translateY(5px) scale(.955); }
.rc-pet[data-state="shy"] .rc-pet__body,
.rc-pet[data-state="shake"] .rc-pet__body { animation-play-state: paused; }
.rc-pet.is-pet .rc-pet__gaze {
  transform: translate3d(-5px, 3px, 0) rotate(-3deg);
}

/* 开心：轻跳一下 */
.rc-pet.is-cheer .rc-pet__stage { animation: rc-hop .9s cubic-bezier(.2, .7, .3, 1); }
@keyframes rc-hop {
  0%   { transform: translateY(0) scale(1); }
  18%  { transform: translateY(-13px) scale(1.04); }
  42%  { transform: translateY(2px) scale(.985); }
  64%  { transform: translateY(-6px) scale(1.015); }
  100% { transform: translateY(0) scale(1); }
}

/* 摇头收尾 / 摸头之后的站回来：带一点回弹 */
.rc-pet.is-spring .rc-pet__body { animation: rc-spring .44s cubic-bezier(.34, 1.56, .64, 1); }
@keyframes rc-spring {
  0%   { transform: translateY(4px) scaleY(.96) scaleX(1.02); }
  100% { transform: translateY(0) scale(1); }
}

/* 首次露面打个招呼 */
.rc-pet__bubble {
  position: absolute;
  right: 84%; bottom: 58%;
  max-width: 210px; padding: 10px 14px;
  background: #fff; color: var(--ink); border-radius: 14px;
  font-size: 12px; line-height: 1.55;
  box-shadow: 0 16px 36px -18px rgba(0, 0, 0, .45);
  opacity: 0; transform: translate(8px, 6px) scale(.94);
  transform-origin: 100% 100%;
  transition: opacity .34s ease, transform .34s cubic-bezier(.2, .7, .3, 1);
  pointer-events: none;
}
.rc-pet__bubble::after {
  content: ''; position: absolute; right: 13px; bottom: -5px;
  width: 11px; height: 11px; background: #fff;
  border-radius: 2px; transform: rotate(45deg);
}
.rc-pet.is-talking .rc-pet__bubble {
  opacity: 1; transform: none; pointer-events: auto; cursor: pointer;
}

/* 收起：hover 才出现 */
.rc-pet__close {
  position: absolute; top: 4px; right: 4px;
  width: 24px; height: 24px; padding: 0; border: 0; border-radius: 50%;
  background: rgba(255, 255, 255, .10); color: #fff;
  font: inherit; font-size: 14px; line-height: 1; cursor: pointer;
  opacity: 0; transition: opacity .2s ease, background .2s ease;
}
.rc-pet:hover .rc-pet__close,
.rc-pet__close:focus-visible { opacity: .85; }
.rc-pet__close:hover { background: rgba(255, 255, 255, .26); }

/* 窄屏不挂，免得挡住内容 */
@media (max-width: 760px) { .rc-pet { display: none; } }

@media (prefers-reduced-motion: reduce) {
  .rc-pet__body { animation: none !important; }
  .rc-pet__gaze { transform: none !important; }
  .rc-pet.is-cheer .rc-pet__stage { animation: none !important; }
}

/* --------------------------------------------------------------- mobile */
@media (max-width: 980px) {
  .visual__stats { grid-template-columns: repeat(2, 1fr); gap: 20px; }
  .grid-2, .grid-2--even { grid-template-columns: 1fr; }
  .mini-stats--4 { grid-template-columns: 1fr 1fr; }
  .clip-main { grid-template-columns: 1fr; }
  .login { grid-template-columns: 1fr; }
  .login__panel { padding: 40px 28px; }
  .login__form-wrap { padding: 40px 28px; }
  .nav__links { gap: 16px; }
  .shell, .wrap { width: min(100% - 40px, var(--shell)); }
  .footer__word { font-size: 30px; }
}
@media (max-width: 640px) {
  .section { padding: 56px 0; }
  .hero { padding: 64px 0 48px; }
  .visual { padding: 24px; }
  .visual__stats { grid-template-columns: repeat(2, 1fr); }
  .mini-stats { grid-template-columns: 1fr 1fr; }
  .usage-stats { grid-template-columns: 1fr 1fr; gap: 14px 16px; }
  .seg__btn { padding: 5px 11px; }
  .nav__links a.hide-sm { display: none; }
}

/* ------------------------------------------------------ 考试成绩面板 */
.gdot { fill: #fff; stroke: var(--primary); stroke-width: 2; }
.gtable-wrap { overflow-x: auto; margin-top: 4px; }
.gtable { width: 100%; border-collapse: collapse; font-size: 12px; }
.gtable th {
  text-align: left; font-weight: 500; font-size: 11px; color: var(--body-muted);
  padding: 0 10px 8px 0; white-space: nowrap;
}
.gtable td { padding: 9px 10px 9px 0; border-top: 1px solid var(--divider-soft); vertical-align: top; }
.gtable__d { font-family: var(--font-mono); color: var(--body-muted); white-space: nowrap; }
.gtable__n { max-width: 260px; }
.gtable td b { font-family: var(--font-mono); }
.gtable__s { display: flex; flex-wrap: wrap; gap: 4px 6px; }
.gchip {
  display: inline-flex; align-items: baseline; gap: 4px;
  background: var(--parchment); border-radius: 6px; padding: 3px 7px; white-space: nowrap;
}
.gchip b { font-weight: 500; }
.gchip__r { color: var(--body-muted); font-family: var(--font-mono); font-size: 11px; }

/* ------------------------------------------------------ 成绩录入页 */
.steps { margin: 0 0 12px; padding-left: 20px; font-size: 13px; line-height: 1.85; }
.steps li { margin-bottom: 8px; }
.steps code, .mono, .note code {
  font-family: var(--font-mono); font-size: 12px;
  background: var(--parchment); border-radius: 4px; padding: 1px 5px;
}
.mono { display: inline-block; line-height: 1.9; }
.row-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 16px; }
.alert { margin: 0 0 12px; padding: 10px 13px; border-radius: 8px; font-size: 13px; line-height: 1.6; }
.alert--ok { background: rgba(0, 136, 68, .08); color: #05592f; }
.alert--warn { background: rgba(214, 122, 0, .10); color: #7a4800; }
.alert--bad { background: rgba(200, 40, 40, .09); color: #8c1d1d; }
.tag {
  display: inline-block; font-size: 11px; border-radius: 999px; padding: 1px 7px;
  background: var(--parchment); color: var(--body-muted); vertical-align: 1px;
}
.tag--ok { background: rgba(0, 136, 68, .12); color: #05592f; }
.tag--warn { background: rgba(214, 122, 0, .14); color: #7a4800; }
.tag--eng { background: rgba(0, 102, 204, .12); color: #004b96; margin-right: 5px; }
.tag--eng2 { background: rgba(120, 60, 180, .14); color: #4b2277; }
.ocr-warn { font-size: 11.5px; color: #7a4800; margin: 3px 0 0; }
.picks { display: flex; flex-direction: column; gap: 6px; margin: 4px 0 0; }
.pick {
  display: flex; align-items: flex-start; gap: 10px; cursor: pointer;
  padding: 9px 12px; border-radius: 9px; border: 1px solid var(--divider-soft);
  font-size: 13px; line-height: 1.5;
}
.pick:hover { background: var(--parchment); }
.pick input { margin-top: 3px; }
.pick__sub { display: block; font-size: 12px; color: var(--body-muted); margin-top: 2px; }
.kv-grid--form { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px 18px; margin-bottom: 12px; }
.kv-grid--form textarea, .field textarea {
  width: 100%; border: 1px solid var(--divider); border-radius: 8px; padding: 9px 11px;
  font-family: var(--font-mono); font-size: 12px; line-height: 1.6; resize: vertical;
  background: var(--parchment); color: inherit; outline: none;
}
.field textarea:focus { border-color: var(--primary); background: #fff; }
.slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; margin-top: 4px; }
.slot { border: 1px solid var(--divider-soft); border-radius: 10px; padding: 11px 13px; }
.slot__head { display: flex; align-items: center; gap: 7px; font-size: 13px; }
.slot__no {
  display: inline-flex; align-items: center; justify-content: center;
  width: 19px; height: 19px; border-radius: 50%; background: var(--primary); color: #fff;
  font-family: var(--font-mono); font-size: 11px;
}
.slot__body { margin-top: 9px; display: flex; flex-direction: column; gap: 7px; align-items: flex-start; }
.slot__body .note { font-size: 11px; margin: 0; }
.ocr-out { font-size: 12px; color: var(--body-muted); }
.ocr-out b { font-family: var(--font-mono); color: inherit; }
.modal {
  position: fixed; inset: 0; z-index: 60; background: rgba(20, 20, 22, .42);
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.modal__panel {
  background: #fff; border-radius: 14px; padding: 20px; width: min(720px, 100%);
  max-height: 88vh; overflow-y: auto; box-shadow: 0 18px 60px rgba(0, 0, 0, .28);
}
.modal__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.gtable--form td { padding: 6px 10px 6px 0; }
.gtable--form th { padding-bottom: 6px; }
.in-num {
  width: 78px; border: 1px solid var(--divider); border-radius: 7px; padding: 5px 8px;
  font-family: var(--font-mono); font-size: 13px; background: var(--parchment); outline: none;
}
.in-num:focus { border-color: var(--primary); background: #fff; }
.btn--sm { font-size: 12px; padding: 5px 11px; }

/* ------------------------------------------------------ 成绩雷达 + 概览 */
.gradar-wrap { display: grid; grid-template-columns: minmax(240px, 320px) 1fr; gap: 18px; align-items: center; }
.gradar svg { width: 100%; height: auto; display: block; }
.gradar__lab { font-size: 10px; fill: var(--body-muted); }
.gradar__grid { fill: none; stroke: var(--divider-soft); }
.gradar__axis { stroke: var(--divider-soft); }
.gradar__area { fill: rgba(0, 102, 204, .13); }
.gradar__line { fill: none; stroke: var(--primary); stroke-width: 2; }
.gradar__dot { fill: #fff; stroke: var(--primary); stroke-width: 2; }
.goverview { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px 18px; }
.goverview__item { font-size: 12px; }
.goverview__item b { font-family: var(--font-mono); font-size: 15px; }
.goverview__bar { height: 5px; border-radius: 3px; background: var(--divider-soft); margin-top: 6px; overflow: hidden; }
.goverview__fill { height: 100%; border-radius: 3px; background: var(--primary); }
@media (max-width: 760px) { .gradar-wrap { grid-template-columns: 1fr; } }

/* ------------------------------------------------------ 状态瀑布流（每步卡片内） */
.stream {
  display: flex; flex-direction: column; gap: 2px; margin: 2px 0 0;
  border-left: 2px solid var(--divider-soft); padding: 2px 0 2px 12px;
  max-height: 168px; overflow-y: auto;
}
.stream__line {
  display: flex; align-items: baseline; gap: 8px; font-size: 12px; line-height: 1.7;
  font-family: var(--font-mono); color: var(--body-muted); animation: stream-in .22s ease both;
}
.stream__line::before {
  content: ''; width: 5px; height: 5px; border-radius: 50%; background: var(--divider);
  flex: none; transform: translateY(-1px);
}
.stream__line--run { color: var(--ink); }
.stream__line--run::before { background: var(--primary); animation: stream-pulse 1.1s ease-in-out infinite; }
.stream__line--ok { color: #05592f; }
.stream__line--ok::before { background: var(--ok); }
.stream__line--warn { color: #7a4800; }
.stream__line--warn::before { background: #ff9f0a; }
.stream__line--bad { color: #8c1d1d; }
.stream__line--bad::before { background: #ff3b30; }
@keyframes stream-in { from { opacity: 0; transform: translateY(-3px); } to { opacity: 1; transform: none; } }
@keyframes stream-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) {
  .stream__line { animation: none; }
  .stream__line--run::before { animation: none; }
}

/* 每步卡片里的「这一步怎么做」说明 */
.step-help {
  font-size: 12px; line-height: 1.8; color: var(--body-muted);
  background: var(--parchment); border-radius: 9px; padding: 10px 13px;
}
.step-help b { color: var(--ink); font-weight: 500; }
.step-help ol { margin: 4px 0 0; padding-left: 18px; }
.step-help li { margin-bottom: 3px; }
.step-help code {
  font-family: var(--font-mono); font-size: 11px;
  background: #fff; border-radius: 4px; padding: 1px 5px;
}
details.step-help > summary { cursor: pointer; font-size: 12px; color: var(--body-muted); }
details.step-help[open] > summary { margin-bottom: 6px; }

/* ------------------------------------------------------ 已录入场次编辑 */
.rec-table td, .rec-table th { white-space: nowrap; }
.rec-table__name { max-width: 300px; white-space: normal !important; }
.rec-actions { display: flex; gap: 6px; }
.btn--danger { background: #c62828; color: #fff; }
.btn--danger:hover { background: #a91f1f; }
.rec-edit-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px 16px; margin-bottom: 14px; }
.rec-edit-grid .field input, .rec-edit-grid .field select {
  height: 40px; font-size: 13px; padding: 0 11px;
}
.rec-edit-grid .field select {
  border: 1px solid transparent; background: var(--parchment); border-radius: var(--r-md);
  font: inherit; font-size: 13px; outline: none; color: inherit;
}
.sub-row td { padding: 5px 8px 5px 0; }
.sub-row input[type=text] { width: 74px; }
.sub-incl { accent-color: var(--primary); }
.changes-list { margin: 0 0 12px; padding-left: 18px; font-size: 12px; line-height: 1.75; color: var(--body-muted); }
.changes-list b { color: var(--ink); font-weight: 500; }

/* 槽位卡片：选中 / 拖拽 / 粘贴提示（点击必须看得见反馈） */
.slot { cursor: pointer; transition: border-color .15s, background .15s, box-shadow .15s; }
.slot:hover { border-color: var(--divider); background: var(--parchment); }
.slot.is-active {
  border-color: var(--primary); background: #eaf2fc;
  box-shadow: 0 0 0 3px rgba(0, 102, 204, .14);
}
.slot.is-active .slot__no { background: var(--primary); }
.slot.is-dragover { border-color: var(--primary); border-style: dashed; background: #eaf2fc; }
.slot__acts { display: flex; gap: 6px; flex-wrap: wrap; }
.slot__hint {
  font-family: var(--font-mono); font-size: 11px; color: var(--primary);
}

/* 槽位卡片内消息（失败也要看得见，不能只在页顶状态条） */
.slot__msg { font-size: 11px; line-height: 1.6; font-family: var(--font-mono); display: none; }
.slot__msg:not(:empty) { display: block; }
.slot__msg--run { color: var(--primary); }
.slot__msg--ok { color: #05592f; }
.slot__msg--bad { color: #c62828; }
#paste-cap textarea {
  width: 100%; border: 1px dashed var(--primary); border-radius: 8px; padding: 10px 12px;
  font-family: var(--font-mono); font-size: 12px; line-height: 1.6; resize: vertical;
  background: #eaf2fc; color: inherit; outline: none;
}
#paste-cap textarea:focus { background: #fff; }

/* 槽位缩略图：粘贴/上传后能立刻看到图，确认真的传上去了 */
.slot__thumb { display: block; margin-bottom: 4px; }
.slot__thumb img {
  display: block; width: 100%; max-height: 108px; object-fit: cover; object-position: top;
  border-radius: 7px; border: 1px solid var(--divider-soft); background: #fff;
}
.slot__thumb:hover img { border-color: var(--primary); }

/* ===== 成绩面板（公开首页）================================================ */
.grades {
  margin-top: var(--s-lg);
  display: flex; flex-direction: column; gap: var(--s-lg);   /* 三块之间的竖直间距 */
}
.grade-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-lg); align-items: start; }
.grade-grid > * { min-width: 0; }   /* grid 项默认 min-width:auto 会被宽表格撑破窄屏 */
.grade-card {
  min-width: 0;
  background: var(--canvas); border: 1px solid var(--hairline);
  border-radius: var(--r-lg); padding: var(--s-lg);
  box-shadow: 0 1px 2px rgba(0,0,0,.04), 0 10px 28px rgba(0,0,0,.045);
}
.grade-card__head { display: flex; align-items: center; justify-content: space-between; gap: var(--s-sm); flex-wrap: wrap; }
.grade-card__title { font-size: 17px; font-weight: 650; margin: 0; color: var(--ink); }

.grade-hero { display: flex; align-items: flex-end; gap: var(--s-lg);
  padding: var(--s-md) 0 var(--s-lg); border-bottom: 1px solid var(--divider-soft); margin-bottom: var(--s-md); }
.grade-hero__main { display: flex; flex-direction: column; }
.grade-hero__num { font-family: var(--font-display); font-size: 62px; line-height: .95;
  font-weight: 700; letter-spacing: -.02em; color: var(--ink); }
.grade-hero__cap { font-size: 12px; color: var(--body-muted); margin-top: 7px; }
.grade-hero__side { display: flex; gap: var(--s-lg); margin-left: auto; }
.grade-hero__side > div { display: flex; flex-direction: column; align-items: flex-end; }
.gh-num { font-family: var(--font-mono); font-size: 21px; font-weight: 600; color: var(--ink); }
.gh-cap { font-size: 11px; color: var(--body-muted); margin-top: 3px; }

.g-list, .s-list { list-style: none; padding: 0; margin: 0; }
.g-row { display: grid; grid-template-columns: 4.2em minmax(0, 1fr) 4.8em 3.8em;   /* 位次列放得下「前 18.7%」 */
  gap: 10px; align-items: center; padding: 6px 0; }
.g-row__name { font-size: 13px; color: var(--ink); }
.g-row__bar { position: relative; height: 9px; border-radius: 999px; background: var(--divider-soft); }
.g-bar__fill { display: block; height: 100%; border-radius: 999px; }
.g-bar__fill--up { background: linear-gradient(90deg, #34c759, #2fa851); }
.g-bar__fill--down { background: linear-gradient(90deg, #f0a05a, #e0863a); }
.g-bar__fill--flat { background: var(--primary); }
.g-bar__ref { position: absolute; top: -3px; bottom: -3px; width: 0;
  border-left: 1px dashed rgba(0,0,0,.3); }
.g-row__rank { font-family: var(--font-mono); font-size: 13px; text-align: right; color: var(--ink); }
.g-gap { font-family: var(--font-mono); font-size: 12px; text-align: right; color: var(--body-muted); }
.g-gap--up { color: #1a8a3c; }
.g-gap--down { color: #c1651f; }
.g-gap--flat { color: var(--body-muted); }

.radar-wrap { display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: var(--s-sm) 0 var(--s-md); }
.radar { width: 100%; max-width: 380px; height: auto; }
.rd-ring { fill: none; stroke: var(--hairline); stroke-width: 1; }
.rd-axis { stroke: var(--divider-soft); stroke-width: 1; }
.rd-label { font-size: 12px; fill: var(--body-muted); font-family: var(--font-display); }
.rd-now { fill: rgba(0,102,204,.18); stroke: var(--primary); stroke-width: 2; }
.rd-avg { fill: rgba(120,120,120,.10); stroke: #9a9a9a; stroke-width: 1.6; stroke-dasharray: 4 3; }
.radar-legend { display: flex; gap: 16px; font-size: 12px; color: var(--body-muted); }
.radar-legend span { display: inline-flex; align-items: center; gap: 6px; }
.lg { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
.lg--now { background: rgba(0,102,204,.35); border: 1.5px solid var(--primary); }
.lg--avg { background: rgba(120,120,120,.2); border: 1.5px dashed #9a9a9a; }
/* 位次雷达：外环=第1、内环=900 */
.rd-scale { font-size: 9px; fill: var(--body-muted); font-family: var(--font-mono); }
.rd-refring { fill: none; stroke: #8a8a8a; stroke-width: 1.4; stroke-dasharray: 6 4; }
.rd-avg--y { fill: rgba(240,180,0,.12); stroke: #e0a300; stroke-width: 1.8; stroke-dasharray: 5 3; }
.lg--avgY { background: rgba(240,180,0,.3); border: 1.5px dashed #e0a300; }
.lg--ref { background: transparent; border: 1.5px dashed #8a8a8a; border-radius: 2px; }

.s-row { display: grid; grid-template-columns: 4.2em 4.4em minmax(0, 1fr) 3.6em 3.4em;
  gap: 10px; align-items: center; padding: 6px 0; }
.s-row__now { font-family: var(--font-mono); font-size: 13px; color: var(--ink); }
.s-row__avg { font-size: 12px; color: var(--body-muted); }
.stab { font-size: 11px; border-radius: 999px; padding: 1px 8px; text-align: center;
  background: var(--parchment); color: var(--body-muted); }
.stab--ok { background: rgba(52,199,89,.16); color: #14782f; }
.stab--mid { background: rgba(0,102,204,.12); color: #004b96; }
.stab--warn { background: rgba(214,122,0,.16); color: #7a4800; }

.note--foot { margin-top: 0; text-align: right; }   /* 竖直间距交给 .grades 的 gap */
@media (max-width: 900px) {
  .grade-grid { grid-template-columns: 1fr; }
  .grade-hero { flex-wrap: wrap; }
  .grade-hero__side { margin-left: 0; width: 100%; justify-content: space-between; gap: var(--s-md); }
  .grade-hero__side > div { align-items: flex-start; }
  .grade-hero__num { font-size: 52px; }
  .s-row { grid-template-columns: 3.6em 4em minmax(0,1fr) 3.2em 3em; }
  .g-row { grid-template-columns: 3.8em minmax(0,1fr) 4.4em 3.6em; }
}
