/* =========================================================
   链封 LinkWrap · 分发安装页
   ========================================================= */

.dist-body {
  min-height: 100vh;
  background: var(--lw-bg);
}

.dist-bg {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background:
    radial-gradient(48% 42% at 50% -6%, color-mix(in srgb, var(--lw-primary) 40%, transparent) 0%, transparent 64%),
    radial-gradient(40% 36% at 92% 24%, color-mix(in srgb, var(--lw-secondary) 18%, transparent) 0%, transparent 62%),
    var(--lw-bg);
}

.dist-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(148, 163, 184, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.05) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(circle at 50% 0%, #000, transparent 62%);
}

.dist-wrap {
  width: 100%;
  max-width: 460px;
  margin: 0 auto;
  padding: 26px 20px 44px;
}

.dist-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 26px;
}

.dist-brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 13.5px;
  font-weight: 600;
  color: color-mix(in srgb, var(--lw-text) 82%, transparent);
}

.dist-brand .mark {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: var(--lw-gradient);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
}

.dist-back {
  font-size: 12.5px;
  color: var(--lw-muted);
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.dist-back:hover {
  color: var(--lw-text);
}

.dist-shell {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.dist-card {
  position: relative;
  border-radius: 28px;
  padding: 32px 26px 26px;
  background: color-mix(in srgb, var(--lw-surface) 92%, transparent);
  border: 1px solid var(--lw-border);
  backdrop-filter: blur(20px);
  overflow: hidden;
  box-shadow: 0 40px 80px -40px rgba(0, 0, 0, 0.9);
}

.dist-card::before {
  content: "";
  position: absolute;
  top: -120px;
  left: 50%;
  transform: translateX(-50%);
  width: 320px;
  height: 220px;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--lw-primary) 42%, transparent), transparent);
  filter: blur(14px);
  pointer-events: none;
}

.dist-plat {
  position: relative;
  display: flex;
  justify-content: center;
  margin-bottom: 22px;
}

.dist-plat span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 11.5px;
  color: var(--lw-muted);
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid var(--lw-border);
  background: rgba(148, 163, 184, 0.06);
}

.dist-icon {
  position: relative;
  width: 94px;
  height: 94px;
  border-radius: 24px;
  object-fit: cover;
  margin: 0 auto 18px;
  display: block;
  box-shadow: 0 22px 44px -16px rgba(0, 0, 0, 0.85), inset 0 1px 0 rgba(255, 255, 255, 0.2);
  background: var(--lw-soft);
}

.dist-card h1 {
  position: relative;
  font-size: 23px;
  font-weight: 680;
  letter-spacing: -0.02em;
  text-align: center;
  line-height: 1.3;
  word-break: break-word;
}

.dist-sub {
  text-align: center;
  color: var(--lw-muted);
  font-size: 13.5px;
  margin-top: 7px;
  line-height: 1.7;
}

.dist-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  flex-wrap: wrap;
  margin: 16px 0 24px;
  font-size: 12px;
  color: var(--lw-muted);
}

.dist-meta i {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.5;
}

.dist-meta .ver {
  padding: 2px 8px;
  border-radius: 6px;
  background: rgba(148, 163, 184, 0.1);
  color: color-mix(in srgb, var(--lw-text) 80%, transparent);
  font-variant-numeric: tabular-nums;
}

.dist-install {
  position: relative;
  width: 100%;
  height: 54px;
  border: 0;
  border-radius: 16px;
  font-size: 16px;
  font-weight: 650;
  color: #fff;
  background: var(--lw-gradient);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  box-shadow: 0 20px 42px -18px var(--lw-primary), inset 0 1px 0 rgba(255, 255, 255, 0.26);
  transition: transform 0.2s var(--lw-ease), box-shadow 0.2s;
}

.dist-install:hover {
  transform: translateY(-1px);
  box-shadow: 0 26px 50px -18px var(--lw-primary), inset 0 1px 0 rgba(255, 255, 255, 0.26);
}

.dist-install:active {
  transform: scale(0.985);
}

.dist-install .ico {
  width: 19px;
  height: 19px;
}

.dist-actions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 9px;
  margin-top: 10px;
}

.dist-action {
  height: 42px;
  border-radius: 12px;
  border: 1px solid var(--lw-border);
  background: rgba(148, 163, 184, 0.06);
  color: color-mix(in srgb, var(--lw-text) 86%, transparent);
  font-size: 12.5px;
  font-family: inherit;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
  text-decoration: none;
}

.dist-action:hover {
  background: rgba(148, 163, 184, 0.12);
  border-color: rgba(148, 163, 184, 0.3);
}

.dist-action .ico {
  width: 15px;
  height: 15px;
}

.dist-trust {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--lw-border);
  font-size: 11px;
  color: var(--lw-muted);
}

.dist-trust .ico {
  width: 13px;
  height: 13px;
  color: var(--lw-success);
}

/* 侧栏（桌面） */
.dist-side {
  display: none;
}

.dist-side-card {
  border-radius: 22px;
  border: 1px solid var(--lw-border);
  background: color-mix(in srgb, var(--lw-surface) 80%, transparent);
  backdrop-filter: blur(16px);
  padding: 20px;
  text-align: center;
}

.dist-side-card img {
  width: 100%;
  border-radius: 10px;
  background: #fff;
  padding: 10px;
}

.dist-side-card p {
  font-size: 11.5px;
  color: var(--lw-muted);
  margin-top: 10px;
  line-height: 1.7;
}

.dist-side-title {
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--lw-muted);
  text-align: left;
  margin-bottom: 12px;
  text-transform: uppercase;
}

/* 安装步骤 */
.dist-steps {
  border-radius: 22px;
  border: 1px solid var(--lw-border);
  background: color-mix(in srgb, var(--lw-surface) 70%, transparent);
  padding: 22px;
}

.dist-steps h3 {
  font-size: 13px;
  font-weight: 600;
  color: color-mix(in srgb, var(--lw-text) 88%, transparent);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.dist-steps h3 .ico {
  width: 16px;
  height: 16px;
  color: var(--lw-secondary);
}

.dist-step {
  display: flex;
  gap: 13px;
  position: relative;
  padding-bottom: 15px;
}

.dist-step:last-child {
  padding-bottom: 0;
}

.dist-step:not(:last-child)::before {
  content: "";
  position: absolute;
  left: 11px;
  top: 24px;
  bottom: 2px;
  width: 1px;
  background: linear-gradient(var(--lw-border), transparent);
}

.dist-step .n {
  width: 23px;
  height: 23px;
  flex: none;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 700;
  color: var(--lw-secondary);
  border: 1px solid color-mix(in srgb, var(--lw-secondary) 34%, transparent);
  background: color-mix(in srgb, var(--lw-secondary) 10%, transparent);
  position: relative;
  z-index: 1;
}

.dist-step .t {
  font-size: 13px;
  color: color-mix(in srgb, var(--lw-text) 84%, transparent);
  line-height: 1.65;
  padding-top: 2px;
}

.dist-step .t small {
  display: block;
  color: var(--lw-muted);
  font-size: 11.5px;
  margin-top: 2px;
}

/* 提示 */
.dist-notice {
  margin-top: 16px;
  padding: 14px 16px;
  border-radius: 14px;
  font-size: 11.5px;
  line-height: 1.75;
  color: color-mix(in srgb, var(--lw-muted) 92%, transparent);
  background: color-mix(in srgb, var(--lw-warning) 7%, transparent);
  border: 1px solid color-mix(in srgb, var(--lw-warning) 22%, transparent);
  display: flex;
  gap: 9px;
}

.dist-notice .ico {
  width: 15px;
  height: 15px;
  flex: none;
  margin-top: 1px;
  color: var(--lw-warning);
}

/* 全部产物 */
.dist-artifacts {
  margin-top: 16px;
  border-radius: 16px;
  border: 1px solid var(--lw-border);
  background: color-mix(in srgb, var(--lw-surface) 55%, transparent);
  overflow: hidden;
}

.dist-artifacts summary {
  cursor: pointer;
  list-style: none;
  padding: 14px 17px;
  font-size: 12.5px;
  color: var(--lw-muted);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.dist-artifacts summary::-webkit-details-marker {
  display: none;
}

.dist-artifacts summary::after {
  content: "+";
  font-size: 15px;
  color: var(--lw-muted);
}

.dist-artifacts[open] summary::after {
  content: "−";
}

.dist-artifact {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 12px 17px;
  border-top: 1px solid var(--lw-border);
  font-size: 12.5px;
  color: color-mix(in srgb, var(--lw-text) 82%, transparent);
}

.dist-artifact:hover {
  background: rgba(148, 163, 184, 0.05);
}

.dist-artifact .ico {
  width: 16px;
  height: 16px;
  color: var(--lw-secondary);
}

.dist-artifact .grow {
  flex: 1;
}

.dist-artifact small {
  display: block;
  color: var(--lw-muted);
  font-size: 11px;
  margin-top: 1px;
}

.dist-artifact .sz {
  font-size: 11px;
  color: var(--lw-muted);
  font-variant-numeric: tabular-nums;
}

.dist-footer {
  text-align: center;
  margin-top: 30px;
  font-size: 11px;
  color: var(--lw-muted);
  line-height: 1.9;
}

.dist-footer a {
  color: color-mix(in srgb, var(--lw-text) 60%, transparent);
}

/* 密码门 */
.gate {
  text-align: center;
}

.gate .lock {
  width: 62px;
  height: 62px;
  border-radius: 20px;
  margin: 6px auto 20px;
  display: grid;
  place-items: center;
  background: var(--lw-soft);
  border: 1px solid var(--lw-border);
  color: var(--lw-secondary);
}

.gate .lock .ico {
  width: 26px;
  height: 26px;
}

.gate p {
  color: var(--lw-muted);
  font-size: 13px;
  margin: 8px 0 22px;
}

.gate input {
  width: 100%;
  height: 50px;
  border-radius: 14px;
  border: 1px solid var(--lw-border);
  background: rgba(148, 163, 184, 0.07);
  color: var(--lw-text);
  font-size: 15px;
  padding: 0 16px;
  font-family: inherit;
  outline: none;
  text-align: center;
  letter-spacing: 0.1em;
}

.gate input:focus {
  border-color: var(--lw-primary);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--lw-primary) 22%, transparent);
}

.gate button {
  margin-top: 12px;
  width: 100%;
  height: 50px;
  border: 0;
  border-radius: 14px;
  background: var(--lw-gradient);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}

.gate .err {
  color: #f87171;
  font-size: 12px;
  margin-top: 10px;
  min-height: 18px;
}

/* 模态框 */
.lw-modal {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(4, 7, 14, 0.72);
  backdrop-filter: blur(10px);
}

.lw-modal.open {
  display: flex;
}

.lw-modal-card {
  position: relative;
  width: 100%;
  max-width: 400px;
  border-radius: 24px;
  background: color-mix(in srgb, var(--lw-surface) 98%, transparent);
  border: 1px solid var(--lw-border);
  padding: 26px;
  text-align: center;
  box-shadow: 0 50px 90px -40px rgba(0, 0, 0, 0.95);
  animation: modal-in 0.28s var(--lw-ease);
}

@keyframes modal-in {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.98);
  }
}

.lw-modal-card h3 {
  font-size: 17px;
  font-weight: 650;
  margin-bottom: 6px;
}

.lw-modal-card p {
  font-size: 13px;
  color: var(--lw-muted);
  line-height: 1.8;
}

.lw-modal-card img.qr {
  width: 210px;
  max-width: 100%;
  margin: 18px auto 12px;
  border-radius: 12px;
  background: #fff;
  padding: 10px;
}

.lw-modal-card .url {
  font-size: 11.5px;
  color: var(--lw-muted);
  word-break: break-all;
  background: rgba(148, 163, 184, 0.08);
  border-radius: 8px;
  padding: 8px 10px;
  margin: 8px 0 18px;
}

.lw-modal-card .btn {
  width: 100%;
}

.lw-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid var(--lw-border);
  background: rgba(148, 163, 184, 0.08);
  color: var(--lw-text);
  cursor: pointer;
  display: grid;
  place-items: center;
}

/* toast */
.lw-toast {
  position: fixed;
  left: 50%;
  bottom: 30px;
  transform: translate(-50%, 20px);
  opacity: 0;
  z-index: 120;
  background: #101725;
  border: 1px solid var(--lw-border);
  color: var(--lw-text);
  font-size: 13px;
  padding: 11px 20px;
  border-radius: 999px;
  box-shadow: 0 20px 40px -16px rgba(0, 0, 0, 0.9);
  transition: 0.28s var(--lw-ease);
  pointer-events: none;
}

.lw-toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

@media (min-width: 980px) {
  .dist-wrap {
    max-width: 800px;
    padding-top: 46px;
  }
  .dist-shell {
    grid-template-columns: 452px 280px;
    gap: 20px;
    align-items: start;
  }
  .dist-side {
    display: block;
    position: sticky;
    top: 30px;
  }
}

@media (max-width: 380px) {
  .dist-card {
    padding: 26px 20px 22px;
    border-radius: 24px;
  }
  .dist-actions {
    grid-template-columns: 1fr 1fr;
  }
}
