:root {
  --bg: #f6f7f9; --surface: #ffffff; --text: #1b1f24; --muted: #5b6470; --border: #d9dee5;
  --accent: #255fa8; --accent-text: #ffffff; --accent-soft: #e8f0fb;
  --ok: #1f7a3a; --ok-soft: #e7f5ec; --warn: #8a5a00; --warn-soft: #fdf4e1; --warn-border: #e7c477;
  --danger: #b42318; --danger-soft: #fdecea; --danger-border: #f1aaa3;
  --code-bg: #eef1f5; --radius: 10px;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111418; --surface: #1a1f25; --text: #e6e9ed; --muted: #9aa4b1; --border: #2e3640;
    --accent: #6ea8f0; --accent-text: #0b1420; --accent-soft: #1b2a3d;
    --ok: #58c27d; --ok-soft: #14271b; --warn: #f0c060; --warn-soft: #2a2312; --warn-border: #6b5220;
    --danger: #ff8a7f; --danger-soft: #2d1614; --danger-border: #7a2b24;
    --code-bg: #232a32;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 16px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
.wrap { max-width: 920px; margin: 0 auto; padding: 0 16px; }
a { color: var(--accent); }
code, kbd { font-family: var(--mono); font-size: 0.9em; }
code { background: var(--code-bg); padding: 0.05em 0.35em; border-radius: 4px; }
kbd { border: 1px solid var(--border); border-bottom-width: 2px; border-radius: 4px; padding: 0 0.35em; background: var(--surface); }
.hash { word-break: break-all; }
.muted { color: var(--muted); }
.small { font-size: 0.85em; }
h1, h2, h3, h4 { line-height: 1.25; margin: 0 0 0.5em; }
h2 { font-size: 1.2rem; }
h3 { font-size: 1.1rem; }
h4 { font-size: 1rem; }

.top { background: var(--surface); border-bottom: 1px solid var(--border); margin-bottom: 20px; }
.top .wrap { display: flex; flex-wrap: wrap; gap: 8px 24px; align-items: center; justify-content: space-between; padding-top: 18px; padding-bottom: 14px; }
.top h1 { font-size: 1.45rem; margin: 0; }
.sub { margin: 4px 0 0; color: var(--muted); }
.links { display: flex; gap: 16px; flex-wrap: wrap; }

.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; margin: 0 0 20px; }
.card > p:first-of-type { margin-top: 0; }
.step { display: inline-flex; align-items: center; justify-content: center; width: 1.6em; height: 1.6em; border-radius: 50%; background: var(--accent); color: var(--accent-text); font-size: 0.85em; margin-right: 6px; }

.notice { border-radius: var(--radius); padding: 14px 18px; margin: 0 0 20px; border: 1px solid; }
.notice h2, .notice h4 { margin-bottom: 0.4em; }
.notice ul { margin: 0.3em 0 0; padding-left: 1.2em; }
.notice li + li { margin-top: 0.3em; }
.notice p { margin: 0.4em 0; }
.notice.danger { background: var(--danger-soft); border-color: var(--danger-border); }
.notice.danger h2, .notice.danger h4 { color: var(--danger); }
.notice.warn { background: var(--warn-soft); border-color: var(--warn-border); }
.notice.warn h4 { color: var(--warn); }
.card .notice { margin: 16px 0 0; }

.drop { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; text-align: center;
  border: 2px dashed var(--border); border-radius: var(--radius); padding: 28px 16px; cursor: pointer; transition: border-color .15s, background .15s; }
.drop:hover, .drop:focus, .drop.over { border-color: var(--accent); background: var(--accent-soft); outline: none; }
.drop input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.drop-main { font-weight: 600; }
.drop-hint { color: var(--muted); font-size: 0.9em; }

.fileinfo { margin-top: 16px; }
dl { display: grid; grid-template-columns: max-content 1fr; gap: 4px 16px; margin: 0; }
dt { color: var(--muted); }
dd { margin: 0; min-width: 0; }

.status { margin-top: 14px; padding: 12px 14px; border-radius: 8px; border-left: 4px solid; }
.status.ok { background: var(--ok-soft); border-color: var(--ok); }
.status.ok > strong { color: var(--ok); }
.status.err { background: var(--danger-soft); border-color: var(--danger); }
.status.err > strong { color: var(--danger); }
.status > div { margin-top: 4px; }
.status p { margin: 8px 0 0; }

.rel-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; }
.rel-head h3 { margin: 0; }
.rel-head p { margin: 2px 0 0; }
.badges { display: flex; gap: 6px; flex-wrap: wrap; align-items: flex-start; }
.badge { font-size: 0.8em; font-weight: 600; padding: 3px 9px; border-radius: 999px; border: 1px solid; white-space: nowrap; }
.badge.warn { color: var(--warn); background: var(--warn-soft); border-color: var(--warn-border); }
.badge.danger { color: var(--danger); background: var(--danger-soft); border-color: var(--danger-border); }
.features { margin: 12px 0; padding-left: 1.2em; }
.kv { margin-top: 8px; }

.accept { display: flex; gap: 10px; align-items: flex-start; margin: 18px 0 0; }
.accept input { margin-top: 0.3em; width: 18px; height: 18px; flex: none; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-top: 14px; }
button, .button { font: inherit; font-weight: 600; border-radius: 8px; padding: 10px 20px; border: 1px solid var(--border); background: var(--surface); color: var(--text); cursor: pointer; text-decoration: none; display: inline-block; }
button.primary, .button.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }
button:disabled { opacity: 0.45; cursor: not-allowed; }
button:focus-visible, .button:focus-visible, a:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

.progress { margin-top: 16px; }
.bar { height: 10px; background: var(--code-bg); border-radius: 999px; overflow: hidden; }
.bar span { display: block; height: 100%; width: 0; background: var(--accent); transition: width .15s; }
.prog-line { display: flex; justify-content: space-between; gap: 12px; margin-top: 6px; font-size: 0.92em; }

.table-wrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: 0.95em; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--border); vertical-align: top; }
th { color: var(--muted); font-weight: 600; }

.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.cols ol { padding-left: 1.2em; margin: 0; }
.cols li + li { margin-top: 0.4em; }
.foot { color: var(--muted); font-size: 0.85em; padding-bottom: 32px; }

@media (max-width: 640px) {
  .cols { grid-template-columns: 1fr; }
  .card { padding: 16px; }
  dl { grid-template-columns: 1fr; gap: 0; }
  dt { margin-top: 6px; }
  .hash.small { font-size: 0.75em; }
}
.about h3 { font-size: 1rem; margin: 1.2em 0 0.3em; }
.about ul { margin: 0.3em 0; padding-left: 1.2em; }
.about li + li { margin-top: 0.3em; }
.about p { margin: 0.4em 0; }
