:root {
  --paper: #f2efe5;
  --paper-2: #eae6d9;
  --panel: #fcfbf6;
  --ink: #14140f;
  --ink-soft: #3d3a2f;
  --muted: #77725f;
  --line: #d8d2c0;
  --line-strong: #bcb5a0;
  --lime: #c9f45a;
  --lime-deep: #b6e43d;
  --red: #c7462f;
  --green: #147d58;
  --serif: "Songti SC", "STSong", "Noto Serif SC", "Source Han Serif SC", Georgia, serif;
  --sans: "Helvetica Neue", Helvetica, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --mono: "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;
  --preview-bg: #12a47a;
  --preview-light: #3fbb96;
  --preview-dark: #0d7f5e;
  --preview-text: #ffffff;
  --radius: 20px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

::selection {
  background: var(--lime);
  color: var(--ink);
}

[hidden] {
  display: none !important;
}

a {
  color: inherit;
}

button,
input,
select {
  font-family: inherit;
}

button {
  -webkit-tap-highlight-color: transparent;
}

:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

.page-grid {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(to right, rgba(20, 20, 15, 0.045) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(20, 20, 15, 0.045) 1px, transparent 1px);
  background-size: 84px 84px;
  mask-image: linear-gradient(to bottom, #000 0%, rgba(0, 0, 0, 0.45) 55%, transparent 88%);
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, rgba(0, 0, 0, 0.45) 55%, transparent 88%);
}

.wrap {
  position: relative;
  z-index: 1;
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 clamp(18px, 4vw, 48px);
}

/* ---------- 顶部导航 ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 74px;
  padding: 0 clamp(18px, 4vw, 48px);
  border-bottom: 1px solid var(--line);
  background: rgba(242, 239, 229, 0.86);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
  flex: 0 0 auto;
}

.brand-mark {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: var(--lime);
  border: 1px solid var(--ink);
  color: var(--ink);
  box-shadow: 2px 2px 0 rgba(20, 20, 15, 0.18);
}

.brand-mark svg {
  width: 18px;
  height: 18px;
}

.brand-mark.small {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  box-shadow: none;
}

.brand-mark.small svg {
  width: 14px;
  height: 14px;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-text strong {
  font-size: 14.5px;
  font-weight: 650;
  letter-spacing: -0.02em;
}

.brand-text small {
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.14em;
  color: var(--muted);
  margin-top: 2px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 30px;
  margin-left: 12px;
}

.nav-links a {
  position: relative;
  text-decoration: none;
  font-size: 12px;
  color: var(--ink-soft);
  padding: 4px 0;
  transition: color 0.2s;
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 1px;
  background: var(--ink);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}

.nav-links a:hover {
  color: var(--ink);
}

.nav-links a:hover::after {
  transform: scaleX(1);
}

.engine-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 11px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-size: 10.5px;
  color: var(--ink-soft);
  background: rgba(252, 251, 246, 0.7);
  flex: 0 0 auto;
}

.engine-pill .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #c3a13a;
  box-shadow: 0 0 0 3px rgba(195, 161, 58, 0.14);
}

.engine-pill.ready .dot {
  background: #1e9e6f;
  box-shadow: 0 0 0 3px rgba(30, 158, 111, 0.15);
}

.engine-pill.error .dot {
  background: var(--red);
  box-shadow: 0 0 0 3px rgba(199, 70, 47, 0.15);
}

/* ---------- Hero ---------- */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: clamp(32px, 4vw, 66px);
  align-items: start;
  padding: clamp(38px, 5vw, 72px) 0 46px;
}

.hero-copy {
  padding-top: 8px;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-family: var(--mono);
  font-size: 9.5px;
  font-weight: 500;
  letter-spacing: 0.14em;
  color: var(--ink-soft);
  text-transform: uppercase;
}

.eyebrow.light {
  color: rgba(246, 243, 232, 0.62);
}

.eyebrow-square {
  width: 7px;
  height: 7px;
  background: var(--lime);
  border: 1px solid var(--ink);
  flex: 0 0 auto;
}

.eyebrow.light .eyebrow-square {
  border-color: var(--lime);
}

.hero h1 {
  margin: 20px 0 0;
  font-size: clamp(48px, 5.3vw, 76px);
  line-height: 1.06;
  letter-spacing: -0.045em;
  font-weight: 700;
}

.hero h1 .line {
  display: block;
  animation: rise 0.9s cubic-bezier(0.2, 0.72, 0.2, 1) both;
}

.hero h1 .line:nth-child(1) {
  animation-delay: 0.06s;
}

.hero h1 .line:nth-child(2) {
  animation-delay: 0.14s;
  padding-left: 0.26em;
}

.mark {
  position: relative;
  display: inline-block;
  isolation: isolate;
  padding: 0 0.03em;
}

.mark::after {
  content: "";
  position: absolute;
  z-index: -1;
  left: -0.04em;
  right: -0.05em;
  bottom: 0.015em;
  height: 0.24em;
  background: var(--lime);
  transform: skewX(-9deg) rotate(-1.2deg);
  clip-path: polygon(1% 30%, 99% 0, 100% 74%, 0 100%);
}

.serif {
  font-family: var(--serif);
  font-weight: 600;
  letter-spacing: -0.04em;
}

.lede {
  max-width: 440px;
  margin: 26px 0 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.85;
  animation: rise 0.9s cubic-bezier(0.2, 0.72, 0.2, 1) 0.22s both;
}

.hero-points {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  padding: 0;
  margin: 24px 0 0;
  animation: rise 0.9s cubic-bezier(0.2, 0.72, 0.2, 1) 0.3s both;
}

.hero-points li {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: rgba(252, 251, 246, 0.5);
  font-size: 10.5px;
  color: var(--ink-soft);
}

.hero-points li::before {
  content: "";
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--green);
}

.pipeline {
  margin-top: 36px;
  padding: 14px 0 12px;
  border-top: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line-strong);
  max-width: 470px;
  animation: rise 0.9s cubic-bezier(0.2, 0.72, 0.2, 1) 0.38s both;
}

.pipeline-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: 0.13em;
  color: var(--muted);
}

.pipeline-state {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--green);
}

.pipeline-state i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
}

.pipeline-tools {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 9px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-soft);
}

.pipeline-tools b {
  color: var(--muted);
  font-weight: 400;
}

/* ---------- 构建器 ---------- */

.builder {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--ink);
  border-radius: 22px;
  padding: 22px;
  box-shadow: 10px 10px 0 rgba(20, 20, 15, 0.07);
  animation: rise 0.85s cubic-bezier(0.2, 0.72, 0.2, 1) 0.1s both;
  scroll-margin-top: 92px;
}

.builder-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 14px;
  margin-bottom: 17px;
  border-bottom: 1px dashed var(--line-strong);
}

.builder-kicker {
  margin: 0;
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: 0.14em;
  color: var(--muted);
}

.builder-head h2 {
  margin: 3px 0 0;
  font-size: 21px;
  line-height: 1.25;
  letter-spacing: -0.03em;
  font-weight: 650;
}

.local-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 3px;
  padding: 4px 7px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.1em;
  color: var(--muted);
}

.local-tag i {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--lime-deep);
}

.platform-switch {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--paper-2);
  flex: 0 0 auto;
  margin-top: 2px;
}

.platform-switch button {
  height: 26px;
  padding: 0 12px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 9.5px;
  font-weight: 500;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: background 0.18s, color 0.18s;
}

.platform-switch button:hover {
  color: var(--ink);
}

.platform-switch button.active {
  background: var(--ink);
  color: var(--lime);
}

.platform-switch button:disabled {
  cursor: wait;
  opacity: 0.6;
}

.ios-notice {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin: -4px 0 16px;
  padding: 10px 11px;
  border: 1px dashed var(--line-strong);
  border-radius: 10px;
  background: rgba(201, 244, 90, 0.12);
  animation: fade 0.25s ease both;
}

.ios-notice-badge {
  flex: 0 0 auto;
  margin-top: 1px;
  padding: 2px 5px;
  border-radius: 3px;
  background: var(--ink);
  color: var(--lime);
  font-family: var(--mono);
  font-size: 7.5px;
  letter-spacing: 0.06em;
}

.ios-notice p {
  margin: 0;
  font-size: 10px;
  line-height: 1.7;
  color: var(--ink-soft);
}

.builder-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 232px;
  gap: 22px;
}

.form {
  min-width: 0;
}

.field {
  margin-top: 14px;
}

.field:first-child {
  margin-top: 0;
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 14px;
}

.field-row .field {
  margin-top: 0;
}

label,
.field-label {
  display: inline-block;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--ink-soft);
  letter-spacing: 0.01em;
}

.label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

label em {
  font-style: normal;
  font-size: 9px;
  font-weight: 500;
  color: var(--red);
  margin-left: 4px;
}

.text-btn {
  border: 0;
  background: none;
  padding: 0;
  font-size: 10px;
  color: var(--muted);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: var(--line-strong);
  transition: color 0.2s;
}

.text-btn:hover {
  color: var(--ink);
}

.url-row {
  display: flex;
  align-items: center;
  height: 50px;
  margin-top: 7px;
  border: 1px solid var(--ink);
  border-radius: 11px;
  background: #fff;
  overflow: hidden;
  transition: box-shadow 0.2s, border-color 0.2s;
}

.url-row:focus-within {
  box-shadow: 0 0 0 3px rgba(201, 244, 90, 0.55);
}

.url-prefix {
  padding-left: 13px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  flex: 0 0 auto;
}

.url-row.has-scheme .url-prefix {
  display: none;
}

.url-row input {
  flex: 1;
  min-width: 0;
  height: 100%;
  border: 0;
  outline: none;
  background: transparent;
  padding: 0 8px 0 10px;
  font-size: 13.5px;
  color: var(--ink);
}

.url-row input::placeholder {
  color: #aaa592;
}

.inspect-btn {
  height: 100%;
  padding: 0 16px;
  border: 0;
  background: var(--ink);
  color: #fff;
  font-size: 11.5px;
  font-weight: 500;
  cursor: pointer;
  flex: 0 0 auto;
  transition: background 0.2s, color 0.2s;
}

.inspect-btn:hover {
  background: var(--lime);
  color: var(--ink);
}

.inspect-btn:disabled {
  opacity: 0.55;
  cursor: wait;
}

.hint {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 7px 0 0;
  font-size: 9.5px;
  color: var(--muted);
  min-height: 14px;
}

.hint-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--line-strong);
  flex: 0 0 auto;
}

.hint.loading .hint-dot {
  background: #c3a13a;
  animation: blink 0.9s infinite;
}

.hint.ok {
  color: var(--green);
}

.hint.ok .hint-dot {
  background: var(--green);
}

.hint.warn {
  color: #9a6a18;
}

.hint.warn .hint-dot {
  background: #c3a13a;
}

input[type="text"] {
  width: 100%;
  height: 41px;
  margin-top: 6px;
  padding: 0 11px;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  background: #fff;
  color: var(--ink);
  font-size: 12.5px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

input[type="text"]:focus {
  border-color: var(--ink);
  box-shadow: 0 0 0 3px rgba(201, 244, 90, 0.45);
}

input[type="text"]::placeholder {
  color: #b0aa97;
}

#packageName {
  font-family: var(--mono);
  font-size: 11px;
}

.micro {
  font-size: 9px;
  color: var(--muted);
  letter-spacing: 0.04em;
}

.mono {
  font-family: var(--mono);
}

.icon-row {
  display: flex;
  align-items: center;
  gap: 13px;
  margin-top: 7px;
}

.icon-box {
  width: 56px;
  height: 56px;
  padding: 4px;
  border-radius: 14px;
  border: 1px solid rgba(20, 20, 15, 0.22);
  background: var(--preview-bg);
  flex: 0 0 auto;
  transition: background 0.25s;
}

.icon-plate {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  padding: 5px;
  border-radius: 10px;
  background: #fff;
  box-shadow: inset 0 0 0 1px rgba(20, 20, 15, 0.06);
  overflow: hidden;
}

.icon-plate img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
}

.icon-plate span {
  font-size: 18px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1;
}

.icon-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.ghost-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 31px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: transparent;
  color: var(--ink-soft);
  font-size: 10.5px;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, color 0.2s;
  white-space: nowrap;
}

.ghost-btn:hover {
  border-color: var(--ink);
  background: rgba(20, 20, 15, 0.04);
  color: var(--ink);
}

.upload-btn {
  cursor: pointer;
}

.swatches {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
}

.swatch {
  width: 25px;
  height: 25px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--swatch, #ddd);
  box-shadow: inset 0 0 0 1px rgba(20, 20, 15, 0.14);
  cursor: pointer;
  position: relative;
  transition: transform 0.18s;
}

.swatch:hover {
  transform: translateY(-2px);
}

.swatch.active::after {
  content: "";
  position: absolute;
  inset: -4px;
  border: 1.5px solid var(--ink);
  border-radius: 50%;
}

.swatch.custom {
  display: grid;
  place-items: center;
  background: conic-gradient(#e45b2c, #f2c94c, #12a47a, #2f5bff, #e45b2c);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  overflow: hidden;
}

.swatch.custom input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.swatch.custom span {
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
  pointer-events: none;
  line-height: 1;
  padding-bottom: 1px;
}

.advanced {
  margin-top: 17px;
  padding-top: 13px;
  border-top: 1px solid var(--line);
}

.advanced summary {
  display: flex;
  align-items: center;
  gap: 9px;
  list-style: none;
  cursor: pointer;
  user-select: none;
}

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

.adv-title {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--ink-soft);
}

.adv-meta {
  font-size: 9.5px;
  color: var(--muted);
}

.chevron {
  width: 14px;
  height: 14px;
  margin-left: auto;
  color: var(--muted);
  transition: transform 0.25s;
}

.advanced[open] .chevron {
  transform: rotate(180deg);
}

.adv-body {
  padding-top: 12px;
  animation: fade 0.25s ease both;
}

.opt-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.opt {
  position: relative;
  display: block;
}

.opt input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}

.opt span {
  display: flex;
  align-items: center;
  height: 31px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  font-size: 10px;
  color: var(--ink-soft);
  cursor: pointer;
  transition: background 0.18s, color 0.18s, border-color 0.18s;
}

.opt span::before {
  content: "";
  width: 4px;
  height: 4px;
  margin-right: 7px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  flex: 0 0 auto;
  transition: background 0.18s, border-color 0.18s;
}

.opt input:checked + span {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}

.opt input:checked + span::before {
  background: var(--lime);
  border-color: var(--lime);
}

.opt input:focus-visible + span {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

.orientation-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 11px;
}

.segmented {
  display: inline-flex;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  overflow: hidden;
  background: #fff;
}

.segmented button {
  height: 30px;
  padding: 0 12px;
  border: 0;
  border-right: 1px solid var(--line);
  background: transparent;
  font-size: 10px;
  color: var(--muted);
  cursor: pointer;
  transition: background 0.18s, color 0.18s;
}

.segmented button:last-child {
  border-right: 0;
}

.segmented button.active {
  background: var(--ink);
  color: var(--lime);
}

.build-btn {
  width: 100%;
  height: 53px;
  margin-top: 18px;
  padding: 0 7px 0 18px;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 0;
  border-radius: 11px;
  background: var(--ink);
  color: #fff;
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: 0.01em;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s, opacity 0.2s;
}

.build-btn::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 20%, rgba(255, 255, 255, 0.08) 45%, transparent 70%);
  transform: translateX(-120%);
  transition: transform 0.6s ease;
}

.build-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 26px rgba(20, 20, 15, 0.2);
}

.build-btn:hover::before {
  transform: translateX(120%);
}

.build-btn:active {
  transform: translateY(0);
}

.build-btn:disabled {
  cursor: wait;
  opacity: 0.75;
  transform: none;
  box-shadow: none;
}

.build-btn-text {
  position: relative;
  z-index: 1;
}

.build-btn-arrow {
  position: relative;
  z-index: 1;
  margin-left: auto;
  width: 37px;
  height: 37px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--lime);
  color: var(--ink);
  transition: transform 0.2s;
  flex: 0 0 auto;
}

.build-btn-arrow svg {
  width: 17px;
  height: 17px;
}

.build-btn:hover .build-btn-arrow {
  transform: translateX(2px);
}

.build-btn.loading .build-btn-arrow svg {
  display: none;
}

.build-btn.loading .build-btn-arrow::after {
  content: "";
  width: 15px;
  height: 15px;
  border: 2px solid var(--ink);
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

.legal {
  margin: 9px 0 0;
  font-size: 8.5px;
  line-height: 1.7;
  color: #98927f;
}

/* ---------- 手机预览 ---------- */

.preview {
  display: flex;
  flex-direction: column;
  padding-left: 19px;
  border-left: 1px dashed var(--line-strong);
  min-width: 0;
}

.preview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
  font-size: 9.5px;
  color: var(--ink-soft);
}

.phone-wrap {
  position: relative;
  display: grid;
  place-items: center;
  padding: 6px 0 2px;
  animation: float 7s ease-in-out infinite;
}

.phone-wrap:hover {
  animation-play-state: paused;
}

.phone {
  position: relative;
  width: 208px;
  height: 420px;
  padding: 6px;
  border-radius: 35px;
  background: #0e0e09;
  box-shadow:
    0 24px 44px rgba(20, 20, 15, 0.22),
    inset 0 0 0 1px rgba(255, 255, 255, 0.12);
  transform: rotate(-2deg);
  transition: transform 0.45s cubic-bezier(0.2, 0.72, 0.2, 1);
  z-index: 1;
}

.phone:hover {
  transform: rotate(0deg) translateY(-3px);
}

.phone-notch {
  position: absolute;
  top: 6px;
  left: 50%;
  transform: translateX(-50%);
  width: 54px;
  height: 13px;
  border-radius: 0 0 9px 9px;
  background: #0e0e09;
  z-index: 5;
}

.phone-screen {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 29px;
  overflow: hidden;
  background: var(--preview-bg);
}

.phone-status {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 3;
  height: 25px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 14px;
  color: var(--preview-text);
  font-size: 7.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.phone-screen.web-mode .phone-status {
  color: #444;
}

.phone-screen.web-mode .phone-home {
  background: #14140f;
}

.phone-status-icons {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 8px;
}

.phone-status-icons i {
  display: inline-block;
  background: currentColor;
}

.sig {
  width: 2px;
  height: 3px;
  box-shadow: 3px -1px 0 currentColor, 6px -2px 0 currentColor;
}

.wifi {
  width: 7px;
  height: 5px;
  background: transparent !important;
  border: 1.2px solid currentColor;
  border-bottom: 0;
  border-radius: 50% 50% 0 0 / 100% 100% 0 0;
  margin-left: 1px;
}

.batt {
  width: 11px;
  height: 5px;
  background: linear-gradient(to right, currentColor 72%, transparent 72%) !important;
  border: 1px solid currentColor;
  border-radius: 1.5px;
  position: relative;
}

.batt::after {
  content: "";
  position: absolute;
  right: -3px;
  top: 1px;
  width: 1.5px;
  height: 2px;
  background: currentColor;
}

.phone-splash {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 52px;
  background: var(--preview-bg);
  transition: background 0.3s ease;
}

.phone-icon {
  width: 76px;
  height: 76px;
  padding: 4px;
  margin-top: 58px;
  border-radius: 20px;
  background: linear-gradient(145deg, var(--preview-light), var(--preview-dark));
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.16);
}

.phone-icon-plate {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  padding: 8px;
  border-radius: 16px;
  background: #fff;
  box-shadow: inset 0 0 0 1px rgba(20, 20, 15, 0.06);
  overflow: hidden;
}

.phone-icon-plate img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
}

.phone-icon-plate span {
  font-size: 24px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1;
}

.phone-appname {
  margin-top: 18px;
  max-width: 82%;
  color: var(--preview-text);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color 0.3s ease;
}

.phone-loader {
  display: flex;
  gap: 4px;
  margin-top: 19px;
}

.phone-loader i {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--preview-text);
  opacity: 0.28;
  animation: pulse 1.4s ease-in-out infinite;
}

.phone-loader i:nth-child(2) {
  animation-delay: 0.18s;
}

.phone-loader i:nth-child(3) {
  animation-delay: 0.36s;
}

.phone-loading-text {
  margin-top: 7px;
  font-size: 7px;
  letter-spacing: 0.04em;
  color: var(--preview-text);
  opacity: 0.5;
}

.phone-home {
  position: absolute;
  bottom: 7px;
  left: 50%;
  transform: translateX(-50%);
  width: 72px;
  height: 4px;
  border-radius: 3px;
  background: var(--preview-text);
  opacity: 0.3;
  z-index: 4;
}

.phone-web {
  position: absolute;
  inset: 0;
  z-index: 2;
  background: #fdfcf8;
  padding-top: 25px;
}

.phone-webbar {
  height: 24px;
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 0 10px;
  background: #f0eee7;
  border-bottom: 1px solid #e2dfd4;
  color: #6e6a5c;
  font-size: 6.5px;
  font-family: var(--mono);
}

.phone-webbar .lock {
  width: 5px;
  height: 5px;
  border: 1px solid currentColor;
  border-radius: 1px;
  position: relative;
}

.phone-webbar .lock::before {
  content: "";
  position: absolute;
  left: 0.5px;
  top: -3px;
  width: 3px;
  height: 3px;
  border: 1px solid currentColor;
  border-bottom: 0;
  border-radius: 3px 3px 0 0;
}

.phone-skeleton {
  padding: 14px 12px;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.phone-skeleton i {
  display: block;
  border-radius: 4px;
  background: #e9e6dd;
}

.sk-1 {
  width: 58%;
  height: 13px;
  background: var(--preview-bg) !important;
  opacity: 0.55;
}

.sk-2 {
  width: 92%;
  height: 7px;
  margin-top: 6px;
}

.sk-3 {
  width: 100%;
  height: 52px;
  margin-top: 4px;
  background: #f0ede5 !important;
  border: 1px solid #e5e1d6;
}

.sk-4 {
  width: 78%;
  height: 7px;
  margin-top: 2px;
}

.phone-shadow {
  position: absolute;
  bottom: 0;
  left: 18%;
  right: 18%;
  height: 22px;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(20, 20, 15, 0.22), transparent 68%);
  filter: blur(7px);
  z-index: 0;
}

.preview-caption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 13px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 7.5px;
  letter-spacing: 0.06em;
  color: var(--muted);
  text-transform: uppercase;
  overflow: hidden;
}

.preview-caption span {
  white-space: nowrap;
}

/* ---------- 构建控制台 ---------- */

.console {
  position: relative;
  margin-top: 60px;
  padding: clamp(20px, 3vw, 32px);
  border-radius: 22px;
  background: var(--ink);
  color: #f6f3e8;
  overflow: hidden;
  scroll-margin-top: 90px;
  animation: rise 0.55s cubic-bezier(0.2, 0.72, 0.2, 1) both;
}

.console::before {
  content: "";
  position: absolute;
  top: -140px;
  right: -100px;
  width: 420px;
  height: 420px;
  background: radial-gradient(circle, rgba(201, 244, 90, 0.14), transparent 62%);
  pointer-events: none;
}

.console-head {
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.console-title h2 {
  margin: 10px 0 0;
  font-size: clamp(23px, 2.6vw, 32px);
  letter-spacing: -0.03em;
  font-weight: 650;
  line-height: 1.2;
}

.job-id {
  margin: 8px 0 0;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.08em;
  color: rgba(246, 243, 232, 0.4);
}

.console-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 9px;
}

.timer {
  font-family: var(--mono);
  font-size: 20px;
  letter-spacing: 0.05em;
  line-height: 1;
  color: var(--lime);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 9px;
  border: 1px solid rgba(201, 244, 90, 0.45);
  border-radius: 999px;
  font-size: 9px;
  letter-spacing: 0.04em;
  color: var(--lime);
  white-space: nowrap;
}

.status-pill i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  animation: blink 1.1s infinite;
}

.status-pill.success {
  border-color: rgba(201, 244, 90, 0.6);
  background: var(--lime);
  color: var(--ink);
}

.status-pill.success i {
  animation: none;
}

.status-pill.error {
  border-color: rgba(255, 139, 112, 0.5);
  color: #ff8b70;
}

.status-pill.error i {
  animation: none;
}

.steps {
  position: relative;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  list-style: none;
  margin: 28px 0 0;
  padding: 0;
}

.steps li {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 7px;
  padding: 0 0 12px;
  border-bottom: 1px solid rgba(246, 243, 232, 0.14);
  color: rgba(246, 243, 232, 0.38);
  transition: color 0.25s, border-color 0.25s;
}

.steps b {
  font-size: 10.5px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.step-num {
  display: grid;
  place-items: center;
  width: 21px;
  height: 21px;
  border: 1px solid currentColor;
  border-radius: 50%;
  font-family: var(--mono);
  font-size: 7.5px;
  flex: 0 0 auto;
  transition: background 0.25s, color 0.25s, border-color 0.25s, box-shadow 0.25s;
}

.step-line {
  display: none;
}

.steps li.active {
  color: #fff;
  border-bottom-color: var(--lime);
}

.steps li.active .step-num {
  border-color: var(--lime);
  color: var(--lime);
  box-shadow: 0 0 0 4px rgba(201, 244, 90, 0.1);
}

.steps li.done {
  color: var(--lime);
  border-bottom-color: rgba(201, 244, 90, 0.4);
}

.steps li.done .step-num {
  background: var(--lime);
  border-color: var(--lime);
  color: var(--ink);
}

.terminal {
  position: relative;
  margin-top: 22px;
  border: 1px solid rgba(246, 243, 232, 0.13);
  border-radius: 13px;
  background: #0a0a06;
  overflow: hidden;
}

.terminal-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 33px;
  padding: 0 12px;
  background: rgba(246, 243, 232, 0.045);
  border-bottom: 1px solid rgba(246, 243, 232, 0.08);
}

.terminal-dots {
  display: flex;
  gap: 4px;
}

.terminal-dots i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(246, 243, 232, 0.2);
}

.terminal-dots i:first-child {
  background: rgba(199, 70, 47, 0.7);
}

.terminal-dots i:nth-child(2) {
  background: rgba(242, 201, 76, 0.65);
}

.terminal-dots i:nth-child(3) {
  background: rgba(30, 158, 111, 0.65);
}

.terminal-title {
  font-family: var(--mono);
  font-size: 8.5px;
  color: rgba(246, 243, 232, 0.38);
}

.terminal-live {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-left: auto;
  font-family: var(--mono);
  font-size: 7.5px;
  letter-spacing: 0.1em;
  color: var(--lime);
}

.terminal-live::before {
  content: "";
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: currentColor;
  animation: blink 1s infinite;
}

.terminal.finished .terminal-live {
  color: rgba(246, 243, 232, 0.35);
}

.terminal.finished .terminal-live::before {
  animation: none;
}

.terminal-body {
  max-height: 235px;
  min-height: 120px;
  overflow-y: auto;
  padding: 13px 15px 16px;
  font-family: var(--mono);
  font-size: 10.5px;
  line-height: 1.85;
  color: #cbc7b9;
  scrollbar-width: thin;
  scrollbar-color: rgba(246, 243, 232, 0.2) transparent;
}

.terminal-body::-webkit-scrollbar {
  width: 6px;
}

.terminal-body::-webkit-scrollbar-thumb {
  background: rgba(246, 243, 232, 0.18);
  border-radius: 3px;
}

.term-line {
  display: flex;
  gap: 8px;
  white-space: pre-wrap;
  word-break: break-word;
  animation: fade 0.2s ease both;
}

.term-line::before {
  content: "›";
  color: rgba(201, 244, 90, 0.42);
  flex: 0 0 auto;
}

.term-line.ok {
  color: var(--lime);
}

.term-line.err {
  color: #ff8b70;
}

.term-line.warn {
  color: #f2c94c;
}

.term-line.dim {
  color: rgba(246, 243, 232, 0.35);
}

.cursor {
  display: inline-block;
  width: 6px;
  height: 11px;
  background: var(--lime);
  vertical-align: -1px;
  animation: blink 1s steps(2) infinite;
}

.result-card {
  position: relative;
  display: grid;
  grid-template-columns: 60px minmax(0, 1fr) 116px;
  gap: 18px;
  align-items: center;
  margin-top: 22px;
  padding: 20px;
  border-radius: 15px;
  background: var(--lime);
  color: var(--ink);
  animation: rise 0.5s cubic-bezier(0.2, 0.72, 0.2, 1) both;
}

.result-icon {
  width: 60px;
  height: 60px;
  padding: 4px;
  border-radius: 15px;
  background: var(--preview-bg);
  border: 1px solid rgba(20, 20, 15, 0.2);
}

.result-icon-plate {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  padding: 5px;
  border-radius: 11px;
  background: #fff;
  overflow: hidden;
}

.result-icon-plate img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
}

.success-tag {
  display: inline-block;
  padding: 3px 6px;
  border-radius: 3px;
  background: var(--ink);
  color: var(--lime);
  font-family: var(--mono);
  font-size: 7.5px;
  letter-spacing: 0.12em;
}

.result-info h3 {
  margin: 7px 0 0;
  font-size: 20px;
  letter-spacing: -0.02em;
  line-height: 1.25;
  font-weight: 650;
  word-break: break-all;
}

.result-meta {
  margin: 4px 0 0;
  font-family: var(--mono);
  font-size: 9.5px;
  color: rgba(20, 20, 15, 0.62);
  word-break: break-all;
}

.result-meta .mid {
  margin: 0 6px;
}

.result-actions {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 13px;
  flex-wrap: wrap;
}

.download-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 39px;
  padding: 0 15px;
  border-radius: 8px;
  background: var(--ink);
  color: var(--lime);
  font-size: 11.5px;
  font-weight: 500;
  text-decoration: none;
  transition: transform 0.18s, box-shadow 0.18s;
}

.download-btn svg {
  width: 14px;
  height: 14px;
}

.download-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(20, 20, 15, 0.22);
}

.copy-btn {
  height: 39px;
  padding: 0 13px;
  border: 1px solid rgba(20, 20, 15, 0.35);
  border-radius: 8px;
  background: transparent;
  color: var(--ink);
  font-size: 10.5px;
  cursor: pointer;
  transition: border-color 0.18s, background 0.18s;
}

.copy-btn:hover {
  border-color: var(--ink);
  background: rgba(20, 20, 15, 0.06);
}

.profile-btn {
  display: inline-flex;
  align-items: center;
  height: 39px;
  padding: 0 13px;
  border: 1px dashed rgba(20, 20, 15, 0.45);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.28);
  color: var(--ink);
  font-size: 10.5px;
  text-decoration: none;
  transition: background 0.18s, border-color 0.18s, transform 0.18s;
}

.profile-btn:hover {
  border-color: var(--ink);
  background: rgba(255, 255, 255, 0.55);
  transform: translateY(-1px);
}

.install-tip {
  margin: 9px 0 0;
  max-width: 460px;
  font-size: 8.5px;
  line-height: 1.65;
  color: rgba(20, 20, 15, 0.58);
}

.contact-note {
  margin: 8px 0 0;
  font-family: var(--mono);
  font-size: 8.5px;
  line-height: 1.6;
  color: rgba(20, 20, 15, 0.58);
  word-break: break-all;
}

.qr-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 8px;
  border-radius: 10px;
  background: #fff;
}

.qr-box img {
  width: 100px;
  height: 100px;
  display: block;
}

.qr-box span {
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.error-card {
  display: flex;
  gap: 15px;
  margin-top: 22px;
  padding: 20px;
  border: 1px solid rgba(255, 139, 112, 0.4);
  border-radius: 15px;
  background: rgba(199, 70, 47, 0.12);
  animation: rise 0.4s ease both;
}

.error-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1.5px solid #ff8b70;
  border-radius: 50%;
  color: #ff8b70;
  font-size: 20px;
  font-weight: 600;
  flex: 0 0 auto;
}

.error-tag {
  font-family: var(--mono);
  font-size: 7.5px;
  letter-spacing: 0.12em;
  color: #ff8b70;
}

.error-card h3 {
  margin: 6px 0 0;
  font-size: 17px;
  letter-spacing: -0.02em;
  font-weight: 600;
}

.error-card p {
  margin: 6px 0 0;
  font-family: var(--mono);
  font-size: 9.5px;
  line-height: 1.7;
  color: rgba(246, 243, 232, 0.62);
  word-break: break-word;
}

.retry-btn {
  margin-top: 13px;
  height: 34px;
  padding: 0 13px;
  border: 1px solid var(--lime);
  border-radius: 7px;
  background: transparent;
  color: var(--lime);
  font-size: 10px;
  cursor: pointer;
  transition: background 0.18s, color 0.18s;
}

.retry-btn:hover {
  background: var(--lime);
  color: var(--ink);
}

/* ---------- 构建记录 ---------- */

.history,
.guide {
  margin-top: clamp(56px, 7vw, 88px);
  scroll-margin-top: 92px;
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}

.section-head h2 {
  margin: 9px 0 0;
  font-size: clamp(26px, 3vw, 36px);
  line-height: 1.15;
  letter-spacing: -0.04em;
  font-weight: 650;
}

.refresh-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 33px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: transparent;
  color: var(--ink-soft);
  font-size: 10px;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}

.refresh-btn svg {
  width: 12px;
  height: 12px;
}

.refresh-btn:hover {
  border-color: var(--ink);
  background: rgba(252, 251, 246, 0.7);
}

.refresh-btn.loading svg {
  animation: spin 0.8s linear infinite;
}

.history-list {
  border-top: 1px solid var(--line-strong);
}

.history-row {
  display: grid;
  grid-template-columns: 34px 48px minmax(0, 1fr) 130px 78px 86px;
  gap: 16px;
  align-items: center;
  padding: 12px 8px;
  border-bottom: 1px solid var(--line);
  transition: background 0.18s;
}

.history-row:hover {
  background: rgba(252, 251, 246, 0.55);
}

.history-index {
  font-family: var(--mono);
  font-size: 8.5px;
  color: var(--muted);
}

.history-icon {
  width: 42px;
  height: 42px;
  padding: 3px;
  border-radius: 11px;
  background: var(--row-theme, #12a47a);
  border: 1px solid rgba(20, 20, 15, 0.16);
}

.history-icon .history-plate {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  padding: 4px;
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}

.history-icon img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
}

.history-letter {
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1;
}

.history-main {
  min-width: 0;
}

.history-name {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.platform-chip {
  display: inline-flex;
  align-items: center;
  padding: 2px 5px;
  border: 1px solid var(--line-strong);
  border-radius: 3px;
  font-family: var(--mono);
  font-size: 7px;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: 0.03em;
  color: var(--muted);
  flex: 0 0 auto;
}

.platform-chip.ios {
  border-color: var(--ink);
  background: var(--panel);
  color: var(--ink);
}

.platform-chip.android {
  border-color: transparent;
  background: rgba(201, 244, 90, 0.4);
  color: var(--ink-soft);
}

.history-host {
  margin-top: 2px;
  font-family: var(--mono);
  font-size: 8.5px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 6px;
  border-radius: 4px;
  font-size: 8px;
  line-height: 1;
  white-space: nowrap;
  font-weight: 500;
}

.status-chip.success {
  background: rgba(20, 125, 88, 0.1);
  color: var(--green);
}

.status-chip.error {
  background: rgba(199, 70, 47, 0.1);
  color: var(--red);
}

.status-chip.building {
  background: rgba(195, 161, 58, 0.13);
  color: #8c6b12;
}

.status-chip::before {
  content: "";
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: currentColor;
}

.history-date,
.history-size {
  font-family: var(--mono);
  font-size: 8.5px;
  color: var(--muted);
  white-space: nowrap;
}

.history-action {
  justify-self: end;
}

.history-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}

.history-actions .row-download {
  height: 25px;
  font-size: 8px;
}

.row-download {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 29px;
  padding: 0 9px;
  border: 1px solid var(--ink);
  border-radius: 6px;
  background: transparent;
  color: var(--ink);
  font-family: var(--mono);
  font-size: 8.5px;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.18s, color 0.18s;
}

.row-download:hover {
  background: var(--ink);
  color: var(--lime);
}

.row-download.secondary {
  border-style: dashed;
  border-color: var(--line-strong);
  color: var(--muted);
}

.row-download.secondary:hover {
  border-color: var(--ink);
  background: transparent;
  color: var(--ink);
}

.row-download.disabled {
  border-color: var(--line);
  color: var(--muted);
  pointer-events: none;
  opacity: 0.7;
}

.history-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 48px 20px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  text-align: center;
}

.empty-mark {
  font-family: var(--mono);
  font-size: 23px;
  color: var(--line-strong);
}

.history-empty p {
  margin: 0;
  font-size: 10.5px;
}

/* ---------- 使用说明 ---------- */

.guide-note {
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.guide-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(22px, 3vw, 44px);
  border-top: 1px solid var(--line-strong);
  padding-top: 20px;
}

.guide-grid article {
  position: relative;
}

.guide-num {
  display: block;
  font-family: var(--serif);
  font-size: 30px;
  line-height: 1;
  color: var(--line-strong);
  letter-spacing: -0.04em;
}

.guide-grid h3 {
  margin: 12px 0 0;
  font-size: 16px;
  letter-spacing: -0.02em;
  font-weight: 600;
}

.guide-grid p {
  margin: 8px 0 0;
  max-width: 320px;
  font-size: 11.5px;
  line-height: 1.85;
  color: var(--muted);
}

/* ---------- 页脚 ---------- */

.footer {
  position: relative;
  z-index: 1;
  max-width: 1320px;
  margin: 76px auto 0;
  padding: 22px clamp(18px, 4vw, 48px) 40px;
  border-top: 1px solid var(--line-strong);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 11.5px;
  font-weight: 600;
}

.footer-brand em {
  font-family: var(--mono);
  font-size: 7.5px;
  font-style: normal;
  font-weight: 400;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin-left: 4px;
}

.footer-note {
  margin: 0;
  font-family: var(--mono);
  font-size: 7.5px;
  letter-spacing: 0.12em;
  color: var(--muted);
}

.footer-local {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  font-size: 9px;
  color: var(--muted);
}

.footer-local i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #1e9e6f;
}

/* ---------- Toast ---------- */

.toast {
  position: fixed;
  left: 50%;
  bottom: 26px;
  z-index: 100;
  transform: translate(-50%, 16px);
  max-width: calc(100vw - 36px);
  padding: 10px 16px;
  border: 1px solid rgba(201, 244, 90, 0.4);
  border-radius: 999px;
  background: var(--ink);
  color: #f6f3e8;
  font-size: 10.5px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s, transform 0.25s;
  box-shadow: 0 12px 32px rgba(20, 20, 15, 0.25);
}

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

.toast.error {
  border-color: rgba(255, 139, 112, 0.55);
}

/* ---------- 动画 ---------- */

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-6px);
  }
}

@keyframes pulse {
  0%,
  100% {
    opacity: 0.25;
    transform: translateY(0);
  }
  40% {
    opacity: 1;
    transform: translateY(-2px);
  }
}

@keyframes blink {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.25;
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ---------- 响应式 ---------- */

@media (max-width: 1180px) {
  .builder-grid {
    grid-template-columns: minmax(0, 1fr) 214px;
  }

  .phone {
    width: 194px;
    height: 396px;
  }

  .hero h1 {
    font-size: clamp(46px, 5.1vw, 64px);
  }
}

@media (max-width: 1020px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 38px;
    padding-top: 44px;
  }

  .hero-copy {
    max-width: 760px;
  }

  .hero h1 {
    font-size: clamp(48px, 7vw, 68px);
  }

  .lede {
    max-width: 520px;
  }

  .builder {
    max-width: 780px;
    margin-inline: auto;
  }

  .nav-links {
    gap: 22px;
  }
}

@media (max-width: 820px) {
  .builder-grid {
    grid-template-columns: 1fr;
  }

  .preview {
    padding-left: 0;
    padding-top: 18px;
    border-left: 0;
    border-top: 1px dashed var(--line-strong);
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-rows: auto 1fr auto;
    column-gap: 20px;
    align-items: center;
  }

  .preview-head {
    grid-column: 1 / -1;
  }

  .phone-wrap {
    grid-column: 2;
    grid-row: 2 / 4;
  }

  .preview-caption {
    grid-column: 1;
    align-self: end;
    flex-direction: column;
    align-items: flex-start;
    gap: 3px;
    border-top: 0;
    padding-top: 0;
    margin-top: 0;
  }

  .preview::after {
    content: "启动页会使用主题色作为背景，图标居中显示。关闭启动页后将直接进入网页视图。";
    grid-column: 1;
    grid-row: 2;
    align-self: start;
    max-width: 250px;
    font-size: 10px;
    line-height: 1.8;
    color: var(--muted);
  }

  .phone {
    width: 192px;
    height: 392px;
  }

  .result-card {
    grid-template-columns: 54px minmax(0, 1fr);
  }

  .qr-box {
    grid-column: 2;
    justify-self: start;
    flex-direction: row;
    gap: 8px;
    padding: 5px 8px;
  }

  .qr-box img {
    width: 62px;
    height: 62px;
  }

  .qr-box span {
    writing-mode: initial;
  }
}

@media (max-width: 680px) {
  .nav {
    height: 64px;
  }

  .nav-links {
    display: none;
  }

  .brand-text small {
    display: none;
  }

  .engine-pill {
    padding: 6px 9px;
    font-size: 9.5px;
  }

  .hero {
    padding-top: 34px;
  }

  .hero h1 {
    font-size: clamp(42px, 11.5vw, 58px);
  }

  .hero h1 .line:nth-child(2) {
    padding-left: 0.12em;
  }

  .lede {
    font-size: 13.5px;
  }

  .pipeline {
    margin-top: 28px;
  }

  .builder {
    padding: 16px;
    border-radius: 18px;
    box-shadow: 6px 6px 0 rgba(20, 20, 15, 0.07);
  }

  .builder-head h2 {
    font-size: 18px;
  }

  .field-row {
    grid-template-columns: 1fr;
  }

  .field-row .field + .field {
    margin-top: 10px;
  }

  .opt-grid {
    grid-template-columns: 1fr 1fr;
  }

  .opt span {
    font-size: 9.5px;
    padding: 0 7px;
  }

  .url-row {
    height: 47px;
  }

  .inspect-btn {
    padding: 0 12px;
    font-size: 10.5px;
  }

  .orientation-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .console {
    margin-top: 40px;
    border-radius: 18px;
  }

  .console-head {
    flex-direction: column;
    gap: 12px;
  }

  .console-meta {
    flex-direction: row;
    align-items: center;
    gap: 14px;
  }

  .status-pill {
    margin-top: 2px;
  }

  .steps {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 6px;
    overflow: visible;
    padding-bottom: 0;
    scrollbar-width: none;
  }

  .steps::-webkit-scrollbar {
    display: none;
  }

  .steps li {
    flex: initial;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    padding-bottom: 9px;
  }

  .steps b {
    font-size: 9px;
    white-space: nowrap;
    overflow: visible;
  }

  .install-tip {
    font-size: 9.5px;
  }

  .terminal-body {
    max-height: 190px;
    font-size: 9.5px;
    padding: 11px;
  }

  .result-card {
    grid-template-columns: 1fr;
    padding: 16px;
  }

  .result-icon {
    width: 52px;
    height: 52px;
  }

  .qr-box {
    grid-column: 1;
    justify-self: start;
  }

  .qr-box img {
    width: 78px;
    height: 78px;
  }

  .history-row {
    grid-template-columns: 42px minmax(0, 1fr) 74px;
    gap: 11px;
    padding: 11px 4px;
  }

  .history-index,
  .history-date,
  .history-size {
    display: none;
  }

  .history-action {
    justify-self: end;
  }

  .guide-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .section-head {
    align-items: flex-start;
  }

  .footer {
    margin-top: 56px;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
}

@media (max-width: 430px) {
  .preview {
    display: flex;
    flex-direction: column;
    align-items: stretch;
  }

  .preview::after {
    order: 3;
    margin-top: 10px;
    max-width: none;
  }

  .preview-head {
    order: 0;
  }

  .phone-wrap {
    order: 1;
  }

  .preview-caption {
    order: 2;
    flex-direction: row;
    justify-content: space-between;
    width: 100%;
    margin-top: 10px;
  }

  .phone {
    width: 180px;
    height: 368px;
  }

  .phone-icon {
    width: 68px;
    height: 68px;
    margin-top: 46px;
  }

  .hero-points li {
    font-size: 9.5px;
  }

  .swatches {
    gap: 12px;
  }

  .segmented button {
    padding: 0 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---------- 支付 ---------- */

.pay-note {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 10px 0 0;
  font-size: 9.5px;
  line-height: 1.6;
  color: var(--ink-soft);
}

.payment-off .pay-note {
  display: none;
}

.pay-note b {
  font-weight: 700;
  color: var(--ink);
}

.pay-note-dot {
  flex: 0 0 auto;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--lime-deep);
  box-shadow: 0 0 0 3px rgba(201, 244, 90, 0.25);
}

body.pay-lock {
  overflow: hidden;
}

.pay-modal {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  padding: 20px;
}

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

.pay-mask {
  position: absolute;
  inset: 0;
  background: rgba(20, 20, 15, 0.58);
  backdrop-filter: blur(5px);
  animation: fade 0.2s ease-out;
}

.pay-card {
  position: relative;
  width: min(430px, 100%);
  max-height: calc(100vh - 40px);
  overflow: auto;
  padding: 26px;
  border: 1px solid var(--line-strong);
  border-radius: 24px;
  background: var(--panel);
  box-shadow: 0 30px 70px rgba(20, 20, 15, 0.35);
  animation: rise 0.3s cubic-bezier(0.2, 0.72, 0.2, 1);
}

.pay-card .builder-kicker {
  margin: 0 0 8px;
}

.pay-card h3 {
  margin: 0;
  font-family: var(--serif);
  font-size: 25px;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.pay-sub {
  margin: 6px 0 0;
  font-size: 10px;
  line-height: 1.6;
  color: var(--muted);
}

.pay-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  color: var(--ink-soft);
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
}

.pay-close:hover {
  background: #ece8da;
  transform: rotate(90deg);
}

.pay-close svg {
  width: 14px;
  height: 14px;
}

.pay-amount {
  display: flex;
  align-items: baseline;
  gap: 3px;
  margin: 14px 0 4px;
  font-family: var(--serif);
  color: var(--ink);
}

.pay-amount span {
  font-size: 19px;
  font-weight: 700;
}

.pay-amount strong {
  font-size: 42px;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
}

.pay-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  margin: 16px 0 14px;
  padding: 4px;
  border-radius: 12px;
  background: #ece8da;
}

.pay-tabs.single {
  grid-template-columns: 1fr;
}

.pay-tabs button[hidden] {
  display: none;
}

.pay-tabs button {
  padding: 9px 6px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--ink-soft);
  font-family: var(--sans);
  font-size: 10.5px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.pay-tabs button.active {
  background: var(--ink);
  color: #f6f3e8;
}

.pay-tabs button:disabled {
  opacity: 0.55;
  cursor: wait;
}

.pay-body {
  display: grid;
  grid-template-columns: 164px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
}

.pay-qr-box {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #ffffff;
  overflow: hidden;
}

.pay-qr-box img {
  width: 100%;
  height: 100%;
  padding: 8px;
  object-fit: contain;
}

.pay-qr-state {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px;
  color: var(--muted);
  font-size: 9px;
  text-align: center;
}

.pay-qr-state i {
  width: 18px;
  height: 18px;
  border: 2px solid var(--line-strong);
  border-top-color: var(--ink);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.pay-qr-state.error i {
  display: none;
}

.pay-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.pay-meta div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px dashed var(--line);
  font-size: 9.5px;
  color: var(--muted);
}

.pay-meta div:last-child {
  border-bottom: 0;
}

.pay-meta b {
  color: var(--ink);
  font-weight: 700;
}

.pay-meta code {
  max-width: 130px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: var(--mono);
  font-size: 8.5px;
  color: var(--ink-soft);
}

.pay-hint {
  margin: 14px 0 0;
  font-size: 9.5px;
  line-height: 1.6;
  color: var(--ink-soft);
  text-align: center;
}

.pay-error {
  margin: 10px 0 0;
  padding: 8px 10px;
  border: 1px solid rgba(199, 70, 47, 0.3);
  border-radius: 9px;
  background: rgba(199, 70, 47, 0.07);
  font-size: 9.5px;
  line-height: 1.5;
  color: var(--red);
  text-align: center;
}

.pay-actions {
  display: flex;
  gap: 8px;
  margin-top: 14px;
}

.pay-check {
  flex: 1;
  padding: 12px 14px;
  border: 0;
  border-radius: 11px;
  background: var(--ink);
  color: #f6f3e8;
  font-family: var(--sans);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: transform 0.2s, background 0.2s;
}

.pay-check:hover {
  transform: translateY(-1px);
  background: #2a2a20;
}

.pay-check:disabled {
  opacity: 0.5;
  cursor: wait;
  transform: none;
}

.pay-open {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  padding: 12px 14px;
  border-radius: 11px;
  background: var(--lime);
  color: var(--ink);
  font-size: 10.5px;
  font-weight: 700;
  text-decoration: none;
  transition: transform 0.2s, background 0.2s;
}

.pay-open:hover {
  background: var(--lime-deep);
  transform: translateY(-1px);
}

.pay-open[hidden] {
  display: none;
}

.pay-status {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin-top: 12px;
  font-size: 9.5px;
  color: var(--muted);
}

.pay-status i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--lime-deep);
  animation: blink 1.4s ease-in-out infinite;
}

.pay-status.ok {
  color: var(--green);
}

.pay-status.ok i {
  background: var(--green);
  animation: none;
}

.pay-status.error {
  color: var(--red);
}

.pay-status.error i {
  background: var(--red);
  animation: none;
}

@media (max-width: 560px) {
  .pay-modal {
    padding: 12px;
  }

  .pay-card {
    padding: 22px 18px 18px;
    max-height: calc(100vh - 24px);
  }

  .pay-card h3 {
    font-size: 22px;
  }

  .pay-body {
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 12px;
  }

  .pay-qr-box {
    width: 190px;
  }

  .pay-meta {
    width: 100%;
  }

  .pay-actions {
    flex-wrap: wrap;
  }

  .pay-check {
    flex: 1 0 100%;
    order: 2;
  }

  .pay-open {
    flex: 1 0 100%;
    justify-content: center;
    order: 1;
  }
}

/* ---------- 双平台下载页链接 / 构建记录锁 ---------- */

.share-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  padding: 6px 7px 6px 10px;
  border: 1px solid rgba(20, 20, 15, 0.24);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.34);
}

.share-label {
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.08em;
  color: rgba(20, 20, 15, 0.58);
  white-space: nowrap;
}

#shareUrlInput {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: none;
  background: transparent;
  color: var(--ink);
  font-family: var(--mono);
  font-size: 9.5px;
  text-overflow: ellipsis;
}

.share-row .copy-btn {
  height: 28px;
  padding: 0 9px;
  border-radius: 6px;
  font-size: 9px;
  white-space: nowrap;
}

.history-lock {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 40px 22px;
  border: 1px solid var(--line-strong);
  border-radius: 16px;
  background: var(--panel);
  text-align: center;
}

.lock-mark {
  position: relative;
  width: 46px;
  height: 46px;
  border: 1.5px solid var(--ink);
  border-radius: 50%;
}

.lock-mark::before {
  content: "";
  position: absolute;
  left: 13px;
  top: 21px;
  width: 18px;
  height: 13px;
  border: 2px solid var(--ink);
  border-radius: 2px;
}

.lock-mark::after {
  content: "";
  position: absolute;
  left: 17px;
  top: 12px;
  width: 10px;
  height: 12px;
  border: 2px solid var(--ink);
  border-bottom: 0;
  border-radius: 7px 7px 0 0;
}

.history-lock h3 {
  margin: 2px 0 0;
  font-size: 18px;
  letter-spacing: -0.02em;
}

.history-lock p {
  margin: 0;
  font-size: 10.5px;
  line-height: 1.7;
  color: var(--muted);
}

.lock-form {
  display: flex;
  gap: 7px;
  margin-top: 4px;
}

.lock-form input {
  width: 220px;
  height: 40px;
  padding: 0 11px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-size: 12px;
  outline: none;
}

.lock-form input:focus {
  border-color: var(--ink);
  box-shadow: 0 0 0 3px rgba(201, 244, 90, 0.45);
}

.lock-form button {
  height: 40px;
  padding: 0 16px;
  border: 0;
  border-radius: 8px;
  background: var(--ink);
  color: var(--lime);
  font-size: 11.5px;
  cursor: pointer;
}

.lock-error {
  color: var(--red) !important;
  font-size: 10px !important;
}

.row-delete {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 25px;
  padding: 0 8px;
  border: 1px solid rgba(199, 70, 47, 0.45);
  border-radius: 5px;
  background: transparent;
  color: var(--red);
  font-family: var(--mono);
  font-size: 8px;
  cursor: pointer;
  transition: background 0.18s, color 0.18s;
}

.row-delete:hover {
  background: var(--red);
  color: #fff;
}

.platform-chip.both {
  border-color: var(--ink);
  background: var(--lime);
  color: var(--ink);
}

@media (max-width: 680px) {
  .lock-form {
    flex-direction: column;
    width: 100%;
    max-width: 260px;
  }

  .lock-form input {
    width: 100%;
  }

  .share-row {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .share-row .copy-btn {
    grid-column: 2;
    justify-self: end;
  }
}
