:root {
  --bg-top: #f2f9ff;
  --bg-bottom: #dceeff;
  --surface: rgba(255, 255, 255, 0.82);
  --surface-strong: rgba(255, 255, 255, 0.94);
  --line: rgba(91, 157, 214, 0.18);
  --line-strong: rgba(91, 157, 214, 0.34);
  --text: #123454;
  --muted: #5d7d9b;
  --accent: #54a9eb;
  --accent-deep: #257dc9;
  --shadow: 0 24px 50px rgba(74, 131, 180, 0.16);
  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius-md: 16px;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  color: var(--text);
  font-family: "SF Pro Display", "PingFang SC", "Helvetica Neue", "Noto Sans SC", sans-serif;
  background:
    radial-gradient(1200px 540px at 12% 0%, rgba(132, 197, 243, 0.34), transparent 60%),
    radial-gradient(900px 420px at 100% 18%, rgba(109, 195, 236, 0.24), transparent 62%),
    linear-gradient(180deg, var(--bg-top), var(--bg-bottom));
}

body::before {
  content: "";
  position: fixed;
  inset: auto -14% 8% auto;
  width: 280px;
  height: 280px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(135, 212, 255, 0.38), transparent 68%);
  filter: blur(10px);
  pointer-events: none;
}

.public-page {
  width: min(100%, 720px);
  margin: 0 auto;
  padding:
    calc(24px + env(safe-area-inset-top))
    18px
    calc(28px + env(safe-area-inset-bottom));
}

.hero-card {
  position: relative;
  overflow: hidden;
  padding: 26px 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(240, 249, 255, 0.78)),
    var(--surface);
  box-shadow: var(--shadow);
}

.hero-card::after {
  content: "";
  position: absolute;
  right: -70px;
  top: -60px;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(84, 169, 235, 0.18), transparent 70%);
}

.hero-copy {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 8px;
  padding-right: 88px;
}

.hero-kicker {
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-deep);
}

h1 {
  margin: 0;
  font-size: clamp(30px, 8vw, 42px);
  line-height: 1.04;
  letter-spacing: -0.04em;
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.hero-note {
  margin: 0;
  max-width: 22em;
  font-size: 15px;
  line-height: 1.6;
  color: var(--muted);
}

.hero-tool-btn {
  position: absolute;
  top: 18px;
  right: 18px;
  z-index: 2;
  min-height: 36px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  background: rgba(84, 169, 235, 0.12);
  color: var(--accent-deep);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  backdrop-filter: blur(8px);
}

.hero-tool-btn:hover,
.hero-tool-btn:focus-visible {
  background: rgba(84, 169, 235, 0.18);
}

.nav-section {
  margin-top: 18px;
}

.nav-list {
  display: grid;
  gap: 12px;
}

.nav-card {
  appearance: none;
  -webkit-appearance: none;
  position: relative;
  display: grid;
  gap: 10px;
  width: 100%;
  padding: 18px 18px 18px 20px;
  border: 1px solid rgba(84, 169, 235, 0.15);
  border-radius: var(--radius-lg);
  background: var(--surface-strong);
  font: inherit;
  text-align: left;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  box-shadow: 0 14px 28px rgba(96, 154, 199, 0.1);
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
  animation: cardIn 360ms ease both;
}

.nav-card::before {
  content: "";
  position: absolute;
  inset: 10px auto 10px 10px;
  width: 4px;
  border-radius: 999px;
  background: linear-gradient(180deg, #53b8f1, #7bd5ff);
}

.nav-card:hover,
.nav-card:focus-visible {
  transform: translateY(-2px);
  border-color: var(--line-strong);
  box-shadow: 0 18px 34px rgba(96, 154, 199, 0.16);
}

.nav-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.nav-card-title-wrap {
  min-width: 0;
  display: grid;
  gap: 8px;
}

.type-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  min-height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.type-badge[data-type="wechat"] {
  color: #1d6fb3;
  background: rgba(84, 169, 235, 0.18);
}

.type-badge[data-type="form"] {
  color: #8f6b1e;
  background: rgba(236, 221, 184, 0.9);
}

.nav-card-title {
  font-size: 20px;
  font-weight: 700;
  line-height: 1.24;
}

.nav-card-arrow {
  flex: none;
  min-width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: var(--accent-deep);
  background: rgba(84, 169, 235, 0.12);
  font-size: 18px;
}

.nav-card-subtitle {
  font-size: 14px;
  line-height: 1.65;
  color: var(--muted);
}

.empty-state {
  display: grid;
  gap: 8px;
  padding: 24px 18px;
  border: 1px dashed rgba(84, 169, 235, 0.28);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.58);
  text-align: center;
  color: var(--muted);
}

.empty-state strong {
  font-size: 18px;
  color: var(--text);
}

.site-footer {
  display: flex;
  justify-content: center;
  margin-top: 22px;
  padding: 8px 0 4px;
}

.site-footer-link {
  color: rgba(18, 52, 84, 0.6);
  font-size: 12px;
  line-height: 1.6;
  text-decoration: none;
}

.site-footer-link:hover,
.site-footer-link:focus-visible {
  color: rgba(18, 52, 84, 0.82);
  text-decoration: underline;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(11, 35, 57, 0.28);
  backdrop-filter: blur(10px);
}

.modal-card {
  width: min(100%, 420px);
  padding: 22px;
  border: 1px solid rgba(84, 169, 235, 0.22);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 28px 56px rgba(29, 86, 129, 0.2);
}

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

.modal-kicker {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-deep);
}

.modal-head h2 {
  margin: 6px 0 0;
  font-size: 24px;
  line-height: 1.1;
}

.modal-close {
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 999px;
  background: rgba(84, 169, 235, 0.08);
  color: var(--text);
  font-size: 26px;
  cursor: pointer;
}

.modal-form {
  margin-top: 18px;
  display: grid;
  gap: 14px;
}

.qr-modal-card {
  position: relative;
  width: min(100%, 380px);
  padding: 18px;
  border: 1px solid rgba(84, 169, 235, 0.22);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 28px 56px rgba(29, 86, 129, 0.2);
}

.qr-modal-close {
  position: absolute;
  right: 12px;
  top: 12px;
  z-index: 1;
}

.qr-modal-stage {
  width: 100%;
  min-height: min(78vw, 340px);
  display: grid;
  place-items: center;
  padding: 18px;
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(246, 252, 255, 0.96), rgba(237, 247, 255, 0.9));
}

.qr-modal-image {
  width: min(78vw, 300px);
  max-width: 100%;
  height: auto;
  display: block;
  image-rendering: -webkit-optimize-contrast;
}

.qr-modal-status {
  font-size: 15px;
  line-height: 1.6;
  text-align: center;
  color: var(--muted);
}

.qr-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 48px;
  margin-top: 14px;
  border-radius: 16px;
  background: linear-gradient(135deg, #3d9ce2, #65bdf2);
  color: #ffffff;
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 12px 22px rgba(61, 156, 226, 0.22);
}

.tool-modal-card {
  width: min(100%, 460px);
  padding: 22px;
  border: 1px solid rgba(84, 169, 235, 0.22);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 28px 56px rgba(29, 86, 129, 0.2);
}

.tool-option-list {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.tool-option-card {
  display: grid;
  gap: 6px;
  padding: 18px;
  border: 1px solid rgba(84, 169, 235, 0.16);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(246, 252, 255, 0.98), rgba(237, 247, 255, 0.92));
  color: inherit;
  text-decoration: none;
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.tool-option-card:hover,
.tool-option-card:focus-visible {
  transform: translateY(-2px);
  border-color: var(--line-strong);
  box-shadow: 0 14px 28px rgba(74, 131, 180, 0.14);
}

.tool-option-title {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.2;
}

.tool-option-note {
  font-size: 14px;
  line-height: 1.65;
  color: var(--muted);
}

.field {
  display: grid;
  gap: 8px;
}

.field span {
  font-size: 14px;
  color: var(--muted);
}

.field input {
  width: 100%;
  min-height: 52px;
  padding: 0 16px;
  border: 1px solid rgba(84, 169, 235, 0.2);
  border-radius: 16px;
  background: rgba(246, 251, 255, 0.96);
  font-size: 16px;
  color: var(--text);
  outline: none;
}

.field input:focus {
  border-color: rgba(37, 125, 201, 0.42);
  box-shadow: 0 0 0 4px rgba(84, 169, 235, 0.12);
}

.modal-error {
  min-height: 20px;
  color: #bf4a50;
  font-size: 13px;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.ghost-btn,
.primary-btn {
  min-height: 46px;
  padding: 0 18px;
  border-radius: 14px;
  border: 0;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.ghost-btn {
  color: var(--text);
  background: rgba(84, 169, 235, 0.08);
}

.primary-btn {
  color: #fff;
  background: linear-gradient(135deg, #3d9ce2, #65bdf2);
  box-shadow: 0 12px 22px rgba(61, 156, 226, 0.24);
}

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(20px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  max-width: calc(100vw - 36px);
  padding: 12px 16px;
  border-radius: 999px;
  background: rgba(18, 53, 84, 0.9);
  color: #fff;
  font-size: 13px;
  box-shadow: 0 16px 32px rgba(18, 53, 84, 0.24);
}

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

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (min-width: 768px) {
  .public-page {
    padding-top: 44px;
  }

  .hero-card {
    padding: 32px 30px;
  }

  .hero-tool-btn {
    top: 22px;
    right: 24px;
  }

  .nav-card {
    padding: 22px 22px 22px 24px;
  }
}
