/* ==========================================================================
   遇事不决问 Jev
   白 · 黑 · 灰，仅此三色。
   ========================================================================== */

:root {
  --ink: #0a0a0a;
  --ink-soft: #2a2a2a;
  --gray-70: #4a4a4a;
  --gray-55: #6f6f6f;
  --gray-40: #9a9a9a;
  --gray-25: #c4c4c4;
  --gray-15: #dedede;
  --gray-08: #ebebeb;
  --gray-04: #f4f4f4;
  --paper: #fafafa;
  --white: #ffffff;

  --serif: "Songti SC", "STSong", "Source Han Serif SC", "Noto Serif SC", "SimSun", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
    "Helvetica Neue", "Microsoft YaHei", Arial, sans-serif;
  --mono: "SF Mono", "JetBrains Mono", "IBM Plex Mono", Menlo, Consolas, monospace;

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-io: cubic-bezier(0.65, 0, 0.35, 1);

  --pad: clamp(22px, 5vw, 56px);
  --maxw: 940px;
}

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

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

body {
  margin: 0;
  background: var(--white);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

body.is-locked {
  overflow: hidden;
}

::selection {
  background: var(--ink);
  color: var(--white);
}

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

button {
  cursor: pointer;
  background: none;
  border: 0;
  padding: 0;
}

a {
  color: inherit;
}

:focus-visible {
  outline: 1px solid var(--ink);
  outline-offset: 3px;
}

[hidden] {
  display: none !important;
}

/* ---------- 背景层 ------------------------------------------------------- */

.aura {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(120% 78% at 50% -12%, #ffffff 0%, #fefefe 52%, #fafafa 82%, #f5f5f5 100%);
}

.grain {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.05;
  mix-blend-mode: normal;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.82' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='220' height='220' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* 顶部垂下的细线：一线天光 */
.beam {
  position: fixed;
  top: 0;
  left: 50%;
  width: 1px;
  height: 44vh;
  z-index: 0;
  pointer-events: none;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.18) 0%, rgba(0, 0, 0, 0.05) 42%, rgba(0, 0, 0, 0) 100%);
}

/* ---------- 顶栏 --------------------------------------------------------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px var(--pad);
  background: rgba(255, 255, 255, 0);
  border-bottom: 1px solid transparent;
  transition: background 0.4s var(--ease), border-color 0.4s var(--ease);
}

.topbar.is-stuck {
  background: var(--white);
  border-bottom-color: var(--gray-15);
}

.mark {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.mark-glyph {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  background: var(--ink);
  color: var(--white);
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1;
  padding-bottom: 2px;
}

.mark-text {
  display: flex;
  flex-direction: column;
  font-family: var(--serif);
  font-size: 14px;
  letter-spacing: 0.06em;
  line-height: 1.15;
}

.mark-text em {
  font-family: var(--mono);
  font-style: normal;
  font-size: 8px;
  letter-spacing: 0.22em;
  color: var(--gray-40);
}

.key-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 32px;
  padding: 0 14px;
  border: 1px solid var(--gray-25);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  color: var(--gray-70);
  background: rgba(255, 255, 255, 0.5);
  transition: border-color 0.25s, color 0.25s, background 0.25s;
  white-space: nowrap;
}

.key-btn:hover {
  border-color: var(--ink);
  color: var(--ink);
  background: var(--white);
}

.key-btn .dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--gray-25);
  transition: background 0.3s;
}

.key-btn.is-ready .dot {
  background: var(--ink);
}

/* ---------- 通用 --------------------------------------------------------- */

main {
  position: relative;
  z-index: 2;
}

.reveal {
  opacity: 0;
  transform: translateY(16px);
  filter: blur(7px);
  transition:
    opacity 1s var(--ease),
    transform 1.1s var(--ease),
    filter 1s var(--ease);
}

.reveal.is-in {
  opacity: 1;
  transform: none;
  filter: blur(0);
}

.mono {
  font-family: var(--mono);
}

/* ---------- 首屏 --------------------------------------------------------- */

.hero {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(60px, 12vh, 132px) var(--pad) clamp(80px, 14vh, 150px);
  min-height: 84vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.eyebrow {
  margin: 0 0 clamp(22px, 4vw, 38px);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.3em;
  color: var(--gray-55);
  text-transform: uppercase;
}

.hero-title {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(52px, 10.6vw, 148px);
  line-height: 0.98;
  letter-spacing: 0.01em;
}

.hero-title span {
  display: block;
}

.hero-title .t1 {
  color: var(--ink);
}

.hero-title .t2 {
  color: var(--ink);
  margin-left: clamp(0px, 8vw, 90px);
}

@supports ((-webkit-text-stroke: 1px black)) {
  .hero-title .t2 {
    color: transparent;
    -webkit-text-stroke: 1.4px var(--ink);
    letter-spacing: 0.04em;
  }
}

.lede {
  margin: clamp(30px, 5vw, 46px) 0 0;
  font-family: var(--serif);
  font-size: clamp(15px, 1.6vw, 18px);
  line-height: 2;
  color: var(--gray-70);
  letter-spacing: 0.02em;
}

.hero-foot {
  margin-top: clamp(46px, 8vw, 90px);
  display: flex;
  align-items: center;
  gap: 18px;
  cursor: pointer;
  width: fit-content;
}

.hero-foot .rule {
  width: clamp(40px, 12vw, 120px);
  height: 1px;
  background: var(--gray-25);
}

.scroll-hint {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  color: var(--gray-40);
}

/* ---------- 求问表单 ----------------------------------------------------- */

.ritual {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--pad);
}

.step {
  padding: clamp(40px, 7vw, 66px) 0;
  border-top: 1px solid var(--gray-15);
}

.step-head {
  display: flex;
  align-items: baseline;
  gap: 16px;
  margin-bottom: clamp(22px, 3.4vw, 32px);
}

.step-head .num {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--gray-40);
  padding-top: 8px;
}

.step-head h2 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(22px, 3vw, 28px);
  letter-spacing: 0.06em;
}

.step-head .en {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.24em;
  color: var(--gray-25);
  white-space: nowrap;
}

textarea {
  display: block;
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--gray-25);
  background: transparent;
  padding: 4px 0 14px;
  font-family: var(--serif);
  font-size: clamp(17px, 2.1vw, 21px);
  line-height: 1.95;
  letter-spacing: 0.01em;
  resize: vertical;
  border-radius: 0;
  transition: border-color 0.3s;
}

textarea::placeholder {
  color: var(--gray-40);
}

textarea:focus {
  outline: none;
  border-bottom-color: var(--ink);
}

.meta {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  margin-top: 12px;
  font-size: 11px;
  color: var(--gray-40);
  letter-spacing: 0.04em;
}

.count {
  font-family: var(--mono);
  white-space: nowrap;
  color: var(--gray-25);
}

/* 分段控件 */

.segmented {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border: 1px solid var(--gray-25);
  margin-bottom: clamp(26px, 4vw, 38px);
}

.seg {
  position: relative;
  height: clamp(52px, 7vw, 62px);
  font-family: var(--serif);
  font-size: clamp(15px, 2vw, 18px);
  letter-spacing: 0.16em;
  color: var(--gray-55);
  transition: color 0.35s, background 0.35s;
}

.seg + .seg {
  border-left: 1px solid var(--gray-25);
}

.seg::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 12px;
  width: 0;
  height: 1px;
  background: currentColor;
  transform: translateX(-50%);
  transition: width 0.4s var(--ease);
}

.seg:hover {
  color: var(--ink);
}

.seg.is-on {
  background: var(--ink);
  color: var(--white);
}

.seg.is-on::after {
  width: 22px;
}

/* 模式面板 */

.mode-panel {
  display: none;
}

.mode-panel.is-on {
  display: block;
  animation: panelIn 0.5s var(--ease) both;
}

@keyframes panelIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
}

.editor-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 10px;
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--gray-55);
}

.hint-mini {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.14em;
  color: var(--gray-25);
}

.rows {
  display: flex;
  flex-direction: column;
}

.row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 6px 0;
  border-bottom: 1px solid var(--gray-08);
  transition: border-color 0.3s;
}

.row:focus-within {
  border-bottom-color: var(--ink);
}

.row .idx {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--gray-25);
  width: 22px;
  flex: 0 0 22px;
  letter-spacing: 0.06em;
}

.row input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  padding: 12px 0;
  font-family: var(--serif);
  font-size: clamp(16px, 1.9vw, 18px);
  letter-spacing: 0.01em;
}

.row input:focus {
  outline: none;
}

.row input::placeholder {
  color: var(--gray-40);
}

.row .del {
  flex: 0 0 26px;
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  color: var(--gray-25);
  font-size: 16px;
  line-height: 1;
  transition: color 0.25s;
  opacity: 0;
}

.row:hover .del,
.row:focus-within .del {
  opacity: 1;
}

.row .del:hover {
  color: var(--ink);
}

.row .del:disabled {
  opacity: 0;
  pointer-events: none;
}

.ghost-add {
  margin-top: 16px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  color: var(--gray-55);
  padding: 8px 0;
  transition: color 0.25s;
}

.ghost-add:hover {
  color: var(--ink);
}

.ghost-add:disabled {
  color: var(--gray-25);
  cursor: not-allowed;
}

.hint-block {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(15px, 1.8vw, 17px);
  line-height: 2.1;
  color: var(--gray-55);
}

/* 提交 */

.submit-wrap {
  padding: clamp(44px, 7vw, 74px) 0 clamp(30px, 5vw, 50px);
}

.submit {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  width: 100%;
  height: clamp(78px, 11vw, 104px);
  background: var(--ink);
  color: var(--white);
  overflow: hidden;
  transition: background 0.4s;
}

.submit::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, transparent 20%, rgba(255, 255, 255, 0.16) 50%, transparent 80%);
  transform: translateX(-100%);
  transition: transform 0.9s var(--ease);
}

.submit:hover::before {
  transform: translateX(100%);
}

.submit:hover {
  background: #000;
}

.submit:disabled {
  cursor: progress;
}

.submit-cn {
  font-family: var(--serif);
  font-size: clamp(20px, 2.6vw, 26px);
  letter-spacing: 0.42em;
  text-indent: 0.42em;
}

.submit-en {
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.24em;
  color: rgba(255, 255, 255, 0.5);
}

.error {
  margin: 16px 0 0;
  min-height: 20px;
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--ink);
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 0.3s, transform 0.3s;
}

.error.is-on {
  opacity: 1;
  transform: none;
}

.error::before {
  content: "— ";
  color: var(--gray-40);
}

/* ---------- 页脚 --------------------------------------------------------- */

.foot {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 30px var(--pad) 60px;
  border-top: 1px solid var(--gray-15);
  display: flex;
  flex-wrap: wrap;
  gap: 16px 24px;
  justify-content: space-between;
  align-items: flex-start;
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--gray-40);
}

.foot-note {
  display: flex;
  flex-direction: column;
  gap: 7px;
  max-width: 620px;
  line-height: 1.85;
}

.foot-note p {
  margin: 0;
}

code {
  font-family: var(--mono);
  font-size: 0.94em;
  letter-spacing: 0;
  color: var(--gray-70);
  background: var(--gray-04);
  padding: 1px 4px;
}

.foot a {
  text-decoration: none;
  border-bottom: 1px solid var(--gray-25);
  padding-bottom: 1px;
  transition: color 0.25s, border-color 0.25s;
}

.foot a:hover {
  color: var(--ink);
  border-color: var(--ink);
}

/* ---------- 迷雾 / 求问中 ------------------------------------------------ */

.veil {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: none;
  place-items: center;
  background: #f7f7f7;
  overflow: hidden;
}

body.is-seeking .veil {
  display: grid;
  animation: veilIn 0.7s var(--ease) both;
}

@keyframes veilIn {
  from {
    opacity: 0;
  }
}

.veil-blob {
  position: absolute;
  width: 78vmax;
  height: 78vmax;
  border-radius: 50%;
  opacity: 0.85;
  will-change: transform;
}

.veil-blob.b1 {
  background: radial-gradient(circle at 50% 50%, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0) 62%);
  top: -26vmax;
  left: -12vmax;
  animation: drift1 13s ease-in-out infinite;
}

.veil-blob.b2 {
  background: radial-gradient(circle at 50% 50%, rgba(0, 0, 0, 0.075), rgba(0, 0, 0, 0) 60%);
  bottom: -30vmax;
  right: -16vmax;
  animation: drift2 17s ease-in-out infinite;
}

.veil-blob.b3 {
  background: radial-gradient(circle at 50% 50%, rgba(0, 0, 0, 0.055), rgba(0, 0, 0, 0) 65%);
  top: 22vmax;
  left: 24vmax;
  animation: drift3 21s ease-in-out infinite;
}

@keyframes drift1 {
  50% {
    transform: translate3d(9vmax, 7vmax, 0) scale(1.12);
  }
}

@keyframes drift2 {
  50% {
    transform: translate3d(-8vmax, -6vmax, 0) scale(1.16);
  }
}

@keyframes drift3 {
  50% {
    transform: translate3d(-10vmax, 5vmax, 0) scale(0.9);
  }
}

.veil-core {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 26px;
  text-align: center;
  padding: 0 28px;
}

.veil-glyph {
  font-family: var(--serif);
  font-size: clamp(40px, 4.6vw, 62px);
  line-height: 1;
  color: var(--ink);
  animation: breathe 3.4s ease-in-out infinite;
}

@keyframes breathe {
  0%,
  100% {
    opacity: 0.28;
    transform: scale(0.96);
  }
  50% {
    opacity: 1;
    transform: scale(1);
  }
}

.veil-text {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(15px, 2vw, 18px);
  letter-spacing: 0.32em;
  text-indent: 0.32em;
  color: var(--gray-70);
  transition: opacity 0.22s ease;
}

.veil-line {
  width: 1px;
  height: 64px;
  background: linear-gradient(to bottom, var(--gray-25), transparent);
  position: relative;
  overflow: hidden;
}

.veil-line::after {
  content: "";
  position: absolute;
  top: -64px;
  left: 0;
  width: 1px;
  height: 64px;
  background: var(--ink);
  animation: lineFlow 2.2s var(--ease-io) infinite;
}

@keyframes lineFlow {
  0% {
    transform: translateY(0);
    opacity: 0;
  }
  20% {
    opacity: 1;
  }
  100% {
    transform: translateY(128px);
    opacity: 0;
  }
}

/* ---------- 判词 --------------------------------------------------------- */

.verdict {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: var(--white);
  overflow-y: auto;
  overscroll-behavior: contain;
  clip-path: circle(0% at 50% 46%);
  transition: clip-path 1.1s var(--ease);
}

.verdict.is-open {
  clip-path: circle(160% at 50% 46%);
}

.verdict::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(64% 52% at 50% 36%, #ffffff 0%, #ffffff 56%, #f7f7f7 100%);
  opacity: 0;
  transition: opacity 1.4s 0.35s ease;
}

.verdict.is-open::before {
  opacity: 1;
}

.verdict-inner {
  position: relative;
  z-index: 2;
  min-height: 100vh;
  min-height: 100dvh;
  max-width: 1080px;
  margin: 0 auto;
  padding: clamp(44px, 7vh, 78px) var(--pad) clamp(34px, 5vh, 56px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  justify-content: safe center;
  text-align: center;
}

.v-eyebrow {
  margin: 0 0 clamp(20px, 4vh, 40px);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.34em;
  color: var(--gray-40);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.8s 0.5s var(--ease), transform 0.8s 0.5s var(--ease);
}

.verdict.is-open .v-eyebrow {
  opacity: 1;
  transform: none;
}

.v-answer {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(64px, 11vw, 200px);
  line-height: 1.08;
  text-wrap: balance;
  letter-spacing: 0.02em;
  color: var(--ink);
  max-width: 100%;
  word-break: break-word;
  opacity: 0;
  filter: blur(26px);
  transform: scale(1.08);
  transition: opacity 1.15s 0.42s var(--ease), filter 1.3s 0.42s var(--ease),
    transform 1.5s 0.42s var(--ease);
}

.verdict.is-open .v-answer {
  opacity: 1;
  filter: blur(0);
  transform: none;
}

.v-answer.is-long {
  font-size: clamp(34px, 7vw, 104px);
  line-height: 1.24;
}

.v-answer.is-xlong {
  font-size: clamp(22px, 4.4vw, 56px);
  line-height: 1.5;
  letter-spacing: 0.01em;
}

.v-question {
  margin: clamp(20px, 4vh, 34px) 0 0;
  max-width: 620px;
  font-family: var(--serif);
  font-size: clamp(13px, 1.5vw, 15px);
  line-height: 1.9;
  color: var(--gray-55);
  letter-spacing: 0.03em;
  opacity: 0;
  transition: opacity 0.9s 0.75s var(--ease);
}

.verdict.is-open .v-question {
  opacity: 1;
}

.v-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  width: min(620px, 100%);
  margin-top: clamp(34px, 6vh, 56px);
  border-top: 1px solid var(--gray-15);
  border-bottom: 1px solid var(--gray-15);
  opacity: 0;
  transition: opacity 0.9s 0.9s var(--ease);
}

.verdict.is-open .v-metrics {
  opacity: 1;
}

.metric {
  padding: 16px 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.metric + .metric {
  border-left: 1px solid var(--gray-15);
}

.metric .k {
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.2em;
  color: var(--gray-40);
}

.metric .v {
  font-family: var(--serif);
  font-size: 20px;
  letter-spacing: 0.02em;
}

.metric .v.mono {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--gray-70);
  letter-spacing: 0.02em;
  word-break: break-all;
}

.v-dist {
  width: min(620px, 100%);
  margin-top: clamp(26px, 4vh, 40px);
  display: flex;
  flex-direction: column;
  gap: 10px;
  opacity: 0;
  transition: opacity 0.9s 1s var(--ease);
}

.verdict.is-open .v-dist {
  opacity: 1;
}

.dist-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px 52px;
  align-items: center;
  gap: 14px;
  text-align: left;
  font-size: 12px;
  color: var(--gray-55);
}

.dist-row.is-top {
  color: var(--ink);
}

.dist-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: var(--serif);
  font-size: 14px;
}

.dist-bar {
  height: 2px;
  background: var(--gray-08);
  position: relative;
  overflow: hidden;
}

.dist-fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0;
  background: var(--gray-25);
  transition: width 1.1s 1.1s var(--ease);
}

.dist-row.is-top .dist-fill {
  background: var(--ink);
}

.verdict.is-open .dist-fill {
  width: var(--w);
}

.dist-num {
  font-family: var(--mono);
  font-size: 10px;
  text-align: right;
  letter-spacing: 0.02em;
}

.v-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-top: clamp(30px, 4.5vh, 46px);
  opacity: 0;
  transition: opacity 0.9s 1.15s var(--ease);
}

.verdict.is-open .v-actions {
  opacity: 1;
}

.btn {
  height: 44px;
  padding: 0 24px;
  border: 1px solid var(--ink);
  font-size: 12px;
  letter-spacing: 0.12em;
  color: var(--ink);
  background: var(--white);
  transition: background 0.3s, color 0.3s, border-color 0.3s;
}

.btn:hover {
  background: var(--ink);
  color: var(--white);
}

.btn-solid {
  background: var(--ink);
  color: var(--white);
}

.btn-solid:hover {
  background: #000;
  color: var(--white);
}

.btn-ghost {
  border-color: var(--gray-25);
  color: var(--gray-55);
}

.btn-ghost:hover {
  border-color: var(--ink);
  background: transparent;
  color: var(--ink);
}

/* ---------- 设置弹窗 ----------------------------------------------------- */

.modal {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: 20px;
}

.modal-scrim {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.94);
  animation: fadeIn 0.3s ease both;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
}

.modal-card {
  position: relative;
  width: min(480px, 100%);
  max-height: 90vh;
  overflow-y: auto;
  background: var(--white);
  border: 1px solid var(--gray-15);
  padding: clamp(24px, 4vw, 36px);
  box-shadow: 0 40px 80px -40px rgba(0, 0, 0, 0.28);
  animation: cardIn 0.45s var(--ease) both;
}

@keyframes cardIn {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.99);
  }
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.modal-head h3 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  font-size: 22px;
  letter-spacing: 0.1em;
}

.x {
  font-size: 20px;
  line-height: 1;
  color: var(--gray-40);
  width: 30px;
  height: 30px;
  transition: color 0.25s;
}

.x:hover {
  color: var(--ink);
}

.modal-note {
  margin: 0 0 26px;
  font-size: 11.5px;
  line-height: 1.9;
  color: var(--gray-55);
  letter-spacing: 0.02em;
}

.field {
  display: block;
  margin-bottom: 18px;
}

.field-k {
  display: block;
  margin-bottom: 8px;
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: 0.2em;
  color: var(--gray-40);
}

.field input {
  width: 100%;
  height: 46px;
  padding: 0 12px;
  border: 1px solid var(--gray-15);
  background: var(--paper);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.02em;
  transition: border-color 0.25s, background 0.25s;
}

.field input:focus {
  outline: none;
  border-color: var(--ink);
  background: var(--white);
}

.field-hint {
  display: block;
  margin-top: 8px;
  font-size: 10.5px;
  line-height: 1.7;
  color: var(--gray-40);
  letter-spacing: 0.02em;
}

.field-input {
  position: relative;
}

.field-input input {
  padding-right: 58px;
}

.peek {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 10px;
  letter-spacing: 0.1em;
  color: var(--gray-55);
  padding: 8px;
}

.peek:hover {
  color: var(--ink);
}

.modal-actions {
  display: flex;
  gap: 10px;
  margin-top: 26px;
}

.modal-actions .btn {
  flex: 1;
  height: 46px;
  font-size: 11px;
  letter-spacing: 0.14em;
}

.test-result {
  margin: 14px 0 0;
  min-height: 18px;
  font-size: 11px;
  line-height: 1.7;
  color: var(--gray-55);
}

.modal-foot {
  margin: 22px 0 0;
  padding-top: 16px;
  border-top: 1px solid var(--gray-08);
  font-size: 11px;
  color: var(--gray-40);
}

.modal-foot a {
  color: var(--gray-70);
  text-decoration: none;
  border-bottom: 1px solid var(--gray-25);
}

.modal-foot a:hover {
  color: var(--ink);
  border-color: var(--ink);
}

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

.toast {
  position: fixed;
  left: 50%;
  bottom: 34px;
  z-index: 200;
  transform: translate(-50%, 16px);
  padding: 12px 20px;
  background: var(--ink);
  color: var(--white);
  font-size: 12px;
  letter-spacing: 0.06em;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s, transform 0.35s var(--ease);
  max-width: calc(100vw - 40px);
  text-align: center;
}

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

/* ---------- 响应式 ------------------------------------------------------- */

@media (max-width: 700px) {
  .beam {
    width: 260px;
  }

  .hero {
    min-height: 76vh;
  }

  .hero-title .t2 {
    margin-left: 0;
  }

  .step-head .en {
    display: none;
  }

  .metric .v {
    font-size: 16px;
  }

  .metric .v.mono {
    font-size: 8px;
  }

  .dist-row {
    grid-template-columns: minmax(0, 1fr) 90px 44px;
    gap: 10px;
  }

  .row .del {
    opacity: 1;
  }

  .v-actions .btn {
    flex: 1 1 40%;
    padding: 0 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }

  .reveal,
  .v-answer {
    opacity: 1;
    filter: none;
    transform: none;
  }
}

.dot-sep {
  color: var(--gray-25);
  margin: 0 6px;
}
