/* AI一人公司贷款额度测算 — 深色科技风，克制配色 */

:root {
  --bg-deep: #07090d;
  --bg-panel: rgba(10, 17, 26, 0.86);
  --border: rgba(120, 160, 200, 0.12);
  --border-strong: rgba(100, 180, 220, 0.22);
  --text: #e8edf4;
  --text-muted: #8b96a8;
  --accent: #5eb8e8;
  --accent-hot: #9efcff;
  --accent-dim: rgba(94, 184, 232, 0.15);
  --accent-glow: rgba(94, 184, 232, 0.35);
  --success: #6ee7b7;
  --warning: #fbbf24;
  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --radius: 14px;
  --radius-sm: 8px;
  --safe-bottom: env(safe-area-inset-bottom, 0);
}

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

html {
  -webkit-text-size-adjust: 100%;
  overscroll-behavior: none;
  scrollbar-gutter: stable;
  background: var(--bg-deep);
}

body {
  margin: 0;
  min-height: 100%;
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.55;
  color: var(--text);
  background:
    radial-gradient(circle at 50% -10%, rgba(94, 184, 232, 0.18), transparent 34rem),
    linear-gradient(180deg, #05070b 0%, var(--bg-deep) 44%, #05080b 100%);
  /* 不在 body 上使用 overflow-x:hidden，iOS Safari 滚动时会重新渲染导致表单清空 */
  overflow-x: clip;
  overflow-y: auto;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior: none;
}

body.modal-open {
  overflow: hidden;
}

.bg-grid {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image:
    linear-gradient(rgba(80, 120, 160, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(80, 120, 160, 0.04) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
  min-height: 100%;
  opacity: 0.92;
}

.bg-glow {
  position: absolute;
  top: -20%;
  left: 50%;
  margin-left: max(-45vw, -360px);
  width: min(90vw, 720px);
  height: 420px;
  z-index: 0;
  background: radial-gradient(ellipse, rgba(60, 140, 200, 0.12) 0%, transparent 65%);
  pointer-events: none;
}

.bg-grid::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent, rgba(7, 9, 13, 0.78));
}

.site-header,
.main,
.site-footer {
  position: relative;
  z-index: 1;
}

.site-header {
  padding: clamp(1.25rem, 4vw, 2.2rem) clamp(1rem, 3vw, 1.75rem) 0;
}

.brand {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  max-width: 1080px;
  margin: 0 auto;
}

.brand-mark {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(145deg, rgba(94, 184, 232, 0.25), rgba(40, 80, 120, 0.4));
  border: 1px solid var(--border-strong);
  box-shadow: 0 0 24px var(--accent-glow);
  position: relative;
}

.brand-mark::after {
  content: "";
  position: absolute;
  inset: 10px;
  border: 1px solid rgba(94, 184, 232, 0.4);
  border-radius: 6px;
  opacity: 0.8;
}

.brand-text h1 {
  margin: 0 0 0.35rem;
  font-size: clamp(1.35rem, 4vw, 1.8rem);
  font-weight: 700;
  letter-spacing: 0;
}

.tagline {
  margin: 0;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.hero-intro {
  max-width: 1080px;
  margin: 1.25rem auto 0;
  padding: 1rem 0 0;
}

.eyebrow {
  margin: 0 0 0.45rem;
  color: var(--accent-hot);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
}

.hero-intro h2 {
  margin: 0;
  color: #f5fbff;
  font-size: clamp(1.7rem, 5vw, 3.1rem);
  line-height: 1.12;
  letter-spacing: 0;
}

.hero-copy {
  margin: 0.8rem 0 0;
  color: rgba(232, 237, 244, 0.72);
  font-size: 0.98rem;
  line-height: 1.7;
}

.hero-signals {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 1rem;
}

.hero-signals span {
  padding: 0.45rem 0.7rem;
  color: #c9f8ff;
  background: rgba(94, 184, 232, 0.1);
  border: 1px solid rgba(94, 184, 232, 0.22);
  border-radius: 999px;
  font-size: 0.78rem;
}

.main {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  max-width: 1080px;
  margin: 0 auto;
  padding: clamp(1rem, 3vw, 1.75rem) 0;
  padding-bottom: calc(1.5rem + var(--safe-bottom));
}

@media (min-width: 840px) {
  .main {
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }

  .panel-result.is-empty {
    position: sticky;
    top: 1rem;
  }
}

.panel {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent 16rem),
    var(--bg-panel);
  border: 1px solid rgba(134, 215, 255, 0.14);
  border-radius: var(--radius);
  padding: 1.25rem 1.35rem;
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.38);
}

.panel::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(158, 252, 255, 0.12), transparent 28%, rgba(110, 231, 183, 0.08));
  opacity: 0.85;
}

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

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}

.panel-head h2 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
}

.chip {
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  background: rgba(94, 184, 232, 0.12);
  color: #baf6ff;
  border: 1px solid rgba(94, 184, 232, 0.25);
}

.chip-dim {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-muted);
  border-color: var(--border);
}

/* 表单分组 */
.form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.signal-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.55rem;
  margin: 0 0 1.1rem;
}

.signal-strip span {
  padding: 0.6rem 0.65rem;
  color: rgba(232, 237, 244, 0.68);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
  font-size: 0.72rem;
}

.signal-strip strong {
  display: block;
  color: var(--success);
  font-size: 1rem;
  line-height: 1.1;
}

.form-group {
  padding: 1rem 0 0.25rem;
  border-top: 1px solid var(--border);
}

.form-group:first-child {
  padding-top: 0;
  border-top: none;
}

.form-group-title {
  margin: 0 0 0.85rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.04em;
}

.field-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

@media (min-width: 520px) {
  .field-row {
    grid-template-columns: 1fr 1fr;
  }
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.field-span {
  grid-column: 1 / -1;
}

.label {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 500;
}

.req {
  color: #f87171;
  font-style: normal;
  font-size: 0.85em;
}

.field input,
.field select {
  width: 100%;
  padding: 0.65rem 0.85rem;
  font-family: inherit;
  font-size: 0.95rem;
  color: var(--text);
  background: rgba(0, 0, 0, 0.42);
  border: 1px solid rgba(120, 160, 200, 0.16);
  border-radius: var(--radius-sm);
  outline: none;
}

.field input::placeholder {
  color: rgba(139, 150, 168, 0.55);
}

.field input:focus,
.field select:focus {
  border-color: rgba(158, 252, 255, 0.55);
  box-shadow: 0 0 0 3px rgba(94, 184, 232, 0.15), 0 0 28px rgba(94, 184, 232, 0.12);
}

.field select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%238b96a8' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  padding-right: 2rem;
}

.field select:invalid,
.field select option[value=""] {
  color: var(--text-muted);
}

.actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 112px;
  gap: 0.75rem;
  align-items: stretch;
  margin-top: 0.4rem;
  padding-top: 0.2rem;
}

.btn {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0.7rem 1.35rem;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s, border-color 0.2s, box-shadow 0.2s, color 0.2s, transform 0.15s;
}

.btn:active {
  transform: scale(0.98);
}

.btn:disabled {
  cursor: not-allowed;
  opacity: 0.48;
  transform: none;
  box-shadow: none;
}

.btn-primary {
  color: #ffffff;
  background: linear-gradient(180deg, #2cc7e8 0%, #1287c5 48%, #0b5d97 100%);
  border-color: rgba(158, 252, 255, 0.36);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.22) inset,
    0 0 0 1px rgba(94, 184, 232, 0.18),
    0 10px 28px rgba(18, 135, 197, 0.28),
    0 6px 18px rgba(0, 0, 0, 0.42);
}

.btn-primary:hover {
  background: linear-gradient(180deg, #47d5f0 0%, #1997d5 48%, #0d6bad 100%);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.26) inset,
    0 0 0 1px rgba(158, 252, 255, 0.2),
    0 14px 34px rgba(18, 135, 197, 0.34),
    0 8px 24px rgba(0, 0, 0, 0.46);
}

.btn-primary:active {
  background: linear-gradient(180deg, #1599cc 0%, #0d6fa9 100%);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.1) inset,
    0 4px 14px rgba(0, 0, 0, 0.34);
}

.btn-ai-submit {
  min-height: 54px;
  width: 100%;
  letter-spacing: 0.02em;
}

.btn-ghost {
  min-height: 54px;
  color: rgba(232, 237, 244, 0.74);
  background: rgba(255, 255, 255, 0.045);
  border-color: rgba(120, 160, 200, 0.18);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.06) inset,
    0 6px 18px rgba(0, 0, 0, 0.22);
}

.btn-ghost:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(158, 252, 255, 0.24);
}

/* 结果面板 */
.panel-result {
  display: flex;
  flex-direction: column;
  min-height: 320px;
}

.panel-result::after {
  content: "";
  position: absolute;
  top: 4.7rem;
  right: 1.3rem;
  width: 88px;
  height: 88px;
  border: 1px solid rgba(158, 252, 255, 0.22);
  border-radius: 50%;
  background:
    linear-gradient(rgba(158, 252, 255, 0.18), rgba(158, 252, 255, 0.18)) center / 1px 100% no-repeat,
    linear-gradient(90deg, rgba(158, 252, 255, 0.18), rgba(158, 252, 255, 0.18)) center / 100% 1px no-repeat;
  opacity: 0.42;
  pointer-events: none;
}

.result-hero {
  flex: 1;
  padding: 0.5rem 0 1rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 1rem;
}

.panel-result.is-empty .result-hero {
  flex: 0 0 auto;
  padding-bottom: 0.25rem;
  border-bottom: none;
  margin-bottom: 0;
}

.result-label {
  margin: 0 0 0.5rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.result-range-wrap {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.result-range {
  font-family: var(--font-mono);
  font-size: clamp(1.75rem, 5vw, 2.25rem);
  font-weight: 600;
  color: #86efac;
  letter-spacing: 0.02em;
  text-shadow: 0 0 40px rgba(110, 231, 183, 0.25);
}

.result-range.is-precise {
  font-size: clamp(2.2rem, 6vw, 3rem);
  text-shadow: 0 0 50px rgba(110, 231, 183, 0.35);
}

.result-range .dash {
  color: var(--text-muted);
  font-weight: 400;
}

.result-hint {
  margin: 0.85rem 0 0;
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.result-empty-guide {
  display: none;
}

.panel-result.is-empty .result-empty-guide {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.55rem;
  margin-top: 1rem;
}

.result-empty-guide span {
  min-height: 64px;
  display: grid;
  place-items: center;
  padding: 0.65rem;
  color: rgba(232, 237, 244, 0.72);
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(125, 211, 252, 0.12);
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  text-align: center;
}

.panel-result.has-result .result-empty-guide {
  display: none;
}

.panel-result.is-empty .metrics,
.panel-result.is-empty .result-plan,
.panel-result.is-empty .result-apply,
.panel-result.is-empty .disclaimer {
  display: none;
}

/* 测算企业信息 */
.result-company {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  padding: 0.65rem 0.85rem;
  background: rgba(94, 184, 232, 0.06);
  border: 1px solid rgba(94, 184, 232, 0.12);
  border-radius: var(--radius-sm);
  margin-bottom: 1rem;
  font-size: 0.85rem;
  min-height: 45px;
}

.result-company.is-hidden,
.policy-hint.is-hidden {
  visibility: hidden;
}

.rc-label {
  color: var(--text-muted);
  font-weight: 500;
}

.rc-name {
  color: var(--text);
  font-weight: 600;
}

.rc-city {
  color: var(--accent);
  font-size: 0.8rem;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  background: var(--accent-dim);
  border: 1px solid rgba(94, 184, 232, 0.2);
}

.metrics {
  list-style: none;
  margin: 0 0 0.95rem;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.5rem;
}

.metrics li {
  min-height: 66px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.2rem;
  padding: 0.62rem 0.52rem;
  background:
    linear-gradient(180deg, rgba(94, 184, 232, 0.08), rgba(255, 255, 255, 0.025)),
    rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(125, 211, 252, 0.13);
  border-radius: var(--radius-sm);
}

.m-label {
  color: var(--text-muted);
  font-size: 0.68rem;
  line-height: 1.2;
  white-space: nowrap;
}

.m-value {
  font-family: var(--font-mono);
  color: var(--accent);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.15;
}

.result-plan {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.55rem;
  margin-top: 0.95rem;
}

.result-plan div {
  min-height: 112px;
  padding: 0.7rem;
  background:
    linear-gradient(160deg, rgba(94, 184, 232, 0.09), rgba(255, 255, 255, 0.035)),
    rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(125, 211, 252, 0.14);
  border-radius: var(--radius-sm);
}

.result-plan span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.55rem;
  height: 1.55rem;
  color: #06111a;
  background: #6ee7b7;
  border-radius: 50%;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 800;
}

.result-plan strong {
  display: block;
  margin-top: 0.55rem;
  color: #f3fbff;
  font-size: 0.82rem;
}

.result-plan p {
  margin: 0.3rem 0 0;
  color: rgba(232, 237, 244, 0.58);
  font-size: 0.72rem;
  line-height: 1.45;
}

/* 政策提示 */
.policy-hint {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  margin-top: 0.85rem;
  padding: 0.65rem 0.85rem;
  background: rgba(251, 191, 36, 0.06);
  border: 1px solid rgba(251, 191, 36, 0.15);
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  color: var(--warning);
  line-height: 1.5;
  min-height: 59px;
}

.policy-icon {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.35rem;
  height: 1.35rem;
  color: #081019;
  background: var(--warning);
  border-radius: 50%;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 800;
  line-height: 1;
}

/* 置信度徽章 */
.confidence-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.6rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  border-radius: 999px;
  white-space: nowrap;
}

.confidence-badge.is-hidden {
  display: none;
}

.confidence-badge.confidence-high {
  color: #064e3b;
  background: #6ee7b7;
  border: 1px solid rgba(110, 231, 183, 0.4);
}

.confidence-badge.confidence-mid {
  color: #78350f;
  background: #fbbf24;
  border: 1px solid rgba(251, 191, 36, 0.4);
}

.confidence-badge.confidence-low {
  color: #7f1d1d;
  background: #fca5a5;
  border: 1px solid rgba(252, 165, 165, 0.4);
}

/* 审批资料清单 */
.approval-materials {
  margin-top: 0.85rem;
  padding: 0.85rem;
  background: rgba(110, 231, 183, 0.06);
  border: 1px solid rgba(110, 231, 183, 0.18);
  border-radius: var(--radius-sm);
}

.approval-materials.is-hidden {
  display: none;
}

.materials-header {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin-bottom: 0.65rem;
}

.materials-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.35rem;
  height: 1.35rem;
  color: #081019;
  background: var(--success);
  border-radius: 50%;
  font-size: 0.68rem;
  font-weight: 800;
  line-height: 1;
}

.materials-header strong {
  font-size: 0.85rem;
  color: var(--success);
  letter-spacing: 0.02em;
}

.materials-list {
  margin: 0;
  padding: 0 0 0 1.15rem;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.35rem;
  list-style: none;
}

@media (min-width: 520px) {
  .materials-list {
    grid-template-columns: 1fr 1fr;
  }
}

.materials-list li {
  position: relative;
  font-size: 0.82rem;
  color: rgba(232, 237, 244, 0.82);
  line-height: 1.5;
  padding-left: 0.15rem;
}

.materials-list li::before {
  content: "•";
  position: absolute;
  left: -0.85rem;
  color: var(--success);
  font-weight: 700;
}

.ai-analysis {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  margin-top: 0.65rem;
  padding: 0.65rem 0.85rem;
  background: rgba(94, 184, 232, 0.06);
  border: 1px solid rgba(94, 184, 232, 0.18);
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  color: var(--info, #7dd3fc);
  line-height: 1.5;
}

.ai-analysis .policy-icon {
  background: var(--info, #7dd3fc);
  font-size: 0.7rem;
}

.ai-analysis.is-hidden {
  display: none;
}

.result-apply {
  margin-top: 1rem;
  padding: 1rem;
  background:
    linear-gradient(135deg, rgba(251, 191, 36, 0.13), rgba(110, 231, 183, 0.07)),
    rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(251, 191, 36, 0.28);
  border-radius: var(--radius-sm);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.24);
}

.btn-apply {
  width: 100%;
  min-height: 56px;
  color: #111827;
  background: linear-gradient(180deg, #ffe08a 0%, #f6b73c 46%, #d98612 100%);
  border-color: rgba(255, 224, 138, 0.7);
  font-size: 0.98rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.48) inset,
    0 0 0 1px rgba(251, 191, 36, 0.24),
    0 14px 32px rgba(217, 134, 18, 0.36),
    0 7px 18px rgba(0, 0, 0, 0.38);
}

.btn-apply:hover {
  background: linear-gradient(180deg, #ffecaa 0%, #ffc856 46%, #ed9a1b 100%);
  border-color: rgba(255, 236, 170, 0.84);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.58) inset,
    0 0 0 1px rgba(251, 191, 36, 0.28),
    0 18px 40px rgba(217, 134, 18, 0.42),
    0 9px 24px rgba(0, 0, 0, 0.42);
}

.btn-apply:active {
  background: linear-gradient(180deg, #efaa31 0%, #c9790e 100%);
  box-shadow:
    0 0 0 1px rgba(92, 50, 5, 0.14) inset,
    0 5px 15px rgba(0, 0, 0, 0.34);
}

.result-apply p {
  margin: 0.55rem 0 0;
  color: rgba(232, 237, 244, 0.72);
  font-size: 0.78rem;
  line-height: 1.5;
}

.disclaimer {
  margin: 1rem 0 0;
  font-size: 0.75rem;
  color: rgba(139, 150, 168, 0.85);
  line-height: 1.5;
}

.site-footer {
  text-align: center;
  padding: 1rem clamp(1rem, 3vw, 1.75rem) calc(1.25rem + var(--safe-bottom));
  font-size: 0.75rem;
  color: var(--text-muted);
}

.site-footer .sep {
  margin: 0 0.35rem;
  opacity: 0.5;
}

/* 贷款申请海报 */
.poster-modal {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.poster-modal.is-open {
  display: flex;
}

.poster-backdrop {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 30%, rgba(94, 184, 232, 0.2), transparent 32rem),
    rgba(3, 7, 12, 0.82);
}

.poster-dialog {
  position: relative;
  z-index: 1;
  width: min(100%, 430px);
  max-height: min(92vh, 820px);
  overflow-y: auto;
  border-radius: 18px;
  transform-origin: 50% 48%;
}

.poster-modal.is-open .poster-dialog {
  animation: posterArrive 0.62s cubic-bezier(0.2, 0.9, 0.2, 1) both;
}

.poster-close {
  position: absolute;
  top: 0.7rem;
  right: 0.7rem;
  z-index: 2;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 50%;
  color: #f8fbff;
  background: rgba(8, 13, 20, 0.72);
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
}

.loan-poster {
  position: relative;
  overflow: hidden;
  padding: 1.25rem;
  color: #eef6ff;
  background:
    radial-gradient(circle at 18% 0%, rgba(94, 184, 232, 0.24), transparent 34%),
    radial-gradient(circle at 100% 36%, rgba(110, 231, 183, 0.16), transparent 30%),
    linear-gradient(160deg, #071019 0%, #101722 48%, #071016 100%);
  border: 1px solid rgba(180, 220, 255, 0.2);
  border-radius: 18px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.45);
}

.poster-modal.is-open .loan-poster {
  animation: posterPulse 1.2s ease-out 0.25s both;
}

.loan-poster::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 34px 34px;
}

.loan-poster::after {
  content: "";
  position: absolute;
  left: -10%;
  right: -10%;
  top: -18%;
  height: 18%;
  z-index: 0;
  pointer-events: none;
  background: linear-gradient(180deg, transparent, rgba(158, 252, 255, 0.26), transparent);
  animation: posterScan 2.4s ease-in-out infinite;
}

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

.poster-topline {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  color: rgba(238, 246, 255, 0.72);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
}

.poster-topline strong {
  color: #7dd3fc;
  font-weight: 600;
}

.poster-hero {
  margin: 1.15rem 0 1rem;
}

.poster-kicker {
  margin: 0 0 0.45rem;
  color: #6ee7b7;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
}

.poster-hero h2 {
  margin: 0;
  font-size: 1.55rem;
  line-height: 1.18;
  letter-spacing: 0;
}

.poster-hero p {
  margin: 0.65rem 0 0;
  color: rgba(238, 246, 255, 0.72);
  font-size: 0.86rem;
  line-height: 1.55;
}

.poster-amount {
  padding: 1rem;
  background: rgba(255, 255, 255, 0.075);
  border: 1px solid rgba(125, 211, 252, 0.22);
  border-radius: 12px;
}

.poster-amount span,
.poster-profile span,
.poster-score span,
.manager-copy span {
  display: block;
  color: rgba(238, 246, 255, 0.58);
  font-size: 0.72rem;
}

.poster-amount strong {
  display: block;
  margin-top: 0.2rem;
  color: #86efac;
  font-family: var(--font-mono);
  font-size: clamp(2rem, 10vw, 3.25rem);
  line-height: 1;
  letter-spacing: 0;
}

.poster-amount small {
  display: block;
  margin-top: 0.6rem;
  color: rgba(238, 246, 255, 0.55);
  font-size: 0.7rem;
}

.poster-profile,
.poster-score {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.65rem;
  margin-top: 0.85rem;
}

.poster-profile>div,
.poster-score>div {
  padding: 0.7rem 0.8rem;
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 10px;
}

.poster-profile strong,
.poster-score strong {
  display: block;
  margin-top: 0.22rem;
  color: #f8fbff;
  font-size: 0.92rem;
  font-weight: 650;
}

.poster-score {
  grid-template-columns: repeat(3, 1fr);
}

.poster-score strong {
  color: #7dd3fc;
  font-family: var(--font-mono);
}

.poster-manager {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 120px;
  gap: 0.85rem;
  align-items: center;
  margin-top: 0.95rem;
  padding: 0.85rem;
  background: rgba(110, 231, 183, 0.08);
  border: 1px solid rgba(110, 231, 183, 0.18);
  border-radius: 12px;
}

.manager-copy strong {
  display: block;
  margin-top: 0.22rem;
  color: #f8fbff;
  font-size: 1rem;
}

.manager-copy p {
  margin: 0.5rem 0 0;
  color: rgba(238, 246, 255, 0.72);
  font-size: 0.78rem;
  line-height: 1.55;
}

.qr-card {
  display: grid;
  place-items: center;
  width: 120px;
  aspect-ratio: 1;
  padding: 0.45rem;
  background: #f8fbff;
  border-radius: 12px;
}

.qr-card img {
  display: none;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.qr-fallback {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  width: 100%;
  height: 100%;
  padding: 8px;
  color: #0c1420;
  background: #ffffff;
  border: 1px solid #d7e3ef;
  border-radius: 8px;
}

.qr-fallback span {
  background: #0c1420;
  border-radius: 2px;
}

.qr-fallback span:nth-child(2),
.qr-fallback span:nth-child(5),
.qr-fallback span:nth-child(8),
.qr-fallback span:nth-child(10) {
  opacity: 0.18;
}

.qr-fallback em {
  grid-column: 1 / -1;
  align-self: end;
  color: #0c1420;
  font-size: 0.62rem;
  font-style: normal;
  font-weight: 700;
  text-align: center;
}

.poster-steps {
  margin: 0.9rem 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.45rem;
}

.poster-steps li {
  position: relative;
  padding-left: 1.45rem;
  color: rgba(238, 246, 255, 0.78);
  font-size: 0.78rem;
  line-height: 1.45;
}

.poster-steps li::before {
  content: counter(step);
  counter-increment: step;
  position: absolute;
  left: 0;
  top: 0.05rem;
  display: grid;
  place-items: center;
  width: 1rem;
  height: 1rem;
  color: #081019;
  background: #6ee7b7;
  border-radius: 50%;
  font-size: 0.65rem;
  font-weight: 800;
}

.poster-steps {
  counter-reset: step;
}

.poster-save-bar {
  margin-top: 0.65rem;
  padding: 0.85rem;
  background: rgba(7, 13, 20, 0.95);
  border: 1px solid rgba(180, 220, 255, 0.14);
  border-radius: 14px;
}

.poster-generate {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: none;
  place-items: center;
  align-content: center;
  gap: 0.65rem;
  min-height: 360px;
  padding: 2rem;
  color: #f6feff;
  text-align: center;
  background: rgba(4, 10, 16, 0.88);
  border-radius: 18px;
  pointer-events: none;
  overflow: hidden;
}

.poster-modal.is-generating .poster-generate {
  display: grid;
  animation: generateFade 1.2s ease-out both;
}

.poster-generate::before,
.poster-generate::after {
  content: "";
  position: absolute;
  inset: 1rem;
  pointer-events: none;
}

.poster-generate::before {
  border: 1px solid rgba(158, 252, 255, 0.22);
  border-radius: 16px;
  background:
    linear-gradient(rgba(158, 252, 255, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(158, 252, 255, 0.08) 1px, transparent 1px);
  background-size: 28px 28px;
  -webkit-mask-image: radial-gradient(circle, #000 0 38%, transparent 72%);
  mask-image: radial-gradient(circle, #000 0 38%, transparent 72%);
}

.poster-generate::after {
  inset: auto 0 22%;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(158, 252, 255, 0.92), transparent);
  box-shadow: 0 0 32px rgba(158, 252, 255, 0.62);
  animation: generateScan 1.2s ease-in-out both;
}

.generate-core {
  width: 84px;
  height: 84px;
  border: 1px solid rgba(158, 252, 255, 0.42);
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(158, 252, 255, 0.42), transparent 30%),
    conic-gradient(from 0deg, transparent, rgba(158, 252, 255, 0.78), transparent 38%);
  animation: coreSpin 0.95s linear infinite;
  box-shadow: 0 0 44px rgba(94, 184, 232, 0.42);
}

.poster-generate strong {
  font-size: 1rem;
}

.poster-generate span {
  color: rgba(232, 237, 244, 0.68);
  font-size: 0.78rem;
}

@keyframes posterArrive {
  0% {
    opacity: 0;
    transform: translateY(18px) scale(0.96);
    filter: blur(8px);
  }

  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

@keyframes posterPulse {
  0% {
    box-shadow: 0 0 0 rgba(94, 184, 232, 0);
  }

  40% {
    box-shadow: 0 0 0 1px rgba(158, 252, 255, 0.38), 0 0 72px rgba(94, 184, 232, 0.42);
  }

  100% {
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.45);
  }
}

@keyframes posterScan {
  0% {
    top: -18%;
    opacity: 0;
  }

  14% {
    opacity: 1;
  }

  68%,
  100% {
    top: 100%;
    opacity: 0;
  }
}

@keyframes generateFade {
  0% {
    opacity: 1;
  }

  72% {
    opacity: 1;
  }

  100% {
    opacity: 0;
  }
}

@keyframes generateScan {
  0% {
    transform: translateY(-160px);
    opacity: 0;
  }

  22% {
    opacity: 1;
  }

  100% {
    transform: translateY(210px);
    opacity: 0;
  }
}

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

.poster-save-btn {
  width: 100%;
}

.poster-save-bar p {
  margin: 0.55rem 0 0;
  color: rgba(238, 246, 255, 0.64);
  font-size: 0.76rem;
  line-height: 1.45;
}

/* H5 移动端优化 */
@media (max-width: 520px) {
  body {
    font-size: 14px;
  }

  .panel {
    padding: 1rem 1rem;
    border-radius: 12px;
    background: rgba(12, 16, 24, 0.95);
  }

  .hero-intro h2 {
    font-size: 1.85rem;
  }

  .signal-strip {
    grid-template-columns: 1fr;
  }

  .result-plan {
    grid-template-columns: 1fr;
  }

  .metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .metrics li:last-child {
    grid-column: 1 / -1;
  }

  .panel-result.is-empty .result-empty-guide {
    grid-template-columns: 1fr;
  }

  .form-group {
    padding: 0.85rem 0 0.15rem;
  }

  .field input,
  .field select {
    padding: 0.6rem 0.75rem;
    font-size: 16px;
    /* 防止 iOS 自动缩放 */
  }

  .btn {
    width: 100%;
    text-align: center;
  }

  .actions {
    grid-template-columns: 1fr;
  }

  .result-company {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.35rem;
  }

  .poster-modal {
    align-items: flex-start;
    padding: 0.75rem;
  }

  .poster-dialog {
    max-height: calc(100vh - 1.5rem);
  }

  .loan-poster {
    padding: 1rem;
    border-radius: 16px;
  }

  .poster-score {
    grid-template-columns: 1fr 1fr;
  }

  .poster-manager {
    grid-template-columns: 1fr;
  }

  .qr-card {
    width: min(100%, 180px);
    justify-self: center;
  }
}

/* 减少动画偏好 */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .btn:active {
    transform: none;
  }

  .loan-poster::after,
  .poster-generate::after,
  .poster-modal.is-open .poster-dialog,
  .poster-modal.is-open .loan-poster,
  .poster-modal.is-generating .poster-generate,
  .generate-core {
    animation: none;
  }
}
