.top-actions {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.top-button {
  min-height: 36px;
  white-space: nowrap;
  border: 1px solid rgba(11, 107, 63, 0.22);
  border-radius: 8px;
  background: #fff;
  color: var(--green-dark);
  padding: 0 14px;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(21, 37, 28, 0.06);
}

.top-button:hover {
  border-color: var(--green);
  color: var(--green);
}

.install-message,
.share-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: min(280px, 76vw);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--muted);
  padding: 10px 12px;
  font-size: 13px;
  line-height: 1.45;
  box-shadow: var(--shadow);
}

.share-panel {
  display: grid;
  gap: 8px;
  width: min(260px, 76vw);
}

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

.share-panel a,
.share-panel button {
  display: flex;
  min-height: 36px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8faf7;
  color: var(--green-dark);
  font-size: 14px;
  font-weight: 800;
}

.share-panel small {
  color: var(--muted);
  line-height: 1.45;
}

@media (max-width: 980px) {
  .top-actions {
    position: absolute;
    top: 14px;
    right: clamp(18px, 4.5vw, 60px);
  }

  .nav nav {
    padding-right: 150px;
  }
}

@media (max-width: 640px) {
  html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
  }

  .nav {
    flex-direction: row;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
  }

  .brand {
    flex: 0 0 auto;
    min-width: 0;
    gap: 8px;
    padding-right: 0;
  }

  .brand small {
    display: none;
  }

  .brand strong {
    font-size: 15px;
    line-height: 1.1;
    white-space: nowrap;
  }

  .brand-mark {
    width: 44px;
    height: 44px;
    border-radius: 9px;
    font-size: 13px;
  }

  .top-actions {
    position: relative;
    top: auto;
    right: auto;
    flex: 1 1 auto;
    justify-content: flex-end;
    gap: 8px;
  }

  .top-button {
    min-height: 38px;
    padding: 0 12px;
    border-radius: 9px;
    font-size: 14px;
  }

  .install-message,
  .share-panel {
    right: 0;
    width: min(260px, calc(100vw - 24px));
  }

  .hero-panel {
    display: none;
  }

  @media (max-width: 380px) {
    .brand strong {
      max-width: 112px;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    .top-button {
      padding: 0 10px;
      font-size: 13px;
    }
  }
}

@media (max-width: 640px) {
  .wechat-webview .nav {
    gap: 6px;
    padding: 8px 10px;
  }

  .wechat-webview .brand {
    gap: 7px;
  }

  .wechat-webview .brand-mark {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    font-size: 12px;
  }

  .wechat-webview .brand strong {
    max-width: none;
    overflow: visible;
    font-size: 12px;
    line-height: 1.08;
    text-overflow: clip;
  }

  .wechat-webview .top-actions {
    gap: 5px;
  }

  .wechat-webview .top-button {
    min-height: 34px;
    padding: 0 7px;
    border-radius: 8px;
    font-size: 11px;
  }

  .wechat-webview .install-message {
    position: fixed !important;
    top: auto !important;
    right: 14px !important;
    bottom: 18px !important;
    left: 14px !important;
    z-index: 50;
    width: auto !important;
    padding: 9px 10px;
    font-size: 12px;
    white-space: normal;
  }

  .wechat-webview .hero {
    padding: 18px 14px 20px;
  }

  .wechat-webview .hero-copy {
    max-width: none;
  }

  .wechat-webview .eyebrow {
    margin-bottom: 7px;
    font-size: 14px;
    line-height: 1.25;
    letter-spacing: 0;
  }

  .wechat-webview h1 {
    margin-bottom: 9px;
    font-size: 17px;
    line-height: 1.25;
  }

  .wechat-webview h2 {
    font-size: 18px;
    line-height: 1.25;
  }

  .wechat-webview .lead,
  .wechat-webview .copy-stack,
  .wechat-webview .join-copy p {
    font-size: 13px;
    line-height: 1.55;
  }

  .wechat-webview .hero-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 9px;
    margin-top: 12px;
  }

  .wechat-webview .button {
    min-height: 38px;
    padding: 0 10px;
    border-radius: 8px;
    font-size: 13px;
    white-space: nowrap;
  }

  .wechat-webview .section {
    padding: 22px 14px;
  }

  .wechat-webview .compact-section {
    padding-top: 0;
  }

  .wechat-webview .section-head {
    margin-bottom: 12px;
  }

  .wechat-webview .pain-grid,
  .wechat-webview .solution-grid,
  .wechat-webview .metrics-grid,
  .wechat-webview .product-grid,
  .wechat-webview .flow,
  .wechat-webview .benefit-list {
    gap: 10px;
  }

  .wechat-webview .pain-grid article,
  .wechat-webview .solution-grid article,
  .wechat-webview .metrics-grid article,
  .wechat-webview .flow-step,
  .wechat-webview .benefit-list p {
    min-height: auto;
    padding: 12px;
  }

  .wechat-webview h3,
  .wechat-webview .flow-step strong {
    font-size: 14px;
  }

  .wechat-webview .pain-grid p,
  .wechat-webview .solution-grid p,
  .wechat-webview .metrics-grid p,
  .wechat-webview .benefit-list p {
    font-size: 13px;
    line-height: 1.5;
  }
}
