.wechat-share-entry {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 32px;
  align-items: center;
  margin: 56px 0 32px;
  padding: clamp(24px, 5vw, 42px);
  border: 1px solid rgba(242, 235, 218, 0.2);
  border-radius: 28px;
  background:
    radial-gradient(circle at 82% 12%, rgba(176, 224, 190, 0.18), transparent 34%),
    linear-gradient(135deg, rgba(13, 22, 17, 0.92), rgba(28, 42, 33, 0.86));
  box-shadow:
    0 28px 72px rgba(7, 12, 9, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.wechat-share-entry__kicker,
.wechat-share-dialog__kicker {
  margin: 0 0 10px;
  color: #a9d9b6;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.18em;
}

.wechat-share-entry h2 {
  margin: 0;
  color: #f5f1e7;
  font-size: clamp(1.45rem, 4vw, 2.3rem);
  letter-spacing: -0.045em;
  line-height: 1.12;
}

.wechat-share-entry p:not(.wechat-share-entry__kicker) {
  max-width: 46ch;
  margin: 13px 0 0;
  color: rgba(245, 241, 231, 0.68);
  font-size: 0.93rem;
  line-height: 1.72;
}

.wechat-share-button,
.wechat-share-copy {
  min-height: 46px;
  border: 1px solid rgba(180, 226, 193, 0.5);
  border-radius: 999px;
  padding: 0 20px;
  background: #b4e2c1;
  color: #102017;
  font: inherit;
  font-size: 0.86rem;
  font-weight: 800;
  cursor: pointer;
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    background 180ms ease;
}

.wechat-share-button {
  display: inline-flex;
  gap: 10px;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  box-shadow: 0 14px 34px rgba(135, 204, 154, 0.2);
}

.wechat-share-button:hover,
.wechat-share-button:focus-visible,
.wechat-share-copy:hover,
.wechat-share-copy:focus-visible {
  outline: none;
  background: #c5ecd0;
  box-shadow: 0 16px 38px rgba(135, 204, 154, 0.28);
  transform: translateY(-2px);
}

.wechat-share-modal[hidden] {
  display: none;
}

.wechat-share-modal {
  position: fixed;
  z-index: 2000;
  inset: 0;
  display: grid;
  place-items: center;
  padding:
    max(22px, env(safe-area-inset-top))
    max(18px, env(safe-area-inset-right))
    max(22px, env(safe-area-inset-bottom))
    max(18px, env(safe-area-inset-left));
}

.wechat-share-modal__backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(5, 10, 7, 0.78);
  backdrop-filter: blur(18px) saturate(0.9);
  cursor: pointer;
}

.wechat-share-dialog {
  position: relative;
  width: min(100%, 430px);
  max-height: calc(100vh - 44px);
  overflow: auto;
  border: 1px solid rgba(197, 236, 208, 0.24);
  border-radius: 30px;
  padding: 32px;
  background:
    radial-gradient(circle at 84% 4%, rgba(174, 224, 189, 0.19), transparent 30%),
    #111b15;
  color: #f5f1e7;
  box-shadow:
    0 42px 100px rgba(0, 0, 0, 0.48),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  text-align: center;
}

.wechat-share-dialog:focus {
  outline: none;
}

.wechat-share-dialog__close {
  position: absolute;
  top: 14px;
  right: 14px;
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid rgba(245, 241, 231, 0.14);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.04);
  color: #f5f1e7;
  font: inherit;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}

.wechat-share-dialog__close:hover,
.wechat-share-dialog__close:focus-visible {
  border-color: rgba(245, 241, 231, 0.42);
  outline: none;
  background: rgba(255, 255, 255, 0.08);
}

.wechat-share-dialog h2 {
  margin: 0;
  font-size: clamp(1.9rem, 7vw, 2.55rem);
  letter-spacing: -0.05em;
}

.wechat-share-dialog__lead {
  max-width: 31ch;
  margin: 12px auto 22px;
  color: rgba(245, 241, 231, 0.68);
  font-size: 0.88rem;
  line-height: 1.65;
}

.wechat-share-qr {
  width: min(100%, 286px);
  margin: 0 auto 20px;
  padding: 16px;
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 20px 52px rgba(0, 0, 0, 0.38);
}

.wechat-share-qr img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 10px;
}

.wechat-share-state {
  display: flex;
  min-height: 26px;
  gap: 9px;
  align-items: center;
  justify-content: center;
  margin: 0 0 16px;
  color: rgba(245, 241, 231, 0.66);
  font-size: 0.76rem;
}

.wechat-share-state > span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #8d928d;
  box-shadow: 0 0 0 5px rgba(141, 146, 141, 0.1);
}

.wechat-share-state[data-state="checking"] > span {
  background: #e6bd68;
  box-shadow: 0 0 0 5px rgba(230, 189, 104, 0.12);
}

.wechat-share-state[data-state="ready"] {
  color: #c9ead2;
}

.wechat-share-state[data-state="ready"] > span {
  background: #72ce8d;
  box-shadow: 0 0 0 5px rgba(114, 206, 141, 0.13);
}

.wechat-share-state[data-state="error"] {
  color: #f1b9a8;
}

.wechat-share-state[data-state="error"] > span {
  background: #df7f68;
  box-shadow: 0 0 0 5px rgba(223, 127, 104, 0.12);
}

.wechat-share-copy {
  width: 100%;
  background: rgba(180, 226, 193, 0.08);
  color: #d9ebde;
  box-shadow: none;
}

.wechat-share-copy-field {
  position: fixed;
  width: 1px;
  height: 1px;
  inset: 0 auto auto 0;
  opacity: 0;
  pointer-events: none;
}

body.is-wechat-share-open {
  overflow: hidden;
}

@media (max-width: 620px) {
  .wechat-share-entry {
    grid-template-columns: 1fr;
    gap: 22px;
    margin-top: 40px;
    border-radius: 24px;
  }

  .wechat-share-button {
    width: 100%;
  }

  .wechat-share-dialog {
    padding: 30px 22px 24px;
    border-radius: 26px;
  }

  .wechat-share-qr {
    width: min(100%, 250px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .wechat-share-button,
  .wechat-share-copy {
    transition: none;
  }
}
