/* 下载页卡片、设备置顶、安装指引与微信引导弹窗样式。站点 CSP 要求使用外部样式表。 */
.card-copy { display: flow-root; }
.card-copy > :last-child { margin-bottom: 22px; }

@media not all and (max-width: 740px) {
  .grid > .card {
    display: grid;
    grid-row: span 4;
    grid-template-rows: auto 1fr auto auto;
    row-gap: 0;
  }
  .grid > .card > .button { margin-top: 0; }
  /* Older browsers still reserve the backup link's margin, line and padding. */
  .grid > .card > .button:last-child { margin-bottom: calc(20px + .78125rem * 1.5); }

  @supports (grid-template-rows: subgrid) {
    .grid > .card { grid-template-rows: subgrid; }
    .grid > .card > .button:last-child { margin-bottom: 0; }
  }
}

.device-tag {
  display: none;
  margin-left: auto;
  flex: none;
  align-items: center;
  padding: 4px 10px;
  border: 1px solid rgba(79, 70, 229, .24);
  border-radius: 999px;
  background: #eef2ff;
  color: var(--primary);
  font-size: .75rem;
  font-weight: 750;
  line-height: 1.3;
  white-space: nowrap;
}

@media (max-width: 740px) {
  .grid > .card.is-device-recommended {
    order: -1;
    border-color: rgba(79, 70, 229, .45);
    box-shadow: 0 14px 32px -12px rgba(79, 70, 229, .22), 0 2px 6px rgba(15, 23, 42, .05);
  }
  .card.is-device-recommended .card-top {
    flex-wrap: wrap;
    gap: 10px 14px;
  }
  .card.is-device-recommended .device-tag {
    display: inline-flex;
  }
}

.install-tip {
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--soft);
}
.install-tip summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 14px;
  color: var(--ink);
  font-size: .8125rem;
  font-weight: 700;
  line-height: 1.45;
  cursor: pointer;
  list-style: none;
}
.install-tip summary::-webkit-details-marker { display: none; }
.install-tip summary:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  border-radius: 12px;
}
.install-tip summary::after {
  content: "";
  flex: none;
  width: 7px;
  height: 7px;
  margin-right: 2px;
  border-right: 1.75px solid var(--primary);
  border-bottom: 1.75px solid var(--primary);
  transform: translateY(-1px) rotate(45deg);
  transition: transform .15s ease;
}
.install-tip[open] summary::after {
  transform: translateY(2px) rotate(-135deg);
}
.install-tip-body {
  padding: 0 14px 12px;
  border-top: 1px dashed var(--line);
}
.install-tip-body ol {
  margin: 10px 0 0;
  padding-left: 18px;
  color: #475569;
  font-size: .8125rem;
  line-height: 1.65;
}
.install-tip-body li + li { margin-top: 6px; }

.card .mirror-link { display: block; margin-top: 12px; padding: 6px 4px 2px; color: #64748b; font-size: .78125rem; font-weight: 650; line-height: 1.5; text-align: center; text-decoration: underline dotted; text-underline-offset: 4px; transition: color .15s ease; }
.card .mirror-link:hover, .card .mirror-link:focus-visible { color: var(--primary); }
.card .mirror-link.recommended { color: var(--primary); font-weight: 750; text-decoration-style: solid; }
.card .button.primary.demoted { border-color: var(--line); background: #fff; color: var(--ink); box-shadow: none; }

dialog.wechat-guide-dialog {
  width: min(440px, calc(100vw - 32px));
  max-width: 100%;
  margin: auto;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #fff;
  color: var(--ink);
  box-shadow: 0 24px 48px -12px rgba(15, 23, 42, .25);
}
dialog.wechat-guide-dialog:not([open]) {
  display: none;
}
dialog.wechat-guide-dialog[open] {
  display: grid;
  gap: 14px;
}
dialog.wechat-guide-dialog:modal {
  overscroll-behavior: contain;
}
dialog.wechat-guide-dialog::backdrop {
  overflow: hidden;
  overscroll-behavior: contain;
  background: rgba(15, 23, 42, .56);
  backdrop-filter: blur(4px);
}
.wechat-guide-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.wechat-guide-head h2 {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 750;
  line-height: 1.35;
  color: var(--ink);
}
.wechat-close-icon {
  display: inline-grid;
  place-items: center;
  min-width: 32px;
  min-height: 32px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--muted);
  font-size: 1.125rem;
  line-height: 1;
  cursor: pointer;
}
.wechat-close-icon:hover, .wechat-close-icon:focus-visible {
  border-color: var(--primary);
  color: var(--primary);
}
.wechat-guide-desc {
  margin: 0;
  color: #475569;
  font-size: .875rem;
  line-height: 1.68;
}
.wechat-guide-steps {
  margin: 0;
  padding-left: 20px;
  color: #334155;
  font-size: .8125rem;
  line-height: 1.7;
}
.wechat-guide-steps li + li { margin-top: 4px; }
.wechat-guide-url {
  margin: 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--soft);
  overflow-wrap: anywhere;
}
.wechat-guide-url code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: .75rem;
  color: #334155;
}
.wechat-guide-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}
.wechat-copy-wrap {
  display: flex;
  flex: 1 1 200px;
  flex-direction: column;
  gap: 6px;
}
.wechat-copy-button {
  width: 100%;
  min-height: 44px;
  cursor: pointer;
}
.wechat-close-button {
  min-height: 44px;
  cursor: pointer;
}
.wechat-copy-status {
  min-height: 1.35em;
  color: var(--success);
  font-size: .75rem;
  font-weight: 650;
  line-height: 1.35;
  opacity: 0;
  transition: opacity .15s ease;
}
.wechat-copy-status.is-visible {
  opacity: 1;
}
.wechat-copy-status.is-error {
  color: #b91c1c;
}
.zl-copy-trap {
  position: fixed;
  inset-block-start: 0;
  left: -9999px;
  opacity: 0;
}
