body.lbg[data-lp-page="changelog"] {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.lbg-changelog {
  --changelog-gutter: clamp(20px, 4vw, 52px);
  --changelog-indent: clamp(20px, 4vw, 44px);
  width: min(100%, 920px);
  flex: 1;
  margin-inline: auto;
  padding: clamp(48px, 9vw, 108px) var(--changelog-gutter) clamp(64px, 10vw, 116px);
}

.lbg-changelog__header {
  padding-bottom: clamp(22px, 4vw, 38px);
  border-bottom: 1px solid var(--lbg-border);
}

.lbg-changelog__header h1 {
  font-size: clamp(2.15rem, 6vw, 4.5rem);
  line-height: 1.04;
  letter-spacing: -.045em;
  text-wrap: balance;
}

.lbg .lbg-changelog__header p {
  margin-top: 16px;
  color: var(--lbg-soft);
  font-size: clamp(1rem, 2vw, 1.2rem);
  line-height: 1.55;
}

.lbg-changelog__entries {
  margin-top: clamp(24px, 5vw, 44px);
  padding-inline-start: var(--changelog-indent);
  border-inline-start: 1px solid var(--lbg-border);
  line-height: 1.7;
  overflow-wrap: anywhere;
}

.lbg .lbg-changelog__entries .lbg-rich__h {
  position: relative;
  color: var(--lbg-link);
  font-size: clamp(1.3rem, 3vw, 1.75rem);
  margin-top: 1.75em;
}

.lbg .lbg-changelog__entries .lbg-rich__h:first-child {
  margin-top: 0;
}

.lbg-changelog__entries .lbg-rich__h:not(:empty)::before {
  content: "";
  position: absolute;
  inset-inline-start: calc(-1 * var(--changelog-indent) - 5px);
  top: calc(.625em - 4px);
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--lbg-link);
  pointer-events: none;
}

.lbg .lbg-changelog__empty {
  margin-top: clamp(24px, 5vw, 44px);
  color: var(--lbg-muted);
}

body:not(.lp-editing) .lbg-changelog__entries > :is(.lbg-rich__h, .lbg-rich__p, .lbg-rich__list):empty,
body:not(.lp-editing) .lbg-changelog__entries > .lbg-figure.is-empty,
body:not(.lp-editing) .lbg-changelog__entries:not(:has(> [data-lp-part]:not(:empty, .is-empty))),
.lp-editing .lbg-changelog__empty,
.lbg-changelog__entries:has(> [data-lp-part]:not(:empty, .is-empty)) + .lbg-changelog__empty {
  display: none;
}

.lbg-changelog__actions {
  margin-top: 24px;
}

.lbg-changelog button.lbg-btn--primary {
  border: 1px solid transparent;
  cursor: pointer;
}

.lbg .lbg-changelog__edit-entry {
  min-height: 34px;
  padding: 5px 10px;
  font-size: .85rem;
  cursor: pointer;
}

body:not(.lp-editing) .lbg-changelog__edit-entry {
  display: none;
}

.lp-editing .lbg-rich__list {
  white-space: pre-wrap;
}

.lbg-changelog__entries ul,
.lbg-release__sample ul {
  margin: 0;
  padding-inline-start: 1.3em;
  line-height: 1.6;
}

.lbg-changelog__entries li + li,
.lbg-release__sample li + li {
  margin-top: .45em;
}

.lbg-changelog__entries li::marker,
.lbg-release__sample li::marker {
  color: var(--lbg-link);
}

.lbg-release {
  width: min(820px, calc(100% - 24px));
  max-height: calc(100dvh - 24px);
  padding: 0;
  overflow: auto;
  border: 1px solid var(--lbg-border);
  border-radius: 16px;
  background: var(--lbg-header);
  color: var(--lbg-text);
  box-shadow: 0 24px 80px rgb(0 0 0 / 40%);
}

.lbg-release::backdrop {
  background: rgb(0 0 0 / 58%);
}

.lbg-release__header,
.lbg-release__actions {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px clamp(16px, 3vw, 28px);
}

.lbg-release__header {
  justify-content: space-between;
  border-bottom: 1px solid var(--lbg-border);
}

.lbg-release__header h2 {
  font-size: clamp(1.25rem, 3vw, 1.55rem);
  letter-spacing: -.025em;
}

.lbg-release__close {
  flex: 0 0 36px;
  height: 36px;
  border: 1px solid var(--lbg-border);
  border-radius: 50%;
  background: var(--lbg-ghost-bg);
  color: var(--lbg-text);
  font: 1.4rem/1 system-ui, sans-serif;
  cursor: pointer;
}

.lbg-release__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, .85fr);
  gap: clamp(16px, 3vw, 28px);
  padding: 24px clamp(16px, 3vw, 28px);
}

.lbg-release__fields {
  display: grid;
  align-content: start;
  gap: 8px;
}

.lbg-release__fields label,
.lbg-release__preview h3 {
  font-size: .9rem;
  font-weight: 650;
}

.lbg-release__fields label + :is(input, textarea) {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--lbg-border);
  border-radius: 8px;
  background: var(--lbg-bg);
  color: var(--lbg-text);
  font: inherit;
  line-height: 1.5;
}

.lbg-release__tools {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.lbg .lbg-release__tools .lbg-btn,
.lbg .lbg-release__media .lbg-btn {
  min-height: 34px;
  padding: 5px 10px;
  font-size: .85rem;
  cursor: pointer;
}

.lbg-release__link:not([hidden]) {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--lbg-border);
  border-radius: 8px;
}

.lbg [data-release-link-error]:empty {
  display: none;
}

.lbg-release__media:not([hidden]) {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(106px, 100%), 1fr));
  gap: 12px;
  margin-top: 12px;
}

.lbg-release__media figure {
  display: grid;
  justify-items: start;
  gap: 6px;
  margin: 0;
}

.lbg-release__media img {
  display: block;
  max-width: 100%;
  max-height: 144px;
  border-radius: 6px;
  object-fit: contain;
}

.lbg-release__fields label:not(:first-child) {
  margin-top: 10px;
}

.lbg-release textarea {
  resize: vertical;
}

.lbg-release :is(input, textarea, button):focus-visible {
  outline: 2px solid var(--lbg-link);
  outline-offset: 2px;
}

.lbg .lbg-release__fields p,
.lbg [data-release-empty] {
  color: var(--lbg-muted);
  font-size: .85rem;
  line-height: 1.5;
}

.lbg-release__preview {
  display: grid;
  align-content: start;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--lbg-border);
  border-radius: 10px;
  background: var(--lbg-bg);
  overflow-wrap: anywhere;
}

.lbg-release__sample {
  min-width: 0;
  padding-inline-start: 14px;
  border-inline-start: 2px solid var(--lbg-link);
}

.lbg [data-release-period]:not(:empty) {
  margin-bottom: 10px;
  color: var(--lbg-link);
  font-size: 1.1rem;
  font-weight: 700;
}

.lbg .lbg-release__error:not(:empty) {
  margin: 0 clamp(16px, 3vw, 28px) 12px;
  color: #e57373;
}

html[data-theme="light"] .lbg .lbg-release__error {
  color: #9b2626;
}

.lbg-release__actions {
  position: sticky;
  bottom: 0;
  justify-content: flex-end;
  flex-wrap: wrap;
  border-top: 1px solid var(--lbg-border);
  background: var(--lbg-header);
}

.lbg-release button:disabled {
  opacity: .7;
  cursor: wait;
}

@media (max-width: 620px) {
  .lbg-release__grid {
    grid-template-columns: minmax(0, 1fr);
    padding-block: 16px;
  }
}
