:root {
  --ink: #172026;
  --muted: #63717b;
  --paper: #fbfaf7;
  --panel: #ffffff;
  --line: #d9dedc;
  --green: #16784f;
  --green-dark: #0e5638;
  --coral: #cc4e3d;
  --shadow: 0 24px 80px rgba(23, 32, 38, 0.18);
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  font-family: "Microsoft YaHei", "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    linear-gradient(135deg, rgba(22, 120, 79, 0.10), transparent 34%),
    linear-gradient(315deg, rgba(204, 78, 61, 0.12), transparent 38%),
    var(--paper);
}

button {
  font: inherit;
}

.shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 28px;
}

.panel {
  width: min(460px, 100%);
  padding: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow);
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: var(--green);
  color: #fff;
  font-weight: 800;
  margin-bottom: 18px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--coral);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: 34px;
  line-height: 1.15;
  letter-spacing: 0;
}

.subtitle {
  margin: 12px 0 24px;
  color: var(--muted);
  line-height: 1.7;
}

.actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.primary-action,
.secondary-action,
.text-button {
  border: 0;
  cursor: pointer;
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease;
}

.primary-action,
.secondary-action {
  min-height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 12px 14px;
  border-radius: 7px;
  font-weight: 700;
}

.primary-action {
  background: var(--green);
  color: white;
}

.secondary-action {
  background: white;
  color: var(--green-dark);
  border: 1px solid var(--line);
}

.primary-action:hover,
.secondary-action:hover,
.text-button:hover {
  transform: translateY(-1px);
}

.icon {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
}

.secondary-action .icon {
  background: rgba(22, 120, 79, 0.10);
}

.status {
  min-height: 44px;
  margin: 18px 0 0;
  padding: 12px 14px;
  border: 1px solid #e6e1d8;
  border-radius: 7px;
  background: #fffaf0;
  color: #6b5836;
  line-height: 1.5;
}

.result {
  margin-top: 16px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
}

.hidden {
  display: none !important;
}

.result-label {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 13px;
}

#wechat-id {
  display: block;
  overflow-wrap: anywhere;
  font-size: 24px;
  line-height: 1.35;
}

.text-button {
  margin-top: 12px;
  padding: 9px 12px;
  border-radius: 6px;
  background: #eff7f2;
  color: var(--green-dark);
  font-weight: 700;
}

.qr-frame {
  position: relative;
  width: min(260px, 100%);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  margin: 4px auto 0;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #f6f7f9;
  overflow: hidden;
}

.qr-frame img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: white;
}

.qr-placeholder {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  color: var(--muted);
  text-align: center;
  line-height: 1.6;
  background: #f6f7f9;
}

.hint {
  margin: 12px 0 0;
  text-align: center;
  color: var(--green-dark);
  font-weight: 700;
}

@media (max-width: 520px) {
  .shell {
    padding: 16px;
  }

  .panel {
    padding: 24px;
  }

  h1 {
    font-size: 29px;
  }

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