:root {
  color-scheme: dark;
  font-family: Arial, "Microsoft YaHei", "PingFang SC", sans-serif;
  font-size: 15px;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  min-width: 320px;
  background: #0f1729;
  color: #f6f8fc;
  line-height: 1.65;
}
button,
a {
  font: inherit;
}
button {
  cursor: pointer;
}
.page {
  width: 100%;
  max-width: 700px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  margin: 0 auto;
  padding: 200px 18px 52px;
}

.download-card,
.guide {
  width: 100%;
  max-width: 600px;
  padding: 26px 24px;
  border: 1px solid;
  border-radius: 12px;
  box-shadow: 0 14px 34px #060b1970;
}
.download-card {
  margin: 0 auto;
  border-color: #3c465b;
  background: #20283a;
  border-radius: 16px;
}
h1 {
  font-size: 24px;
  line-height: 1.3;
  margin: 0 0 4px;
  overflow-wrap: anywhere;
}
.size {
  color: #d0d7e5;
  font-size: 13px;
}
.download-hint {
  margin: 0 0 16px;
  font-size: 14px;
}
.download-primary,
.backup {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2px 6px;
  text-decoration: none;
  border: 1px solid transparent;
  border-radius: 10px;
  min-height: 46px;
  font-weight: 700;
  transition:
    background 0.18s,
    transform 0.18s,
    box-shadow 0.18s;
}
.download-primary:hover,
.backup:hover {
  transform: translateY(-1px);
  box-shadow: 0 5px 14px #0003;
}
.download-primary {
  width: 100%;
  background: #37b7eb;
  color: #061522;
}
.backup-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 12px;
}
.backup {
  width: 100%;
  color: #f2f5fb;
  border-color: #515b6c;
  background: #30394b;
}
.download-success {
  display: none;
  margin: 16px 0 0;
  padding: 13px 15px;
  color: #e6f4ff;
  background: #193c52;
  border: 1px solid #337894;
  border-radius: 10px;
  font-size: 14px;
}
.download-success.show {
  display: block;
}
.download-success strong {
  display: block;
  margin-bottom: 2px;
}
.guide {
  color-scheme: light;
  margin: 24px auto 0;
  color: #202936;
  background: #fff;
  border-color: #e4e8ee;
}
.guide-head {
  padding-bottom: 18px;
  margin-bottom: 20px;
  border-bottom: 1px solid #e4e8ee;
}
h2 {
  margin: 0 0 8px;
  font-size: 19px;
  line-height: 1.5;
}
.guide-head p {
  margin: 0;
  color: #667386;
  font-size: 14px;
  line-height: 1.7;
}

.step-prefix {
  flex: none;
  color: #417ff9;
  font-size: 0.9em;
  white-space: nowrap;
}
.step-name {
  flex: 1;
  min-width: 0;
  color: #1d2533;
}
.dots {
  display: flex;
  gap: 7px;
  align-items: center;
  justify-content: center;
}
.dot {
  border: 0;
  padding: 0;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #cbd5e1;
  transition:
    width 0.18s,
    background 0.18s;
}
.dot[aria-current="step"] {
  width: 24px;
  border-radius: 8px;
  background: #0877f9;
}
#slides {
  display: grid;
}
.slide {
  grid-area: 1 / 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  visibility: hidden;
  pointer-events: none;
}
.slide.active {
  visibility: visible;
  pointer-events: auto;
}
.step-title {
  position: relative;
  display: flex;
  align-items: baseline;
  gap: 6px;
  padding-left: 14px;
  margin: 0 0 10px;
  font-size: 19px;
  font-weight: 700;
  line-height: 1.5;
}
.step-title::before {
  content: "";
  position: absolute;
  left: 0;
  top: 5px;
  width: 4px;
  height: 18px;
  border-radius: 999px;
  background: #417ff9;
}
.step-text {
  margin: 0 0 16px;
  color: #536176;
  font-size: 15px;
  line-height: 1.75;
}
.action-text {
  padding: 2px 6px;
  border-radius: 5px;
  background: #e8f1ff;
  color: #2563c7;
  font-weight: 600;
  overflow-wrap: anywhere;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}
.download-mark {
  white-space: nowrap;
}
.download-arrow {
  display: inline-block;
  width: 16px;
  height: 16px;
  margin-left: 4px;
  vertical-align: -3px;
}
.visual {
  flex: none;
  height: var(--visual-height, 360px);
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  padding: 24px 15px;
  background: #f5f7fb;
  border: 1px solid #e4e8ee;
  border-radius: 12px;
}

.edge {
  width: min(100%, 430px);
  color: #242424;
  background: #ececec;
  border-radius: 12px;
  box-shadow: 0 12px 20px #0000001a;
  font-family: "Segoe UI", Arial, "Microsoft YaHei", sans-serif;
  font-size: 13px;
  line-height: 1.5;
}
.ui-icon {
  display: block;
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.35;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.edge-bar {
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 13px;
  padding: 0 12px;
  background: #fff;
  border-bottom: 1px solid #d3d3d3;
  color: #666;
  border-radius: 12px 12px 0 0;
}
.edge-download {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 28px;
  border-radius: 5px;
  background: #e3e3e3;
  color: #242424;
}
.edge-download::after {
  content: "";
  position: absolute;
  right: 4px;
  bottom: 4px;
  width: 5px;
  height: 5px;
  background: #d69a32;
  border-radius: 50%;
}
.edge-body {
  padding: 0 8px 9px;
  background: #fff;
  border-radius: 0 0 12px 12px;
}
.edge-heading {
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 8px;
  font-size: 14px;
  font-weight: 600;
}
.edge-tools {
  display: flex;
  gap: 17px;
  align-items: center;
  font-weight: 400;
}
.edge-file {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: #e1e1e1;
  border-radius: 12px;
}
.file-line {
  min-width: 0;
  flex: 1;
  line-height: 1.55;
  overflow-wrap: anywhere;
}
.file-line strong {
  font-weight: 400;
}
.edge-trash {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 28px;
  color: #333;
}
.edge-more {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 5px;
  background: #c8c8c8;
  color: #333;
}
.mini-link {
  display: inline-block;
  margin-top: 8px;
  padding: 2px 10px;
  background: #fff;
  border: 1px solid #e6e6e6;
  border-radius: 6px;
  font-size: 12px;
}
.focus-ring {
  outline: 3px solid #ff9955;
  outline-offset: 3px;
  box-shadow: 0 0 0 7px #ff995526;
}
.edge-menu {
  width: 190px;
  margin: 3px 2px 8px auto;
  padding: 6px;
  background: #fff;
  border: 1px solid #ebebeb;
  border-radius: 7px;
  box-shadow: 0 7px 18px #18202d30;
}
.edge-menu div {
  padding: 6px 10px;
}
.edge-menu .picked {
  background: #f2f2f2;
  border-radius: 4px;
}
.confirm {
  width: min(100%, 430px);
  padding: 22px 24px 62px;
  color: #242424;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 12px 20px #00000012;
  font-size: 13px;
  line-height: 1.5;
}
.confirm h3 {
  margin: 0 0 10px;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.4;
  overflow-wrap: anywhere;
}
.confirm p {
  color: #656565;
  margin: 0 0 15px;
}
.confirm .safe-link {
  display: block;
  color: #065dff;
}
.confirm-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
  margin-top: 18px;
}
.confirm-cancel {
  display: flex;
  align-items: center;
  min-height: 32px;
  padding: 4px 10px;
  background: #fff;
  border: 1px solid #e7e7e7;
  border-radius: 8px;
}
.confirm-delete-group {
  position: relative;
}
.confirm-delete {
  display: flex;
  align-items: center;
  gap: 5px;
  min-height: 32px;
  padding: 4px 7px 4px 12px;
  border-radius: 8px;
  color: #fff;
  background: #111;
}
.confirm-delete .delete-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 22px;
  background: #272727;
  border-radius: 2px;
}
.confirm-keep {
  position: absolute;
  z-index: 1;
  top: calc(100% + 2px);
  right: 0;
  display: block;
  width: 104px;
  padding: 6px 12px;
  white-space: nowrap;
  color: #242424;
  background: #fff;
  border: 1px solid #ebebeb;
  border-radius: 5px;
  box-shadow: 0 5px 12px #00000012;
}
.win {
  width: min(100%, 480px);
  min-height: 230px;
  padding: 23px 24px 18px;
  color: #fff;
  background: linear-gradient(140deg, #0060b9, #0875c9);
  box-shadow: 0 15px 28px #0004;
  font-family: Arial, "Microsoft YaHei", sans-serif;
  font-size: 12px;
}
.win h3 {
  margin: 0 0 13px;
  font-size: 20px;
  line-height: 1.25;
}
.win p {
  max-width: 380px;
  margin: 0 0 13px;
  line-height: 1.55;
}
.win .link {
  display: inline-block;
  padding: 1px 0;
  border-bottom: 1px solid #ffffffaa;
}
.win .meta {
  margin-top: 9px;
  line-height: 1.7;
}
.win-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 25px;
}
.win-actions span {
  display: inline-block;
  min-width: 75px;
  padding: 6px 10px;
  text-align: center;
  color: #252a31;
  background: #f3f4f6;
}

.navigation {
  display: grid;
  grid-template-columns: 118px 1fr 118px;
  gap: 12px;
  align-items: center;
  margin-top: 20px;
}
.nav-button {
  width: 100%;
  min-width: 0;
  min-height: 42px;
  border-radius: 8px;
  border: 1px solid #d6e2f1;
  color: #202936;
  background: #fff;
  font-weight: 400;
}
.nav-button.next {
  color: #fff;
  background: #0877f9;
  border-color: #0877f9;
}
.nav-button:hover:not(:disabled) {
  background: #eef2f6;
}
.nav-button.next:hover:not(:disabled) {
  background: #0665d6;
  border-color: #0665d6;
}
.nav-button:disabled {
  opacity: 0.45;
  cursor: default;
}

.guide-footer {
  margin: 18px 0 0;
  padding-top: 16px;
  border-top: 1px solid #e4e8ee;
  color: #667386;
  font-size: 13px;
}
@media (max-width: 640px) {
  .page {
    padding: 144px 12px 52px;
  }
  .download-card,
  .guide {
    padding: 26px 16px;
  }
  .download-card {
    border-radius: 12px;
  }
  h1 {
    font-size: 18px;
  }
  .guide {
    margin-top: 18px;
  }
  h2 {
    font-size: 17px;
  }

  .guide-head {
    padding-bottom: 16px;
    margin-bottom: 18px;
  }
  .step-title {
    font-size: 17px;
  }
  .step-title::before {
    top: 4px;
    height: 17px;
  }
  .visual {
    height: var(--visual-height, 420px);
    padding: 14px 9px;
  }
  .edge-file {
    gap: 7px;
    padding: 10px 9px;
  }
  .confirm {
    padding: 20px 18px 62px;
  }
  .confirm h3 {
    font-size: 16px;
  }
  .win {
    padding: 20px 15px;
  }
  .win h3 {
    font-size: 17px;
  }
  .navigation {
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    gap: 10px;
    margin-top: 18px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition: none !important;
  }
}


/* dl.php class aliases mapped to reference spacing */
.file-meta { color: #d0d7e5; font-size: 13px; }
.file-tip { margin: 0 0 16px; font-size: 14px; }
.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2px 6px;
  text-decoration: none;
  border: 1px solid transparent;
  border-radius: 10px;
  min-height: 46px;
  font-weight: 700;
  font-size: inherit;
  line-height: inherit;
  cursor: pointer;
  user-select: none;
  font-family: inherit;
  transition: background 0.18s, transform 0.18s, box-shadow 0.18s;
}
.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 5px 14px #0003;
}
.btn-primary {
  width: 100%;
  background: #37b7eb;
  color: #061522;
}
.btn-secondary {
  width: 100%;
  color: #f2f5fb;
  border-color: #515b6c;
  background: #30394b;
}
.actions { margin: 0; padding: 0; }
.download-notice {
  display: none;
  margin: 16px 0 0;
  padding: 13px 15px;
  color: #e6f4ff;
  background: #193c52;
  border: 1px solid #337894;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.65;
}
.state-requested .download-notice,
.download-notice.show { display: block; }
.state-requested .file-meta,
.state-requested .file-tip { display: none; }
.state-requested .btn-primary { background: #3285aa; color: #07111f; }
.state-requested .btn-secondary { background: #252d3f; color: #8f96a4; border-color: #3c4557; }
.download-notice .success-icon { display: none; }
.download-notice .notice-copy { display: block; }
.download-notice .mobile-notice-copy { display: none; }
.download-notice .notice-title {
  display: block;
  margin-bottom: 2px;
  font-weight: 700;
}
.download-notice .notice-title::before { content: "✓ "; }
.download-notice .notice-line { display: inline; font-weight: 400; }
.download-notice .notice-line + .notice-line::before { content: " "; }
.page:not(.has-guide) {
  justify-content: center;
  padding: 30px 18px;
}
@media (max-width: 640px) {
  .page:not(.has-guide) { padding: 24px 12px; }
  .desktop-notice-copy { display: none !important; }
  .mobile-notice-copy { display: block !important; }
  .backup-row { grid-template-columns: 1fr; gap: 10px; }
}
