.footer-version {
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

.footer-version:hover,
.footer-version:focus-visible {
  color: var(--primary);
}

html.changelog-open {
  overflow: hidden;
}

.changelog-dialog {
  position: fixed;
  inset: 0;
  width: min(32rem, calc(100% - 32px));
  max-width: none;
  height: 85dvh;
  max-height: none;
  margin: auto;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface-card);
  color: var(--body);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.changelog-dialog[open] {
  display: flex;
  flex-direction: column;
}

.changelog-dialog::backdrop {
  background: rgba(10, 10, 10, 0.5);
}

.changelog-header {
  position: relative;
  flex-shrink: 0;
  padding: 24px 56px 16px 24px;
}

.changelog-header h2 {
  margin: 0;
  color: var(--foreground);
  font-size: 18px;
  font-weight: 600;
}

.changelog-header p {
  margin: 4px 0 0;
  color: var(--helper);
  font-size: 14px;
}

.changelog-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 50%;
  background: none;
  color: var(--helper);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.changelog-close:hover,
.changelog-close:focus-visible {
  background: var(--secondary);
  color: var(--foreground);
}

.changelog-body {
  flex: 1;
  min-height: 0;
  padding: 0 24px 24px;
  overflow-y: auto;
  overscroll-behavior: contain;
  font-size: 14px;
  line-height: 1.5;
}

.changelog-entry + .changelog-entry {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.changelog-meta {
  display: flex;
  align-items: center;
  gap: 8px;
}

.changelog-meta time {
  color: var(--helper);
  font-weight: 500;
}

.changelog-version {
  padding: 1px 8px;
  border-radius: 999px;
  background: var(--secondary);
  color: var(--foreground);
  font-size: 12px;
  font-weight: 500;
}

.changelog-description {
  margin: 12px 0 0;
  color: var(--foreground);
}

.changelog-section {
  margin: 16px 0 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--foreground);
}

.changelog-entry ul {
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
}

.changelog-entry li {
  position: relative;
  padding-left: 16px;
}

.changelog-entry li + li {
  margin-top: 8px;
}

.changelog-entry li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: var(--helper);
}

@media (max-width: 639px) {
  .changelog-dialog {
    width: 100%;
    margin: auto 0 0;
    border-width: 1px 0 0;
    border-radius: 16px 16px 0 0;
  }
}
