@import url("https://fonts.googleapis.com/css2?family=Noto+Sans+TC:wght@400;500;700;900&family=Noto+Sans:wght@400;500;700;900&display=swap");

:root {
  --bg: #090b0e;
  --panel: #11161b;
  --line: #2a333c;
  --text: #f4f7f5;
  --muted: #bac3be;
  --green: #56f28f;
  --green-dark: #22c55e;
  --btn-text: #06140b;
  --max: 1180px;
}

* { box-sizing: border-box; }
html { color-scheme: dark; }
body {
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 72% 0, rgba(34, 197, 94, .13), transparent 28rem),
    var(--bg);
  font-family: "Noto Sans", "Noto Sans TC", "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.75;
}
html[lang="zh-Hant"] body {
  font-family: "Noto Sans TC", "Noto Sans", "Microsoft JhengHei UI", sans-serif;
}

a { color: inherit; text-decoration: none; }
button { font: inherit; }

.wrap {
  width: min(calc(100% - 40px), var(--max));
  margin-inline: auto;
}

.history-topbar {
  position: sticky;
  z-index: 20;
  top: 0;
  border-bottom: 1px solid rgba(255,255,255,.07);
  background: rgba(9,11,14,.84);
  backdrop-filter: blur(18px);
}
.history-topbar nav {
  min-height: 68px;
  display: flex;
  align-items: center;
  gap: 16px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-right: auto;
  font-weight: 900;
  white-space: nowrap;
}
.brand img {
  width: 38px;
  height: 38px;
  display: block;
  border-radius: 9px;
  object-fit: cover;
  box-shadow: 0 0 22px rgba(86, 242, 143, .22);
}
.history-navlinks {
  display: flex;
  gap: 20px;
  color: #bdc5c0;
  font-size: 14px;
  white-space: nowrap;
}
.history-navlinks a:hover { color: white; }
.history-navlinks a[aria-current="page"] {
  color: var(--green);
  font-weight: 700;
}

.language-switch {
  display: inline-flex;
  align-items: center;
  padding: 3px;
  border: 1px solid #465248;
  border-radius: 9px;
  background: var(--panel);
}
.language-switch button {
  min-width: 48px;
  height: 34px;
  padding: 0 10px;
  border: 0;
  border-radius: 6px;
  color: #aeb8b2;
  background: transparent;
  font-weight: 900;
  cursor: pointer;
}
.language-switch button[aria-pressed="true"] {
  color: var(--btn-text);
  background: var(--green);
}
.language-switch button:focus-visible,
.history-navlinks a:focus-visible,
.brand:focus-visible,
.history-footer a:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 3px;
}

.history-hero {
  padding: 82px 0 54px;
}
.eyebrow {
  display: inline-block;
  color: var(--green);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase;
}
h1 {
  margin: 18px 0 0;
  font-size: clamp(42px, 5.6vw, 68px);
  line-height: 1.08;
  letter-spacing: -.035em;
}
.history-intro {
  max-width: 620px;
  margin: 22px 0 0;
  color: var(--muted);
  font-size: 18px;
}

.history-content {
  padding: 0 0 96px;
}
.version-list {
  display: grid;
  gap: 14px;
  max-width: 860px;
}
.version-section {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
}
.version-section[open] {
  border-color: rgba(86, 242, 143, .42);
  background: linear-gradient(145deg, rgba(86, 242, 143, .08), var(--panel) 48%);
}
summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 24px;
  color: var(--text);
  cursor: pointer;
  font-size: 19px;
  font-weight: 900;
  list-style: none;
}
summary::-webkit-details-marker { display: none; }
summary::after {
  flex: 0 0 auto;
  color: var(--green);
  content: "+";
  font-size: 26px;
  font-weight: 400;
  line-height: 1;
}
.version-section[open] summary::after { content: "−"; }
.release-body {
  padding: 0 24px 25px;
  border-top: 1px solid rgba(255,255,255,.08);
}
.release-meta {
  margin: 20px 0 14px;
  color: var(--green);
  font-size: 14px;
  font-weight: 900;
  letter-spacing: .02em;
}
.update-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding-left: 22px;
  color: var(--muted);
}
.update-list li::marker { color: var(--green); }

.history-footer {
  padding: 34px 0 50px;
  border-top: 1px solid rgba(255,255,255,.07);
  color: #9ca7a1;
  font-size: 13px;
}
.history-footer .wrap {
  display: flex;
  justify-content: space-between;
  gap: 20px;
}
.history-footer a {
  color: var(--green);
  font-weight: 700;
}
.history-footer a:hover { text-decoration: underline; }

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto; }
}

@media (max-width: 980px) {
  .history-topbar nav {
    flex-wrap: wrap;
    padding: 10px 0;
  }
  .history-navlinks {
    order: 3;
    width: 100%;
    gap: 16px;
    overflow-x: auto;
    padding-bottom: 2px;
    -webkit-overflow-scrolling: touch;
    font-size: 13px;
  }
}

@media (max-width: 640px) {
  .wrap { width: min(calc(100% - 28px), var(--max)); }
  .history-hero { padding: 48px 0 38px; }
  h1 { font-size: clamp(36px, 10vw, 48px); }
  .history-intro { font-size: 16px; }
  summary { padding: 19px 18px; font-size: 17px; }
  .release-body { padding: 0 18px 21px; }
  .history-footer .wrap { flex-direction: column; }
}

@media (max-width: 320px) {
  .brand span { font-size: 13px; }
  .history-navlinks { gap: 10px; font-size: 12px; }
  .language-switch button { min-width: 40px; height: 30px; padding: 0 6px; font-size: 13px; }
}
