:root {
  --bg: #070707; --card: #121212; --line: #242424; --text: #f2f2f2;
  --muted: #8a8a8a; --faint: #5a5a5a; --ac: #f05020; --ac2: #ff6a3a;
}
* { box-sizing: border-box; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 16px/1.55 -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Hiragino Sans GB", sans-serif;
}
a { color: inherit; text-decoration: none; }
.wrap { width: min(1040px, calc(100% - 48px)); margin: 0 auto; }
header.site {
  display: flex; align-items: center; justify-content: space-between;
  height: 72px; border-bottom: 1px solid var(--line); gap: 16px;
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand img { height: 28px; }
.brand strong { font-size: 14px; letter-spacing: .08em; }
.nav-right { display: flex; align-items: center; gap: 18px; font-size: 13px; color: var(--muted); flex-wrap: wrap; }
.nav-right a:hover { color: var(--text); }
.lang-wrap { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 12px; }
.lang-globe { display: block; flex: 0 0 16px; opacity: .85; }
.lang-sel {
  background: #101010; color: var(--text); border: 1px solid var(--line);
  padding: 6px 8px; font: inherit; border-radius: 2px;
}
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--ac); color: #fff; border: 0; cursor: pointer;
  padding: 10px 16px; font-size: 13px; font-weight: 650; border-radius: 2px;
}
.btn:hover { background: var(--ac2); }
.btn.ghost { background: transparent; border: 1px solid var(--line); color: var(--text); }
h1 { font-size: clamp(28px, 5vw, 42px); letter-spacing: -.04em; margin: 0 0 12px; }
.lede { color: var(--muted); max-width: 36em; }
.card {
  background: var(--card); border: 1px solid var(--line); padding: 28px; margin: 28px 0 64px; max-width: 520px;
}
label { display: block; font-size: 12px; color: var(--muted); margin: 12px 0 6px; }
input, textarea, select {
  width: 100%; background: #101010; border: 1px solid var(--line); color: var(--text);
  padding: 10px 12px; font: inherit; border-radius: 2px;
}
.lang-sel, select.lang-sel {
  width: auto; min-width: 8.5em; max-width: 12em; flex: 0 0 auto;
}
textarea { min-height: 120px; resize: vertical; }
.err { color: var(--ac); font-size: 13px; margin-top: 10px; }
.ok { color: #6ee7b7; font-size: 13px; margin-top: 10px; }
.hint { color: var(--faint); font-size: 13px; line-height: 1.65; }
a.bili-up { color: #e11d48; text-decoration: underline; font-weight: 650; }
a.bili-up:hover { color: #fb7185; }
.row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; color: var(--muted); font-weight: 500; border-bottom: 1px solid var(--line); padding: 8px 6px; }
td { border-bottom: 1px solid #222; padding: 10px 6px; }
code { font-family: ui-monospace, Menlo, monospace; font-size: 12px; }
footer.site {
  border-top: 1px solid var(--line); padding: 24px 0 40px; color: var(--faint); font-size: 12px;
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
}
footer.site a { color: var(--muted); }
footer.site a:hover { color: var(--text); }
#pw-card[hidden] { display: none; }
.serial-block {
  border-bottom: 1px solid var(--line);
  padding: 16px 0 18px;
}
.serial-block:last-child { border-bottom: 0; }
.serial-product {
  font-size: 16px; font-weight: 650; letter-spacing: -.02em; margin: 0 0 6px;
}
.serial-line { color: var(--muted); font-size: 14px; }
.dl-row { margin-top: 12px; align-items: center; }
.dl-row .hint { align-self: center; }
.release-notes { margin: 12px 0 0; padding: 0; background: #0c0c0c; border: 1px solid var(--line); }
.release-notes > summary {
  list-style: none;
  cursor: pointer;
  font-size: 11px;
  letter-spacing: .12em;
  color: var(--ac);
  padding: 12px 14px;
  user-select: none;
  display: flex;
  align-items: center;
  gap: 8px;
}
.release-notes > summary::-webkit-details-marker,
.release-notes > summary::marker { display: none; content: ""; }
.release-notes > summary::before {
  content: "";
  width: 0; height: 0;
  border-style: solid;
  border-width: 5px 0 5px 7px;
  border-color: transparent transparent transparent var(--ac);
  transform: rotate(0deg);
  transition: transform .15s ease;
  flex: 0 0 auto;
}
.release-notes[open] > summary::before { transform: rotate(90deg); }
.release-notes pre {
  margin: 0; padding: 0 14px 12px 29px;
  white-space: pre-wrap; font: 13px/1.65 inherit; color: var(--muted);
}
.pack-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
}
.pack-card {
  background: #0c0c0c;
  border: 1px solid var(--line);
  padding: 18px 16px 16px;
  display: flex;
  flex-direction: column;
  min-height: 188px;
}
.pack-card-title {
  font-size: 15px;
  font-weight: 650;
  letter-spacing: -.02em;
  margin: 0 0 8px;
  line-height: 1.3;
}
.pack-card-sub {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.pack-card-meta {
  color: var(--faint);
  font-size: 12px;
  margin: 12px 0 10px;
}
.pack-card .btn { width: 100%; }
.modal-back {
  position: fixed; inset: 0; background: rgba(0,0,0,.78);
  display: flex; align-items: center; justify-content: center;
  z-index: 40; padding: 24px;
}
.modal-back[hidden] { display: none; }
.modal-card {
  background: var(--card); border: 1px solid var(--line);
  width: min(440px, 100%); padding: 28px; position: relative;
}
.modal-card h2 { margin: 0 0 8px; font-size: 18px; }
@media (max-width: 800px) {
  .wrap { width: calc(100% - 32px); }
  header.site { height: auto; align-items: flex-start; flex-wrap: wrap; padding: 14px 0; }
  .nav-right { width: 100%; justify-content: flex-start; row-gap: 8px; }
}
