/* ============================================================
   星算终端 · 二次元液态玻璃主题
   ============================================================ */
:root {
  --bg-url: none;

  --ink: #141a33;
  --muted: #5f6788;
  --soft: #8b93b0;
  --accent: #4b7bff;
  --accent-2: #9a6bff;
  --ok: #16b98a;
  --line: rgba(255, 255, 255, 0.82);
  --glass: rgba(255, 255, 255, 0.52);
  --radius: 22px;
  --ease: cubic-bezier(0.16, 0.84, 0.24, 1);
  --spring: cubic-bezier(0.2, 0.9, 0.25, 1.12);
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  font-family: "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei UI", "Segoe UI", system-ui, -apple-system, sans-serif;
  color: var(--ink);
  background: #eef2fb;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  animation: bodyIn 0.8s var(--ease) both;
}

::selection { background: rgba(120, 150, 255, 0.32); }

button { font-family: inherit; }
input, textarea { font-family: inherit; }

@keyframes bodyIn { from { opacity: 0; } to { opacity: 1; } }

/* ---------------- 背景层 ---------------- */
.scene {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  background: #e8eefc;
}

.scene__image {
  position: absolute;
  inset: -2%;
  background-image: var(--bg-url);
  background-size: cover;
  background-position: center;
  animation: kenburns 26s ease-in-out infinite alternate;
  will-change: transform;
}

@keyframes kenburns {
  from { transform: scale(1.02); }
  to { transform: scale(1.08) translate3d(-1%, -1.2%, 0); }
}

.scene__veil {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(118deg, rgba(255, 255, 255, 0.58) 0%, rgba(249, 251, 255, 0.32) 34%, rgba(238, 243, 255, 0.2) 66%, rgba(255, 240, 250, 0.3) 100%),
    radial-gradient(90% 70% at 18% 0%, rgba(255, 255, 255, 0.6), transparent 60%),
    radial-gradient(70% 60% at 92% 100%, rgba(214, 226, 255, 0.32), transparent 70%);
}

.scene__glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.65;
  animation: floatGlow 16s ease-in-out infinite alternate;
}

.scene__glow--a {
  width: 460px;
  height: 460px;
  left: -120px;
  top: 12%;
  background: radial-gradient(circle, rgba(255, 190, 225, 0.75), transparent 68%);
}

.scene__glow--b {
  width: 520px;
  height: 520px;
  right: -140px;
  bottom: -10%;
  background: radial-gradient(circle, rgba(150, 205, 255, 0.7), transparent 68%);
  animation-delay: -7s;
}

@keyframes floatGlow {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(30px, -40px, 0) scale(1.12); }
}

/* 花瓣 */
.petals { position: absolute; inset: 0; pointer-events: none; }

.petal {
  position: absolute;
  top: -8vh;
  width: var(--s);
  height: var(--s);
  border-radius: 60% 12% 60% 12%;
  background: linear-gradient(135deg, rgba(255, 210, 232, 0.95), rgba(255, 255, 255, 0.55));
  opacity: var(--o);
  filter: blur(0.3px);
  animation: fall var(--dur) linear infinite;
  animation-delay: var(--del);
}

@keyframes fall {
  0% { transform: translate3d(0, -10vh, 0) rotate(0deg); }
  100% { transform: translate3d(var(--drift), 112vh, 0) rotate(380deg); }
}

/* ---------------- 玻璃 ---------------- */
.glass {
  position: relative;
  isolation: isolate;
  background:
    linear-gradient(150deg, rgba(255, 255, 255, 0.66) 0%, rgba(255, 255, 255, 0.34) 42%, rgba(255, 255, 255, 0.56) 100%);
  -webkit-backdrop-filter: blur(26px) saturate(180%);
  backdrop-filter: blur(26px) saturate(180%);
  border: 1px solid var(--line);
  box-shadow:
    0 30px 60px -34px rgba(40, 52, 116, 0.55),
    0 2px 10px -6px rgba(40, 52, 116, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.95),
    inset 0 -20px 40px -34px rgba(255, 255, 255, 0.9);
  overflow: hidden;
}

.glass::before {
  content: "";
  position: absolute;
  inset: -46% -12% auto;
  height: 74%;
  background: radial-gradient(62% 100% at 32% 0%, rgba(255, 255, 255, 0.86), transparent 72%);
  transform: rotate(-7deg);
  opacity: 0.75;
  pointer-events: none;
  z-index: 0;
}

.glass::after {
  content: "";
  position: absolute;
  top: 0;
  left: -55%;
  width: 42%;
  height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.5), transparent);
  transform: skewX(-18deg);
  pointer-events: none;
  z-index: 0;
  animation: sheen 11s ease-in-out infinite;
}

@keyframes sheen {
  0%, 62% { left: -55%; }
  92%, 100% { left: 135%; }
}

.glass > * { position: relative; z-index: 1; }

/* ---------------- 布局 ---------------- */
.shell {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 1220px;
  margin: 0 auto;
  padding: 24px 26px 30px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-height: 100vh;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 18px;
  border-radius: 24px;
}

.brand { display: flex; align-items: center; gap: 13px; }

.brand__mark {
  width: 46px;
  height: 46px;
  border-radius: 15px;
  display: block;
  object-fit: cover;
  box-shadow: 0 14px 26px -12px rgba(110, 110, 255, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.65);
  animation: markFloat 5s ease-in-out infinite;
}

@keyframes markFloat {
  0%, 100% { transform: translateY(0) rotate(0); }
  50% { transform: translateY(-3px) rotate(-2deg); }
}

.brand__text h1 {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.brand__slash { color: #9aa5cc; font-weight: 400; margin: 0 2px; }

.brand__text p {
  margin: 3px 0 0;
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.03em;
}

.dot { color: #b6bed6; }

.conn { display: inline-flex; align-items: center; gap: 6px; }

.conn i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 0 0 rgba(22, 185, 138, 0.55);
  animation: pulse 2s ease-out infinite;
}

.conn.is-off i { background: #f0a13a; box-shadow: none; animation: none; }
.conn.is-demo i { background: #a06bff; box-shadow: none; animation: none; }

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(22, 185, 138, 0.5); }
  70% { box-shadow: 0 0 0 7px rgba(22, 185, 138, 0); }
  100% { box-shadow: 0 0 0 0 rgba(22, 185, 138, 0); }
}

.topbar__actions { display: flex; gap: 8px; }

.icon-btn, .ghost-btn, .mini-btn, .primary-btn {
  cursor: pointer;
  transition: transform 0.22s var(--spring), box-shadow 0.25s, background 0.25s, color 0.25s;
}

.icon-btn {
  height: 38px;
  padding: 0 15px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.9);
  background: rgba(255, 255, 255, 0.5);
  color: #3d456f;
  font-size: 12.5px;
  letter-spacing: 0.04em;
  box-shadow: inset 0 1px 0 #fff;
}

.icon-btn:hover { transform: translateY(-2px); background: rgba(255, 255, 255, 0.78); box-shadow: 0 12px 22px -14px rgba(50, 60, 130, 0.7); }
.icon-btn:active { transform: translateY(0) scale(0.97); }

.workspace {
  display: grid;
  grid-template-columns: 452px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
  flex: 1;
}

.col { display: flex; flex-direction: column; gap: 16px; min-width: 0; }

.card {
  border-radius: var(--radius);
  padding: 17px 18px 19px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 22px;
}

.card__head h2 {
  margin: 0;
  font-size: 14.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.hint {
  font-size: 11.5px;
  color: var(--soft);
  letter-spacing: 0.03em;
  transition: color 0.3s;
}

.hint.is-ok { color: var(--ok); }
.hint.is-err { color: #d9534f; }

/* ---------------- Tabs ---------------- */
.tabs {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 6px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.34);
  border: 1px solid rgba(255, 255, 255, 0.7);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), inset 0 -6px 14px -12px rgba(50, 60, 130, 0.5);
}

.tabs__pill {
  position: absolute;
  top: 6px;
  bottom: 6px;
  left: 6px;
  width: calc(50% - 10px);
  border-radius: 12px;
  background: linear-gradient(160deg, #ffffff, #f2f5ff 70%, #eef1ff);
  box-shadow:
    0 12px 22px -14px rgba(50, 62, 130, 0.75),
    inset 0 1px 0 #fff,
    inset 0 -1px 0 rgba(180, 195, 235, 0.6);
  transform: translate3d(0, 0, 0);
  transition: transform 0.26s cubic-bezier(0.22, 0.9, 0.28, 1);
  will-change: transform;
  z-index: 0;
}

.tab {
  position: relative;
  z-index: 1;
  border: 0;
  background: transparent;
  padding: 9px 6px 8px;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  cursor: pointer;
  color: var(--muted);
  transition: color 0.35s, transform 0.35s var(--spring);
}

.tab:hover { transform: translateY(-1px); }
.tab__title { font-size: 15px; font-weight: 600; letter-spacing: 0.06em; }
.tab__sub { font-size: 11px; color: var(--soft); letter-spacing: 0.06em; }
.tab.is-active { color: var(--ink); }
.tab.is-active .tab__title { font-weight: 700; }
.tab.is-active .tab__sub { color: #6a72a0; }

/* ---------------- 表单 ---------------- */
.field { display: flex; gap: 8px; }

.input {
  flex: 1;
  min-width: 0;
  height: 46px;
  padding: 0 14px;
  border-radius: 13px;
  border: 1px solid rgba(255, 255, 255, 0.9);
  background: rgba(255, 255, 255, 0.62);
  color: var(--ink);
  font-size: 14.5px;
  outline: none;
  box-shadow: inset 0 1px 3px rgba(40, 52, 116, 0.07);
  transition: border-color 0.25s, box-shadow 0.25s, background 0.25s;
}

.input--mono { font-family: Consolas, "Cascadia Mono", Menlo, monospace; letter-spacing: 0.09em; }

.input::placeholder { color: #a1a9c4; letter-spacing: 0.02em; }

.input:focus {
  border-color: rgba(92, 126, 255, 0.62);
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 0 0 4px rgba(92, 126, 255, 0.15), inset 0 1px 3px rgba(40, 52, 116, 0.05);
}

.ghost-btn {
  height: 46px;
  padding: 0 15px;
  border-radius: 13px;
  border: 1px solid rgba(255, 255, 255, 0.92);
  background: rgba(255, 255, 255, 0.56);
  color: #3d456f;
  font-size: 12.5px;
  letter-spacing: 0.04em;
  box-shadow: inset 0 1px 0 #fff;
  white-space: nowrap;
}

.ghost-btn:hover { transform: translateY(-1px); background: #fff; box-shadow: 0 10px 20px -14px rgba(50, 60, 130, 0.8); }
.ghost-btn:active { transform: scale(0.97); }

.textarea-wrap {
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.9);
  background: rgba(255, 255, 255, 0.56);
  box-shadow: inset 0 1px 3px rgba(40, 52, 116, 0.07);
  overflow: hidden;
  transition: border-color 0.25s, box-shadow 0.25s;
}

.textarea-wrap:focus-within {
  border-color: rgba(92, 126, 255, 0.6);
  box-shadow: 0 0 0 4px rgba(92, 126, 255, 0.14);
}

.textarea {
  display: block;
  width: 100%;
  min-height: 128px;
  max-height: 260px;
  padding: 12px 14px;
  border: 0;
  outline: none;
  resize: vertical;
  background: transparent;
  color: #232b4e;
  font-family: Consolas, "Cascadia Mono", Menlo, monospace;
  font-size: 12.5px;
  line-height: 1.7;
  letter-spacing: 0.04em;
}

.textarea::placeholder {
  color: #a1a9c4;
  font-family: "PingFang SC", "Microsoft YaHei UI", system-ui, sans-serif;
  letter-spacing: 0.03em;
  font-size: 13px;
}

.textarea-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 7px 10px 7px 14px;
  font-size: 11.5px;
  color: var(--soft);
  border-top: 1px dashed rgba(86, 104, 165, 0.18);
  background: rgba(255, 255, 255, 0.24);
}

.mini-actions { display: flex; gap: 6px; }

.mini-btn {
  height: 28px;
  padding: 0 11px;
  border-radius: 9px;
  border: 1px solid rgba(255, 255, 255, 0.9);
  background: rgba(255, 255, 255, 0.6);
  color: #4a527c;
  font-size: 11.5px;
  letter-spacing: 0.03em;
}

.mini-btn:hover { background: #fff; transform: translateY(-1px); }
.mini-btn:active { transform: scale(0.96); }

/* ---------------- 滑块验证 ---------------- */
.captcha__track {
  position: relative;
  height: 48px;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(240, 244, 255, 0.92), rgba(224, 232, 250, 0.86));
  border: 1px solid rgba(255, 255, 255, 0.95);
  box-shadow: inset 0 2px 7px rgba(60, 80, 150, 0.1);
  overflow: hidden;
  user-select: none;
  touch-action: none;
  transition: background 0.5s, box-shadow 0.4s;
}

.captcha__fill {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 0;
  background: linear-gradient(90deg, rgba(124, 160, 255, 0.3), rgba(168, 122, 255, 0.38));
  transition: background 0.4s;
}

.captcha__text {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12.5px;
  letter-spacing: 0.06em;
  color: #6f779b;
  pointer-events: none;
  transition: color 0.4s, opacity 0.4s;
}

.captcha__thumb {
  position: absolute;
  top: 4px;
  left: 4px;
  width: 48px;
  height: 40px;
  border-radius: 11px;
  border: 1px solid #fff;
  background: linear-gradient(180deg, #ffffff, #edf1ff);
  color: #7d89b8;
  display: grid;
  place-items: center;
  box-shadow: 0 10px 20px -10px rgba(50, 70, 140, 0.7), inset 0 1px 0 #fff;
  cursor: grab;
  touch-action: none;
  transition: left 0.42s var(--spring), background 0.4s, color 0.4s, box-shadow 0.4s;
}

.captcha__thumb:active { cursor: grabbing; }
.captcha__thumb svg { width: 18px; height: 18px; transition: opacity 0.3s, transform 0.35s var(--spring); }
.captcha__thumb .check { position: absolute; opacity: 0; transform: scale(0.5) rotate(-20deg); }

.captcha.is-ok .captcha__fill { background: linear-gradient(90deg, rgba(84, 220, 178, 0.34), rgba(46, 196, 155, 0.45)); }
.captcha.is-ok .captcha__text { color: #0f8f6b; font-weight: 600; }
.captcha.is-ok .captcha__thumb {
  background: linear-gradient(180deg, #e8fff6, #c7f5e3);
  color: #0f9c72;
  box-shadow: 0 10px 22px -10px rgba(20, 160, 120, 0.85), inset 0 1px 0 #fff;
}
.captcha.is-ok .chev { opacity: 0; transform: scale(0.6); }
.captcha.is-ok .check { opacity: 1; transform: scale(1) rotate(0); }

.captcha.is-drag .captcha__thumb { transition: none; }
.captcha.is-err { animation: shake 0.42s ease; }
.captcha.is-locked .captcha__thumb { cursor: default; }
.captcha.is-locked .captcha__track { box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9); }
.captcha.is-err .captcha__fill { background: linear-gradient(90deg, rgba(255, 140, 140, 0.3), rgba(255, 100, 120, 0.4)); }

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  55% { transform: translateX(4px); }
  80% { transform: translateX(-2px); }
}

/* ---------------- 主按钮 ---------------- */
.cta {
  position: relative;
  height: 56px;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 18px;
  background: linear-gradient(118deg, #4b7bff, #7a6bff 52%, #a96bff);
  color: #fff;
  font-size: 15.5px;
  font-weight: 700;
  letter-spacing: 0.16em;
  cursor: pointer;
  overflow: hidden;
  box-shadow:
    0 24px 44px -22px rgba(88, 96, 255, 0.95),
    0 2px 6px -2px rgba(70, 80, 200, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.55),
    inset 0 -3px 14px rgba(46, 22, 130, 0.28);
  transition: transform 0.25s var(--spring), box-shadow 0.3s, filter 0.3s;
}

.cta::before {
  content: "";
  position: absolute;
  top: 0;
  left: -70%;
  width: 45%;
  height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.55), transparent);
  transform: skewX(-20deg);
  animation: ctaSheen 4.2s ease-in-out infinite;
  pointer-events: none;
}

@keyframes ctaSheen {
  0%, 55% { left: -70%; }
  92%, 100% { left: 130%; }
}

.cta:hover { transform: translateY(-2px) scale(1.008); filter: saturate(1.08); box-shadow: 0 30px 52px -24px rgba(88, 96, 255, 1), inset 0 1px 0 rgba(255, 255, 255, 0.6); }
.cta:active { transform: translateY(0) scale(0.995); }
.cta:disabled { cursor: default; filter: grayscale(0.15) brightness(0.98); opacity: 0.85; transform: none; }
.termsWarn { color: var(--danger, #df435d); font-weight: 700; line-height: 1.8; }

/* 未同意使用规则：按钮置灰，明确不可计算 */
.cta.is-locked,
.cta.is-locked:disabled {
  cursor: not-allowed;
  background: #b7bfd0;
  color: #f4f6fb;
  border: 1px solid rgba(120, 132, 158, .5);
  box-shadow: none;
  filter: none;
  opacity: 1;
  transform: none;
}
.cta.is-locked::before { opacity: 0; }

.cta__label { position: relative; z-index: 1; }

.cta__spinner {
  display: none;
  position: relative;
  z-index: 1;
  width: 17px;
  height: 17px;
  margin-left: 10px;
  vertical-align: -3px;
  border: 2px solid rgba(255, 255, 255, 0.42);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.75s linear infinite;
}

.cta.is-loading .cta__spinner { display: inline-block; }
.cta.is-loading::before { animation-play-state: paused; opacity: 0; }

@keyframes spin { to { transform: rotate(360deg); } }

/* ---------------- 结果 ---------------- */
.card--result { flex: 0 0 auto; min-height: 424px; }

.tags { display: flex; flex-wrap: wrap; gap: 8px; }

.tag {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 11px;
  border-radius: 999px;
  font-size: 11.5px;
  color: #6a7194;
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.85);
  letter-spacing: 0.03em;
  transition: color 0.4s, background 0.4s, border-color 0.4s, transform 0.4s var(--spring);
}

.tag i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #b9c0d8;
  transition: background 0.4s, box-shadow 0.4s;
}

.tag em { font-style: normal; }

.tag.is-ok {
  color: #0f8f6b;
  background: rgba(224, 251, 241, 0.78);
  border-color: rgba(122, 232, 198, 0.75);
  animation: tagPop 0.5s var(--spring);
}

.tag.is-ok i { background: var(--ok); box-shadow: 0 0 0 3px rgba(22, 185, 138, 0.18); }

@keyframes tagPop {
  0% { transform: scale(0.9); }
  60% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

.result {
  position: relative;
  flex: 0 0 auto;
  min-height: 420px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.92);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.66), rgba(246, 249, 255, 0.52));
  box-shadow: inset 0 2px 10px rgba(60, 80, 150, 0.07);
  padding: 18px;
  overflow: visible;
}

.result__text {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-all;
  font-family: Consolas, "Cascadia Mono", Menlo, monospace;
  font-size: 13.5px;
  line-height: 1.85;
  letter-spacing: 0.09em;
  color: #1f2748;
  transition: opacity 0.4s;
}

.result__text.is-empty {
  font-family: "PingFang SC", "Microsoft YaHei UI", system-ui, sans-serif;
  font-size: 13px;
  letter-spacing: 0.03em;
  color: #98a0bf;
}

.result__text.is-error { color: #c8402f; letter-spacing: 0.02em; }

.result__text.is-reveal::after {
  content: "";
  display: inline-block;
  width: 7px;
  height: 15px;
  margin-left: 3px;
  vertical-align: -2px;
  background: linear-gradient(180deg, #6c8dff, #a06bff);
  animation: caret 0.9s steps(2) infinite;
}

@keyframes caret { 50% { opacity: 0; } }

.result__scan {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 42%;
  background: linear-gradient(180deg, transparent, rgba(124, 164, 255, 0.2), transparent);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-110%);
}

.result.is-scanning .result__scan { opacity: 1; animation: scan 1.6s ease-in-out infinite; }

@keyframes scan {
  0% { transform: translateY(-110%); }
  100% { transform: translateY(260%); }
}

.result__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  min-height: 17px;
  font-size: 11.5px;
  color: #5f6788;
  letter-spacing: 0.02em;
}

.result__meta b { color: #3a4370; font-weight: 600; }

.result__note {
  margin: 0;
  font-size: 11px;
  line-height: 1.7;
  color: var(--soft);
}

/* ---------------- 说明 ---------------- */
.tips {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 9px;
  counter-reset: tip;
}

.tips li {
  position: relative;
  padding-left: 30px;
  font-size: 12.5px;
  line-height: 1.7;
  color: #4d5578;
  counter-increment: tip;
}

.tips li::before {
  content: counter(tip);
  position: absolute;
  left: 0;
  top: 1px;
  width: 20px;
  height: 20px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 700;
  color: #5d6bff;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.95);
  box-shadow: 0 6px 12px -9px rgba(60, 70, 150, 0.8);
}

.tips b { color: #1d2547; font-weight: 600; }

/* ---------------- 页脚 ---------------- */
.footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 11px;
  color: rgba(62, 72, 108, 0.72);
  letter-spacing: 0.04em;
  padding-bottom: 4px;
}

/* ---------------- 入场动画 ---------------- */
.reveal {
  opacity: 0;
  transform: translateY(18px) scale(0.988);
  animation: rise 0.85s var(--ease) forwards;
  animation-delay: var(--d, 0ms);
}

@keyframes rise {
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* ---------------- Toast ---------------- */
.toasts {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 90;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast {
  min-width: 200px;
  max-width: 340px;
  padding: 12px 16px;
  border-radius: 14px;
  font-size: 12.5px;
  line-height: 1.6;
  color: #1c2340;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.95);
  box-shadow: 0 22px 46px -24px rgba(40, 50, 110, 0.8);
  transform: translateX(120%);
  animation: toastIn 0.36s var(--spring) forwards;
  pointer-events: auto;
  cursor: pointer;
  will-change: transform;
}

.toast.is-ok { border-left: 3px solid var(--ok); }
.toast.is-err { border-left: 3px solid #ef5a4c; }
.toast.is-out { animation: toastOut 0.26s ease forwards; }

@keyframes toastIn { to { transform: translateX(0); } }
@keyframes toastOut { to { transform: translateX(120%); opacity: 0; } }

/* ---------------- 弹窗 ---------------- */
.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 20px;
}

.modal[hidden] { display: none; }

.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(28, 34, 66, 0.28);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  animation: fadeIn 0.35s ease;
}

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

.modal__panel {
  position: relative;
  width: min(520px, 94vw);
  border-radius: 24px;
  padding: 24px 24px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  animation: popIn 0.45s var(--spring);
}

@keyframes popIn {
  from { opacity: 0; transform: translateY(14px) scale(0.96); }
  to { opacity: 1; transform: none; }
}

.modal__panel h3 { margin: 0; font-size: 16px; letter-spacing: 0.04em; }
.modal__desc { margin: 0 0 4px; font-size: 12px; line-height: 1.7; color: var(--muted); }

.modal__row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }

.switch { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); cursor: pointer; user-select: none; }
.switch input { width: 16px; height: 16px; accent-color: #6b7dff; cursor: pointer; }

.modal__buttons { display: flex; align-items: center; gap: 10px; margin-top: 6px; }
.modal__buttons .ghost-btn { height: 38px; }
.modal__buttons .mini-btn { height: 38px; border-style: dashed; }
.spacer { flex: 1; }

.primary-btn {
  height: 38px;
  padding: 0 20px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  background: linear-gradient(118deg, #4b7bff, #8b6bff);
  color: #fff;
  font-size: 13px;
  letter-spacing: 0.08em;
  box-shadow: 0 16px 26px -16px rgba(80, 90, 240, 0.95), inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.primary-btn:hover { transform: translateY(-1px); filter: brightness(1.05); }
.primary-btn:active { transform: scale(0.97); }

/* ---------------- 响应式 ---------------- */
@media (max-width: 1000px) {
  .workspace { grid-template-columns: 1fr; }
  .card--result { min-height: 340px; }
  .shell { padding: 16px 14px 24px; }
  .brand__text h1 { font-size: 15px; }
}

@media (max-width: 620px) {
  .topbar { flex-direction: column; align-items: flex-start; gap: 12px; }
  .topbar__actions { width: 100%; }
  .icon-btn { flex: 1; }
  .result__text { font-size: 12.5px; letter-spacing: 0.06em; }
  .footer { flex-wrap: wrap; }
}

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

/* ============================================================
   K4U 专属视觉层：暗墨底 + 电光青 / 荧光绿，切角卡片 + 网格刻度
   ============================================================ */
:root {
  --accent: #00d5e8;
  --accent-2: #b6f542;
  --ink: #0f1730;
  --line: rgba(255, 255, 255, 0.7);
  --radius: 16px;
}

.scene__grid {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(rgba(12, 22, 48, 0.28) 1px, transparent 1px),
    linear-gradient(120deg, rgba(0, 213, 232, 0.14), rgba(182, 245, 66, 0.1) 55%, rgba(255, 120, 220, 0.12));
  background-size: 22px 22px, 100% 100%;
  mask-image: radial-gradient(120% 90% at 50% 30%, rgba(0, 0, 0, 0.55), transparent 78%);
  -webkit-mask-image: radial-gradient(120% 90% at 50% 30%, rgba(0, 0, 0, 0.55), transparent 78%);
  pointer-events: none;
}

/* 品牌标：自定义头像图标（点击可换背景，不写提示） */
.brand__mark {
  width: 50px;
  height: 50px;
  border-radius: 17px;
  display: block;
  object-fit: cover;
  border: 1px solid rgba(0, 213, 232, 0.55);
  box-shadow: 0 10px 26px rgba(0, 180, 210, 0.42);
}

.brand h1 {
  font-size: 17px;
  letter-spacing: 0.4px;
  font-weight: 800;
}

.brand h1::after {
  content: "K4U";
  margin-left: 8px;
  padding: 2px 7px;
  font-family: "JetBrains Mono", "Consolas", monospace;
  font-size: 9.5px;
  letter-spacing: 2px;
  color: #0f1730;
  background: linear-gradient(120deg, #b6f542, #00d5e8);
  clip-path: polygon(6px 0, 100% 0, 100% calc(100% - 6px), calc(100% - 6px) 100%, 0 100%, 0 6px);
  vertical-align: 3px;
}

.brand p {
  font-family: "JetBrains Mono", "Consolas", monospace;
  letter-spacing: 1.4px;
  font-size: 10px;
  text-transform: uppercase;
}

/* 卡片：切角而不是圆角，更像我们自己的面板 */
.glass.card {
  border-radius: 0;
  clip-path: polygon(0 0, calc(100% - 18px) 0, 100% 18px, 100% 100%, 18px 100%, 0 calc(100% - 18px));
  border: 1px solid rgba(255, 255, 255, 0.66);
  background:
    linear-gradient(150deg, rgba(255, 255, 255, 0.62), rgba(255, 255, 255, 0.34) 46%, rgba(226, 246, 255, 0.4));
  box-shadow: 0 18px 44px rgba(17, 30, 68, 0.16);
}

.glass.card::before {
  border-radius: 0;
}

.card__head h2 {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  letter-spacing: 0.6px;
}

.card__head h2::before {
  content: "";
  width: 4px;
  height: 15px;
  background: linear-gradient(180deg, #00d5e8, #b6f542);
  box-shadow: 0 0 12px rgba(0, 213, 232, 0.55);
}

.card__head .hint {
  font-family: "JetBrains Mono", "Consolas", monospace;
  font-size: 10px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

/* 顶部标签栏 */
.tab.is-active {
  color: #0f1730;
}

.tabs__pill {
  border-radius: 0;
  clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 10px 100%, 0 calc(100% - 10px));
  background: linear-gradient(120deg, rgba(214, 255, 90, 0.9), rgba(0, 213, 232, 0.55));
}

/* 主按钮：暗墨底 + 电光描边，和别人的渐变蓝彻底区分 */
.cta {
  border-radius: 0;
  clip-path: polygon(0 0, calc(100% - 16px) 0, 100% 16px, 100% 100%, 16px 100%, 0 calc(100% - 16px));
  background: linear-gradient(120deg, #101a38 0%, #16224a 52%, #0b2b3a 100%);
  color: #e8ff9a;
  letter-spacing: 1px;
  box-shadow: 0 16px 34px rgba(9, 18, 40, 0.34), inset 0 0 0 1px rgba(182, 245, 66, 0.32);
}

.cta::after {
  background: linear-gradient(100deg, transparent 20%, rgba(0, 213, 232, 0.32) 50%, transparent 80%);
}

.cta:hover {
  color: #ffffff;
  box-shadow: 0 20px 42px rgba(0, 180, 210, 0.34), inset 0 0 0 1px rgba(0, 213, 232, 0.6);
}

/* 结果区：终端质感 */
.result {
  border-radius: 0;
  clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 14px 100%, 0 calc(100% - 14px));
  background: linear-gradient(160deg, rgba(9, 16, 36, 0.92), rgba(13, 26, 48, 0.9));
  border: 1px solid rgba(0, 213, 232, 0.28);
}

.result__text {
  color: #d8ff7a;
  font-family: "JetBrains Mono", "Cascadia Mono", "Consolas", monospace;
  letter-spacing: 1.2px;
  text-shadow: 0 0 14px rgba(182, 245, 66, 0.35);
}

.result__text.is-empty { color: #7f8db3; }

.tag {
  border-radius: 0;
  clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 8px 100%, 0 calc(100% - 8px));
}

.tag.is-ok {
  color: #0b6d3f;
  border-color: rgba(0, 213, 232, 0.5);
  background: rgba(182, 245, 66, 0.28);
}

.icon-btn {
  border-radius: 0;
  clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 8px 100%, 0 calc(100% - 8px));
  font-family: "JetBrains Mono", "Consolas", monospace;
  letter-spacing: 0.6px;
}

.field .input,
.field textarea,
.blob textarea {
  border-radius: 0;
  clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 10px 100%, 0 calc(100% - 10px));
}

.captcha__track,
.captcha__thumb {
  border-radius: 0;
}

/* 点 LOGO 换背景：光标提示但不写文字 */
.brand__mark { cursor: pointer; transition: transform 0.22s ease, box-shadow 0.22s ease; }
.brand__mark:hover { transform: translateY(-1px) scale(1.03); box-shadow: 0 14px 30px rgba(0, 180, 210, 0.46); }
.brand__mark:active { transform: scale(0.97); }

/* ============================================================
   K4U 布局 v4 · 清晰步骤式
   左：1 类型/卡密 → 2 BLOB → 3 验证并计算
   右：计算结果 + 使用说明
   ============================================================ */
.shell {
  max-width: 1240px;
  padding: 20px 24px 26px;
  gap: 14px;
}

/* 顶栏 */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 20px;
  border-radius: 0;
  clip-path: polygon(0 0, calc(100% - 18px) 0, 100% 18px, 100% 100%, 18px 100%, 0 calc(100% - 18px));
}

.brand h1 {
  font-size: 19px;
  letter-spacing: 0.4px;
}

.brand h1::after { display: none; }

.brand p {
  margin-top: 4px;
  font-family: inherit;
  font-size: 12px;
  letter-spacing: 0.3px;
  text-transform: none;
  color: #5f6d90;
}

.topbar__status { display: flex; align-items: center; gap: 10px; }

.topbar__status .conn { font-size: 12px; color: #3f4d70; }

/* 主体：左步骤 / 右结果 */
.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(350px, 0.82fr);
  gap: 18px;
  align-items: start;
}

.steps {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.step {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 14px;
}

.step__rail {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 8px;
}

.step__num {
  flex: none;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  font-family: "JetBrains Mono", "Cascadia Mono", "Consolas", monospace;
  font-size: 16px;
  font-weight: 800;
  color: #0b2b3a;
  background: linear-gradient(135deg, #c8ff5a, #00d5e8);
  clip-path: polygon(9px 0, 100% 0, 100% calc(100% - 9px), calc(100% - 9px) 100%, 0 100%, 0 9px);
  box-shadow: 0 10px 20px rgba(0, 180, 210, 0.28);
}

.step__line {
  flex: 1;
  width: 2px;
  margin-top: 8px;
  background: linear-gradient(180deg, rgba(0, 180, 210, 0.42), rgba(0, 180, 210, 0.04));
}

.step:last-child .step__line { display: none; }

.step__body {
  padding: 16px 18px 18px;
  gap: 12px;
}

.step__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.step__head h2 {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.3px;
}

.step__head h2::before {
  content: "";
  width: 4px;
  height: 16px;
  background: linear-gradient(180deg, #00d5e8, #b6f542);
  box-shadow: 0 0 10px rgba(0, 213, 232, 0.5);
}

.step__desc {
  margin: 6px 0 0;
  font-size: 12px;
  line-height: 1.65;
  color: #5f6d90;
}

.step__head .hint {
  flex: none;
  margin-top: 2px;
  font-family: inherit;
  font-size: 11.5px;
  letter-spacing: 0;
  text-transform: none;
}

.step__foot {
  margin: 2px 0 0;
  font-size: 11px;
  line-height: 1.7;
  color: #7481a2;
}

/* 步骤内的控件放大一档，更好点 */
.step .tabs { padding: 5px; }
.step .tab { padding: 10px 8px; }
.step .tab__title { font-size: 15.5px; }
.step .tab__sub { font-size: 11.5px; }
.step .input,
.step .ghost-btn { height: 48px; }
.step .textarea { min-height: 150px; max-height: 240px; font-size: 13px; }
.step .cta { width: 100%; max-width: 380px; align-self: center; height: 52px; font-size: 15.5px; letter-spacing: 2px; }
.step .captcha { width: 100%; max-width: 380px; align-self: center; }
.step__foot {
  width: 100%;
  max-width: 380px;
  align-self: center;
  text-align: center;
}

/* 右侧：结果 + 说明 */
.result-col {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.card--result {
  flex: none;
  min-height: 0;
  padding: 16px 18px 18px;
  gap: 12px;
}

.card--result .result { min-height: 300px; }
.card--result .result__text { font-size: 13.5px; line-height: 1.8; }

.card--tips {
  padding: 15px 18px 17px;
  gap: 10px;
}

.card--tips .hint {
  font-family: inherit;
  font-size: 11px;
  letter-spacing: 0;
  text-transform: none;
}

.card--tips .tips { gap: 8px; }
.card--tips .tips li { font-size: 12px; }

/* 页脚 */
.footer {
  justify-content: center;
  gap: 8px;
  padding-bottom: 2px;
  font-family: inherit;
  font-size: 11.5px;
  letter-spacing: 0.02em;
  text-transform: none;
  color: rgba(55, 68, 102, 0.72);
}

@media (max-width: 1024px) {
  .layout { grid-template-columns: 1fr; }
  .card--result .result { min-height: 220px; }
}

@media (max-width: 620px) {
  .shell { padding: 14px 12px 20px; gap: 12px; }

  .topbar {
    flex-direction: row;
    align-items: center;
    padding: 12px 14px;
  }

  .brand h1 { font-size: 16px; }
  .brand p { font-size: 11px; }

  .step { grid-template-columns: 30px minmax(0, 1fr); gap: 10px; }
  .step__num { width: 28px; height: 28px; font-size: 13px; }
  .step__body { padding: 13px 14px 15px; }
  .step__head { flex-direction: column; gap: 6px; }
  .step__head .hint { margin-top: 0; }

  .card--result .result { min-height: 190px; }
  .footer { flex-wrap: wrap; }
}

/* 手机端降低毛玻璃开销，切 Tab 更跟手 */
@media (max-width: 720px) {
  .glass {
    -webkit-backdrop-filter: blur(14px) saturate(150%);
    backdrop-filter: blur(14px) saturate(150%);
  }
  .glass::before { opacity: 0.55; }
  .scene__grid { opacity: 0.55; }
  .tabs__pill { transition-duration: 0.2s; }
  .tab { transition: color 0.2s; }
}

/* ================= 精致化：悬停 / 动画 ================= */
.step__body {
  transition: transform .28s var(--ease), border-color .28s, box-shadow .28s;
}
.step__body:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, .96);
  box-shadow: 0 26px 50px -32px rgba(70, 100, 255, .55);
}
.step__num {
  transition: transform .25s var(--spring), box-shadow .25s;
}
.step:hover .step__num {
  transform: scale(1.06);
  box-shadow: 0 12px 26px rgba(0, 180, 210, .42);
}
.card--tips { transition: transform .28s var(--ease), border-color .28s; }
.card--tips:hover { transform: translateY(-1px); border-color: rgba(255, 255, 255, .92); }
@media (prefers-reduced-motion: reduce) {
  .step__body:hover, .step:hover .step__num, .card--tips:hover { transform: none; }
}

