:root {
  --bg: #f4f5f7;
  --card: #ffffff;
  --ink: #1d262c;
  --muted: #66727b;
  --line: #dde2e7;
  --orange: #e8622a;
  --orange-dark: #c74d17;
  --green: #1f8a4c;
  --red: #c8321f;
  --blue: #2764b7;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}
* { box-sizing: border-box; }
html { color-scheme: light; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.6 -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", "Segoe UI", sans-serif;
}
a { color: var(--blue); }
code { font-family: var(--mono); font-size: 13px; background: #eef1f4; padding: 1px 5px; border-radius: 4px; }
pre { font-family: var(--mono); font-size: 13px; background: #eef1f4; padding: 10px 12px; border-radius: 6px; overflow-x: auto; margin: 6px 0; }

.site-header {
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  padding: 12px 24px; background: var(--card); border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; }
.brand-mark {
  display: flex; align-items: center; justify-content: center;
  width: 38px; height: 34px; background: var(--orange); color: #fff;
  font-size: 18px; font-style: italic; font-weight: 900;
  clip-path: polygon(12% 0, 100% 0, 88% 100%, 0 100%); transform: skew(-6deg);
}
.brand strong, .brand small { display: block; }
.brand strong { font-size: 15px; letter-spacing: .03em; }
.brand small { color: var(--muted); font-size: 11px; margin-top: 2px; }
.site-header nav { display: flex; gap: 22px; }
.site-header nav a { color: #3f4e57; font-weight: 650; font-size: 14px; text-decoration: none; }
.site-header nav a:hover { color: var(--orange-dark); }

.column { max-width: 860px; margin: 0 auto; padding: 24px 16px 40px; }
.intro h1 { font-size: 22px; line-height: 1.4; margin: 6px 0 10px; }
.intro p { margin: 6px 0; color: #3f4e57; }
.version-line strong { color: var(--orange-dark); }
.version-line span { color: var(--muted); font-size: 13px; }

.card {
  background: var(--card); border: 1px solid var(--line); border-radius: 10px;
  padding: 20px 22px; margin-top: 18px;
}
.card h2 { font-size: 17px; margin: 0 0 8px; display: flex; align-items: center; gap: 10px; }
.step {
  display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; border-radius: 50%; background: var(--orange); color: #fff;
  font-size: 14px; font-weight: 800;
}
.hint { color: var(--muted); font-size: 13.5px; margin: 4px 0 10px; }

.notice { border-radius: 8px; padding: 12px 14px; margin-top: 16px; font-size: 14px; }
.notice.warn { background: #fff5e8; border: 1px solid #f5cf9b; color: #7a4a0c; }
.notice.error { background: #fdecea; border: 1px solid #f3b3aa; color: #7a1d12; }

.drop-zone {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  border: 2px dashed #c6ced6; border-radius: 10px; padding: 26px 16px; cursor: pointer;
  background: #fafbfc; transition: border-color .15s, background .15s; text-align: center;
}
.drop-zone:hover, .drop-zone.drag-over { border-color: var(--orange); background: #fff8f3; }
.drop-zone input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.drop-zone.busy { pointer-events: none; opacity: .7; }
.drop-zone.small { padding: 16px 16px; flex-direction: row; gap: 10px; }
.drop-zone.small .drop-icon { font-size: 22px; }
.drop-icon { font-size: 30px; }
.drop-text { font-weight: 650; }
.drop-file { font-family: var(--mono); font-size: 13px; color: var(--muted); word-break: break-all; }

.status-list { margin-top: 10px; }
.status-list:empty { margin: 0; }
.status { display: flex; gap: 8px; align-items: flex-start; padding: 6px 0; font-size: 14px; border-top: 1px solid #eef1f4; }
.status:first-child { border-top: 0; }
.status .icon { flex: 0 0 20px; text-align: center; font-weight: 800; }
.status.ok .icon { color: var(--green); }
.status.bad .icon { color: var(--red); }
.status.info .icon { color: var(--blue); }
.status .body { flex: 1; min-width: 0; }
.status .mono { font-family: var(--mono); font-size: 12.5px; color: var(--muted); word-break: break-all; }

.progress { margin-top: 12px; }
.progress-title { font-size: 13.5px; font-weight: 650; color: #3f4e57; margin-bottom: 6px; }
.bar { height: 10px; background: #e6eaee; border-radius: 6px; overflow: hidden; }
.fill { height: 100%; width: 0; background: linear-gradient(90deg, var(--orange), #f39a5a); transition: width .2s; }
.progress-text { font-size: 13px; color: var(--muted); margin-top: 6px; font-variant-numeric: tabular-nums; }

.patch-info { border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; background: #fafbfc; }
.patch-info p { margin: 4px 0; }
.patch-info .mono { font-family: var(--mono); font-size: 12.5px; color: var(--muted); word-break: break-all; }
.patch-info .title { font-weight: 700; }

.actions { display: flex; gap: 10px; margin-top: 14px; flex-wrap: wrap; }
button { font: inherit; border-radius: 8px; padding: 9px 18px; cursor: pointer; border: 1px solid transparent; }
button.primary { background: var(--orange); color: #fff; font-weight: 700; }
button.primary:hover:not(:disabled) { background: var(--orange-dark); }
button.primary:disabled { background: #d9dee3; color: #8a949c; cursor: not-allowed; }
button.secondary { background: #fff; border-color: var(--line); color: #3f4e57; }
button.inline { padding: 4px 10px; font-size: 13px; margin-top: 4px; }
button.secondary:disabled { color: #8a949c; cursor: default; }

.result { margin-top: 14px; border-radius: 8px; padding: 14px 16px; }
.result.ok { background: #ecf8f0; border: 1px solid #bfe3cc; }
.result.bad { background: #fdecea; border: 1px solid #f3b3aa; }
.result h3 { margin: 0 0 6px; font-size: 16px; }
.result p { margin: 4px 0; }
.result .mono { font-family: var(--mono); font-size: 12.5px; word-break: break-all; }
.result a.download { display: inline-block; margin-top: 8px; font-weight: 700; }

.manual-list .item { border-top: 1px solid #eef1f4; padding: 10px 0; }
.manual-list .item:first-child { border-top: 0; }
.manual-list .item strong { display: block; }
.manual-list .mono { font-family: var(--mono); font-size: 12.5px; color: var(--muted); word-break: break-all; }

#manual ul { margin: 6px 0 8px; padding-left: 20px; }
#manual li { margin: 3px 0; }
dl { margin: 0; }
dt { font-weight: 700; margin-top: 10px; }
dd { margin: 2px 0 0; color: #3f4e57; }

.site-footer { max-width: 860px; margin: 0 auto; padding: 0 16px 40px; color: var(--muted); font-size: 12.5px; }
.site-footer p { margin: 4px 0; }

@media (max-width: 640px) {
  .site-header { padding: 10px 14px; }
  .site-header nav { gap: 14px; }
  .brand small { display: none; }
  .card { padding: 16px 14px; }
  .intro h1 { font-size: 19px; }
}
