.changelog-hero.container,
.release-top-controls.container,
.release-layout.container {
  max-width: 1040px;
}
.changelog-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-top: 40px;
  margin-bottom: 16px;
  justify-content: center;
  min-height: 200px;
  padding: 42px 24px;
  border-radius: var(--site-radius-panel);
  background: #294337;
  color: #fff;
}
.changelog-hero h1 {
  font-size: 40px;
  line-height: 1.35;
}
.changelog-hero .lead {
  max-width: 42ch;
  margin-top: 10px;
  font-size: 16px;
  color: #fff;
}
/* 中文整句一行；英文桌面端由 site-language.css 在分句处断行。 */
.changelog-hero .lead br {
  display: none;
}
.changelog-hero .category {
  margin-bottom: 12px;
}
.changelog-painting {
  position: absolute;
  z-index: -2;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 45%;
}
.changelog-hero::after {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  background: #102c225c;
}
.release-top-controls {
  position: sticky;
  top: 64px; /* 避开吸顶导航栏（.header-inner 高度） */
  z-index: 10;
  background: #fff;
  padding: 10px 0 12px;
  margin-bottom: 8px;
}
.release-top-controls > div {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
.release-month-filters {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  max-width: 100%;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 4px;
}
.release-month-filters::-webkit-scrollbar {
  display: none;
}
.release-month-filters.has-more-right {
  -webkit-mask-image: linear-gradient(
    to right,
    #000 calc(100% - 32px),
    transparent
  );
  mask-image: linear-gradient(to right, #000 calc(100% - 32px), transparent);
}
.release-month-filters button {
  flex-shrink: 0;
}
.release-month-filters button {
  min-height: 36px;
  padding: 7px 16px;
  border: 1px solid var(--line);
  border-radius: var(--control-radius);
  background: #fff;
  font-size: 13px;
  line-height: 20px;
  color: var(--muted);
  transition:
    background 140ms ease,
    color 140ms ease;
}
.release-month-filters button:hover,
.release-month-filters button:focus-visible {
  border-color: #aab9bb;
  background: var(--soft);
  color: var(--ink);
}
.release-month-filters button[aria-pressed="true"] {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}
.release-status {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 0;
  font-size: 12px;
  line-height: 20px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.release-status::before,
.release-status::after {
  content: "";
  flex: 1;
  min-width: 16px;
  height: 1px;
  background: var(--line);
}
.release-layout {
  --release-meta-width: 192px;
  --release-column-gap: 48px;
  position: relative;
  padding-bottom: 64px;
}
.release-controls[hidden],
.release-top-controls[hidden],
.release-list > article[hidden] {
  display: none;
}

/* The waveform floats outside the reading column and appears on interaction. */
.release-controls {
  position: fixed;
  right: max(4px, calc((100vw - 1040px) / 2 - 60px));
  top: 50%;
  /* Shift up (and shrink via --bottom-inset on row height) while the footer
     is on screen so the ticks never overlap it. */
  transform: translateY(calc(-50% - var(--bottom-inset, 0px) / 2));
  width: 48px;
  z-index: 11;
  opacity: 0;
  transition: opacity 180ms ease;
}
.release-controls.is-visible,
.release-controls:hover,
.release-controls:has(button:focus-visible) {
  opacity: 1;
}
.version-nav {
  position: relative;
  padding-top: 0;
}
/* Hover buffer around the ticks so the wave doesn't drop when the pointer
   strays a little off the control column — one uniform inset on all sides:
   enough to cover the longest expanded tick plus a little room. */
.version-nav::after {
  content: "";
  position: absolute;
  top: -32px;
  bottom: -32px;
  left: -32px;
  right: -32px;
  /* Behind the tick buttons so clicks still reach them. */
  z-index: -1;
}
.version-nav-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  list-style: none;
  margin: 0;
  padding: 0;
}
.version-nav-list button {
  position: relative;
  display: block;
  width: 100%;
  height: clamp(
    6px,
    calc((100dvh - 160px - var(--bottom-inset, 0px)) / 48),
    12px
  );
  padding: 0;
  border: 0;
  background: none;
  cursor: default;
  overflow: visible;
}
.version-nav-list button::before {
  content: "";
  position: absolute;
  right: 0;
  top: calc(50% - 1px);
  width: var(--wave-width, 11.2px);
  height: 2px;
  border-radius: 2px;
  background: color-mix(in srgb, var(--ink) var(--wave-intensity, 0%), #d0d7d8);
  transition:
    width 120ms ease-out,
    background-color 120ms ease-out;
}
.version-nav-list button:focus-visible {
  outline-offset: 2px;
  border-radius: 2px;
}
.version-tooltip {
  position: absolute;
  left: calc(100% + 8px);
  top: 0;
  transform: translateY(var(--tooltip-y, 0px)) translateY(-50%);
  width: max-content;
  max-width: min(340px, 60vw);
  padding: 8px 12px;
  border-radius: var(--site-radius-small);
  background: var(--ink);
  color: #fff;
  font-size: 12px;
  line-height: 1.6;
  text-align: left;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition:
    transform 140ms ease-out,
    opacity 100ms ease;
  z-index: 1;
}
.version-tooltip.flip-left {
  left: auto;
  right: calc(100% + 8px);
}
.version-tooltip.is-visible {
  opacity: 1;
  visibility: visible;
}
.version-nav-list button.active::before {
  width: var(--wave-width, 19.2px);
  background: color-mix(
    in srgb,
    var(--ink) var(--wave-intensity, 100%),
    #d0d7d8
  );
}

/* Right sidebar: removed sticky card, reactions now inline with each article */
.release-reactions {
  display: none;
}

/* Inline reaction trigger for each article */
.release-list > article {
  position: relative;
}
.release-reaction-trigger {
  position: absolute;
  right: 0;
  top: 48px;
  width: 32px;
  height: 32px;
  border: 1px solid var(--line);
  border-radius: var(--control-radius);
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  cursor: pointer;
  transition: all 160ms ease;
  opacity: 0.4;
}
.release-reaction-trigger[hidden] {
  display: none;
}
.release-reaction-trigger:hover {
  opacity: 1;
  background: #f8f9f9;
  border-color: #d0d7d8;
  transform: scale(1.1);
}
.release-reaction-menu {
  position: absolute;
  right: 0;
  top: 48px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--site-radius-control);
  padding: 8px;
  box-shadow: var(--site-shadow-overlay);
  display: none;
  gap: 6px;
  z-index: 50;
}
.release-reaction-menu.open {
  display: flex;
}
.release-reaction-menu button {
  width: 40px;
  height: 40px;
  border: 0;
  background: none;
  font-size: 24px;
  cursor: pointer;
  border-radius: var(--control-radius);
  transition: all 140ms ease;
  display: flex;
  align-items: center;
  justify-content: center;
}
.release-reaction-menu button:hover {
  background: #f0f8f5;
  transform: scale(1.15);
}
.release-reaction-stickers {
  position: absolute;
  right: 40px;
  top: 48px;
  pointer-events: none;
  width: 200px;
  height: 200px;
}
.reaction-sticker {
  position: absolute;
  font-size: var(--size, 28px);
  transform: rotate(var(--rotation, 0deg));
  animation: stickerPop 300ms cubic-bezier(0.34, 1.56, 0.64, 1);
  pointer-events: auto;
  cursor: default;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}
@keyframes stickerPop {
  from {
    transform: rotate(var(--rotation, 0deg)) scale(0);
    opacity: 0;
  }
  to {
    transform: rotate(var(--rotation, 0deg)) scale(1);
    opacity: 1;
  }
}
.release-list {
  min-width: 0;
  max-width: none;
  padding-bottom: 0;
}
.release-list > article {
  grid-template-columns: var(--release-meta-width) minmax(0, 1fr);
  gap: var(--release-column-gap);
  padding: 44px 0;
}
.release-list > article.is-first-visible {
  border-top: 0;
}
.release-list > article > div {
  min-width: 0;
}
.release-meta {
  gap: 8px;
  padding-top: 3px;
  font-size: 18px;
  line-height: 1.5;
  font-variant-numeric: tabular-nums;
}
.release-meta > span {
  font-weight: 600;
  letter-spacing: -0.02em;
}
.release-meta time {
  font-size: 13px;
  line-height: 1.8;
  white-space: nowrap;
}
.release-list h2 {
  font-size: 26px;
  font-weight: 550;
  letter-spacing: -0.025em;
  line-height: 1.45;
  margin: 0 0 10px;
  text-wrap: pretty;
}
.release-list > article > div > p.release-summary {
  font-size: 15px;
  line-height: 1.85;
  margin: 0 0 24px;
  color: var(--muted);
}
.release-list .release-items {
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 15px;
  line-height: 1.9;
  color: #5b6567;
}
.release-items li {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 10px;
}
.release-items li + li {
  margin-top: 14px;
}
.release-kind {
  font-size: 13px;
  line-height: 28.5px;
}
.release-items strong {
  font-weight: 550;
  color: var(--ink);
}
.release-ending {
  display: flex;
  justify-content: center;
  border-top: 1px solid var(--line);
  padding-top: 32px;
}
.release-ending[hidden] {
  display: none;
}
.release-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--control-radius);
  font-size: 13px;
  line-height: 1.7;
  white-space: nowrap;
  color: var(--ink);
  text-decoration: none;
}
.release-more:hover {
  background: var(--soft);
  border-color: #aab9bb;
  text-decoration: none;
}
@media (min-width: 801px) and (max-width: 1100px) {
  .release-layout {
    --release-meta-width: 160px;
    --release-column-gap: 32px;
  }
}
@media (min-width: 801px) and (max-width: 1150px) {
  .release-controls {
    right: 4px;
    width: 40px;
  }
}
@media (max-width: 800px) {
  .changelog-hero {
    min-height: 190px;
    padding-top: 32px;
    padding-bottom: 32px;
  }
  .changelog-hero h1 {
    font-size: 36px;
  }
  .changelog-hero .lead {
    font-size: 14px;
    margin-top: 12px;
  }

  .release-top-controls {
    padding: 8px 0;
    margin-bottom: 8px;
  }
  .release-month-filters {
    justify-content: flex-start;
    flex-wrap: nowrap;
    width: 100%;
    gap: 8px;
    overflow-x: auto;
    padding: 4px;
  }
  .release-month-filters button {
    min-height: 32px;
    padding: 6px 12px;
    font-size: 12px;
    flex-shrink: 0;
  }

  .release-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
    padding-bottom: 48px;
  }
  .release-controls,
  .release-reactions {
    display: none !important;
  }

  .release-list {
    padding-bottom: 48px;
  }
  .release-list > article {
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
    padding: 32px 0 36px;
  }
  .release-meta {
    padding-top: 0;
    align-items: center;
    gap: 16px;
    font-size: 14px;
  }
  .release-meta time {
    font-size: 12px;
  }
  .release-list h2 {
    font-size: 23px;
    margin-bottom: 10px;
  }
  .release-list > article > div > p.release-summary {
    font-size: 15px;
    line-height: 1.9;
    margin-bottom: 24px;
  }
  .release-list .release-items {
    font-size: 15px;
    line-height: 1.95;
  }
  .release-items li {
    grid-template-columns: 20px minmax(0, 1fr);
    gap: 8px;
  }
  .release-items li + li {
    margin-top: 14px;
  }
  .release-kind {
    font-size: 14px;
  }
  .release-ending {
    padding-top: 28px;
    padding-left: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .release-controls,
  .release-month-filters button,
  .version-nav-list button::before,
  .version-tooltip,
  .reaction-button {
    transition: none;
  }
}
