/* Human Empire changelog — isolated component styles */

.empire-changelog {
  --archive-ink: #080b10;
  --archive-ink-soft: #111721;
  --archive-paper: #eee6d2;
  --archive-paper-muted: #b8ad95;
  --archive-gold: #d3b553;
  --archive-gold-bright: #f2d56d;
  --archive-red: #941d2c;
  --archive-line: rgba(211, 181, 83, 0.28);
  --changelog-progress: 0;
  font-family:
    "Noto Sans SC",
    "Microsoft YaHei",
    system-ui,
    sans-serif;
}

.empire-changelog *,
.empire-changelog *::before,
.empire-changelog *::after {
  box-sizing: border-box;
}

.changelog-widget[hidden],
.changelog-overlay[hidden] {
  display: none !important;
}

.changelog-widget {
  position: fixed;
  z-index: 10020;
  top: -7px;
  left: 50%;
  width: min(352px, calc(100vw - 24px));
  min-height: 86px;
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr) auto 16px;
  align-items: center;
  gap: 8px;
  padding: 10px 16px 10px 6px;
  border: 1px solid rgba(211, 181, 83, 0.4);
  border-top: 0;
  border-radius: 0 0 18px 18px;
  color: #f4ecd9;
  background:
    linear-gradient(90deg, transparent 0 31%, rgba(211, 181, 83, 0.1) 50%, transparent 69%)
      0 100% / 180% 1px no-repeat,
    linear-gradient(135deg, rgba(255, 255, 255, 0.045), transparent 36%),
    rgba(8, 11, 16, 0.94);
  box-shadow:
    0 18px 42px rgba(2, 5, 9, 0.28),
    inset 0 -1px 0 rgba(255, 255, 255, 0.04);
  -webkit-backdrop-filter: blur(18px) saturate(115%);
  backdrop-filter: blur(18px) saturate(115%);
  transform: translateX(-50%);
  transform-origin: 50% 0;
  cursor: pointer;
  isolation: isolate;
  animation: changelog-hang-in 0.92s cubic-bezier(0.16, 1, 0.3, 1) both;
  transition:
    border-color 0.28s ease,
    box-shadow 0.28s ease,
    background-color 0.28s ease;
}

.changelog-widget::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 7px;
  border: 1px solid rgba(211, 181, 83, 0.12);
  border-top: 0;
  border-radius: 0 0 12px 12px;
  pointer-events: none;
}

.changelog-widget::after {
  content: "";
  position: absolute;
  left: 102px;
  right: 18px;
  bottom: -1px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--archive-gold-bright), transparent);
  transform: scaleX(0.12);
  opacity: 0.45;
  transition:
    transform 0.45s cubic-bezier(0.16, 1, 0.3, 1),
    opacity 0.3s ease;
}

.changelog-widget:hover,
.changelog-widget:focus-visible {
  border-color: rgba(242, 213, 109, 0.75);
  outline: none;
  box-shadow:
    0 23px 56px rgba(2, 5, 9, 0.34),
    0 0 0 3px rgba(211, 181, 83, 0.09),
    inset 0 -1px 0 rgba(255, 255, 255, 0.06);
}

.changelog-widget:hover::after,
.changelog-widget:focus-visible::after {
  transform: scaleX(1);
  opacity: 0.9;
}

.changelog-widget__ornament {
  width: 88px;
  height: 72px;
  display: grid;
  place-items: center;
  align-self: start;
  margin-top: -4px;
  overflow: hidden;
  pointer-events: none;
  transform-origin: 50% 0;
  animation: changelog-ornament-sway 6.8s ease-in-out 1.2s infinite;
}

.changelog-widget__ornament img {
  width: 118px;
  height: 79px;
  display: block;
  object-fit: contain;
  filter:
    drop-shadow(0 5px 9px rgba(0, 0, 0, 0.42))
    drop-shadow(0 0 7px rgba(211, 181, 83, 0.12));
}

.changelog-widget__copy {
  min-width: 0;
  display: grid;
  gap: 5px;
  text-align: left;
}

.changelog-widget__copy small {
  overflow: hidden;
  color: #a49b88;
  font-family: "Segoe UI", system-ui, sans-serif;
  font-size: 9px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.17em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.changelog-widget__copy strong {
  overflow: hidden;
  color: #f4ecd9;
  font-family: "Noto Serif SC", "Songti SC", SimSun, serif;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: 0.07em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.changelog-widget__new {
  display: none;
  align-items: center;
  min-height: 22px;
  padding: 0 7px;
  border: 1px solid rgba(238, 105, 116, 0.44);
  color: #ffd7d9;
  background: rgba(148, 29, 44, 0.58);
  font-family: "Segoe UI", system-ui, sans-serif;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.13em;
}

.changelog-widget.has-unread .changelog-widget__new {
  display: inline-flex;
  animation: changelog-new-pulse 2.4s ease-in-out infinite;
}

.changelog-widget__chevron {
  color: var(--archive-gold);
  font-size: 18px;
  transform: translateY(-2px);
  transition: transform 0.25s ease;
}

.changelog-widget:hover .changelog-widget__chevron {
  transform: translateY(2px);
}

.changelog-widget__signal {
  position: absolute;
  top: 11px;
  right: 12px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #72c49b;
  box-shadow: 0 0 12px rgba(114, 196, 155, 0.8);
}

body.changelog-available #landing-view .music-player {
  top: 98px;
}

body.changelog-open {
  overflow: hidden;
}

body.changelog-open .page-scroller {
  overflow: hidden;
}

.changelog-overlay {
  position: fixed;
  z-index: 12000;
  inset: 0;
  display: grid;
  place-items: center;
  padding: clamp(14px, 3vw, 42px);
  perspective: 1500px;
}

.changelog-backdrop {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(rgba(211, 181, 83, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(211, 181, 83, 0.025) 1px, transparent 1px),
    radial-gradient(circle at 50% 18%, rgba(148, 29, 44, 0.16), transparent 32%),
    rgba(3, 5, 8, 0.88);
  background-size: 38px 38px, 38px 38px, auto, auto;
  -webkit-backdrop-filter: blur(16px) saturate(75%);
  backdrop-filter: blur(16px) saturate(75%);
  opacity: 0;
  transition: opacity 0.36s ease;
}

.changelog-overlay.is-open .changelog-backdrop {
  opacity: 1;
}

.changelog-dialog {
  --changelog-pointer-x: 50%;
  --changelog-pointer-y: 18%;
  --changelog-tilt-x: 0deg;
  --changelog-tilt-y: 0deg;
  position: relative;
  width: min(1180px, 96vw);
  height: min(780px, 92dvh);
  min-height: 520px;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid rgba(211, 181, 83, 0.42);
  border-radius: 20px;
  color: var(--archive-paper);
  background:
    radial-gradient(
      circle at var(--changelog-pointer-x) var(--changelog-pointer-y),
      rgba(211, 181, 83, 0.09),
      transparent 25%
    ),
    linear-gradient(115deg, rgba(255, 255, 255, 0.025), transparent 24%),
    #080b10;
  box-shadow:
    0 42px 120px rgba(0, 0, 0, 0.72),
    0 0 0 1px rgba(255, 255, 255, 0.025),
    inset 0 1px 0 rgba(255, 255, 255, 0.045);
  clip-path: inset(0 0 100% 0 round 20px);
  opacity: 0;
  transform:
    rotateX(var(--changelog-tilt-x))
    rotateY(var(--changelog-tilt-y))
    translateY(-22px)
    scale(0.975);
  transform-origin: 50% 0;
  transition:
    clip-path 0.62s cubic-bezier(0.16, 1, 0.3, 1),
    opacity 0.24s ease,
    transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.changelog-overlay.is-open .changelog-dialog {
  clip-path: inset(0 0 0 0 round 20px);
  opacity: 1;
  transform:
    rotateX(var(--changelog-tilt-x))
    rotateY(var(--changelog-tilt-y))
    translateY(0)
    scale(1);
}

.changelog-dialog::before {
  content: "";
  position: absolute;
  z-index: 5;
  inset: 0;
  border: 8px solid rgba(255, 255, 255, 0.012);
  border-radius: inherit;
  pointer-events: none;
}

.changelog-dialog::after {
  content: "";
  position: absolute;
  z-index: 6;
  left: 0;
  right: 0;
  top: -20%;
  height: 16%;
  background: linear-gradient(
    180deg,
    transparent,
    rgba(242, 213, 109, 0.055),
    transparent
  );
  mix-blend-mode: screen;
  pointer-events: none;
  opacity: 0;
}

.changelog-overlay.is-open .changelog-dialog::after {
  animation: changelog-scan 5.8s 0.7s ease-in-out infinite;
}

.changelog-dialog:focus {
  outline: none;
}

.changelog-dialog__corner {
  position: absolute;
  z-index: 8;
  width: 42px;
  height: 42px;
  pointer-events: none;
}

.changelog-dialog__corner::before,
.changelog-dialog__corner::after {
  content: "";
  position: absolute;
  background: var(--archive-gold);
}

.changelog-dialog__corner--tl {
  top: 8px;
  left: 8px;
}

.changelog-dialog__corner--br {
  right: 8px;
  bottom: 8px;
  transform: rotate(180deg);
}

.changelog-dialog__corner::before {
  top: 0;
  left: 0;
  width: 34px;
  height: 1px;
}

.changelog-dialog__corner::after {
  top: 0;
  left: 0;
  width: 1px;
  height: 34px;
}

.changelog-header {
  position: relative;
  z-index: 2;
  min-height: 118px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 26px;
  padding: 20px 28px 18px 24px;
  border-bottom: 1px solid var(--archive-line);
  background:
    linear-gradient(90deg, rgba(211, 181, 83, 0.08), transparent 34%),
    rgba(12, 16, 22, 0.84);
}

.changelog-header::after {
  content: "";
  position: absolute;
  left: 124px;
  bottom: -1px;
  width: 118px;
  height: 2px;
  background: var(--archive-gold);
  box-shadow: 0 0 18px rgba(211, 181, 83, 0.42);
}

.changelog-header__identity {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 18px;
}

.changelog-header__crest {
  flex: 0 0 80px;
  width: 80px;
  height: 80px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-right: 1px solid rgba(211, 181, 83, 0.2);
}

.changelog-header__crest img {
  width: 112px;
  height: 76px;
  object-fit: contain;
  filter: drop-shadow(0 7px 12px rgba(0, 0, 0, 0.45));
}

.changelog-header__identity > div {
  min-width: 0;
}

.changelog-header__eyebrow {
  display: block;
  margin-bottom: 8px;
  color: var(--archive-gold);
  font-family: "Segoe UI", system-ui, sans-serif;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.22em;
}

.changelog-header h2 {
  margin: 0;
  color: #f8f0dd;
  font-family: "Noto Serif SC", "Songti SC", SimSun, serif;
  font-size: clamp(23px, 2.2vw, 34px);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: 0.08em;
}

.changelog-header p {
  margin: 8px 0 0;
  overflow: hidden;
  color: var(--archive-paper-muted);
  font-size: 12px;
  line-height: 1.5;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.changelog-header__actions {
  display: flex;
  align-items: center;
  gap: 18px;
}

.changelog-header__security {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #8d958f;
  font-family: "Segoe UI", system-ui, sans-serif;
  font-size: 10px;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

.changelog-header__security i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #72c49b;
  box-shadow: 0 0 12px rgba(114, 196, 155, 0.72);
}

.changelog-close {
  position: relative;
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
  padding: 0;
  border: 1px solid rgba(211, 181, 83, 0.28);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.025);
  cursor: pointer;
  transition:
    border-color 0.25s ease,
    background 0.25s ease,
    transform 0.25s ease;
}

.changelog-close span {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 17px;
  height: 1px;
  background: #d9ccb2;
}

.changelog-close span:first-child {
  transform: translate(-50%, -50%) rotate(45deg);
}

.changelog-close span:last-child {
  transform: translate(-50%, -50%) rotate(-45deg);
}

.changelog-close:hover,
.changelog-close:focus-visible {
  border-color: rgba(242, 213, 109, 0.8);
  background: rgba(211, 181, 83, 0.09);
  outline: none;
  transform: rotate(90deg);
}

.changelog-layout {
  min-height: 0;
  display: grid;
  grid-template-columns: 310px minmax(0, 1fr);
}

.changelog-rail {
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  border-right: 1px solid var(--archive-line);
  background:
    linear-gradient(rgba(211, 181, 83, 0.022) 1px, transparent 1px) 0 0 / 100% 34px,
    #0b0f15;
}

.changelog-rail__heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 20px 20px 15px;
  border-bottom: 1px solid rgba(211, 181, 83, 0.14);
  color: #7f7769;
  font-family: "Segoe UI", system-ui, sans-serif;
  font-size: 9px;
  letter-spacing: 0.16em;
}

.changelog-rail__heading strong {
  color: #a69b83;
  font-weight: 500;
  letter-spacing: 0.05em;
}

.changelog-rail__heading b {
  color: var(--archive-gold-bright);
  font-size: 14px;
}

.changelog-entry-list {
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 10px 0 18px;
  scrollbar-width: thin;
  scrollbar-color: rgba(211, 181, 83, 0.28) transparent;
}

.changelog-entry {
  position: relative;
  width: 100%;
  min-height: 88px;
  display: grid;
  grid-template-columns: 35px minmax(0, 1fr) 18px;
  align-items: center;
  gap: 10px;
  padding: 12px 14px 12px 18px;
  border: 0;
  border-bottom: 1px solid rgba(211, 181, 83, 0.09);
  color: #cfc5b1;
  background: transparent;
  text-align: left;
  cursor: pointer;
  transition:
    color 0.24s ease,
    background 0.24s ease,
    padding-left 0.32s cubic-bezier(0.16, 1, 0.3, 1);
}

.changelog-entry::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 2px;
  background: var(--archive-gold);
  transform: scaleY(0);
  transition: transform 0.3s ease;
}

.changelog-entry:hover,
.changelog-entry:focus-visible {
  color: #f1e7d1;
  background: rgba(211, 181, 83, 0.045);
  outline: none;
  padding-left: 22px;
}

.changelog-entry.is-active {
  color: #fff4d8;
  background:
    linear-gradient(90deg, rgba(211, 181, 83, 0.13), transparent 78%);
}

.changelog-entry.is-active::before {
  transform: scaleY(1);
}

.changelog-entry__number {
  align-self: start;
  padding-top: 2px;
  color: #5f5b53;
  font-family: "Segoe UI", system-ui, sans-serif;
  font-size: 10px;
  font-weight: 700;
}

.changelog-entry.is-active .changelog-entry__number {
  color: var(--archive-gold);
}

.changelog-entry__copy {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.changelog-entry__copy time,
.changelog-entry__copy small {
  color: #74736e;
  font-family: "Segoe UI", system-ui, sans-serif;
  font-size: 9px;
  letter-spacing: 0.08em;
}

.changelog-entry__copy strong {
  overflow: hidden;
  font-family: "Noto Serif SC", "Songti SC", SimSun, serif;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.changelog-entry__arrow {
  color: var(--archive-gold);
  opacity: 0;
  transform: translateX(-7px);
  transition:
    opacity 0.25s ease,
    transform 0.25s ease;
}

.changelog-entry:hover .changelog-entry__arrow,
.changelog-entry:focus-visible .changelog-entry__arrow,
.changelog-entry.is-active .changelog-entry__arrow {
  opacity: 1;
  transform: translateX(0);
}

.changelog-rail__footer {
  min-height: 58px;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  column-gap: 8px;
  padding: 11px 18px;
  border-top: 1px solid rgba(211, 181, 83, 0.14);
  color: #716c61;
  font-size: 9px;
  letter-spacing: 0.08em;
}

.changelog-rail__footer strong {
  grid-column: 2;
  overflow: hidden;
  color: #a69b83;
  font-family: ui-monospace, Consolas, monospace;
  font-size: 10px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.changelog-rail__pulse {
  grid-row: 1 / span 2;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #72c49b;
  box-shadow: 0 0 10px rgba(114, 196, 155, 0.65);
}

.changelog-content {
  position: relative;
  min-width: 0;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  padding: clamp(34px, 5vw, 72px) clamp(30px, 6vw, 90px) 54px;
  background:
    radial-gradient(circle at 88% 11%, rgba(211, 181, 83, 0.05), transparent 28%),
    linear-gradient(90deg, rgba(255, 255, 255, 0.012), transparent 15%),
    #0a0e14;
  scrollbar-width: thin;
  scrollbar-color: rgba(211, 181, 83, 0.35) transparent;
}

.changelog-content__progress {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 2px;
  z-index: 4;
  overflow: hidden;
  background: rgba(211, 181, 83, 0.12);
  pointer-events: none;
}

.changelog-content__progress span {
  position: absolute;
  inset: 0;
  background: linear-gradient(var(--archive-gold-bright), var(--archive-red));
  transform: scaleY(var(--changelog-progress));
  transform-origin: 50% 0;
  transition: transform 0.12s linear;
}

.changelog-content__index {
  position: absolute;
  top: 34px;
  right: 40px;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  color: rgba(211, 181, 83, 0.17);
  pointer-events: none;
  user-select: none;
}

.changelog-content__index span {
  font-family: Georgia, serif;
  font-size: clamp(52px, 7vw, 92px);
  line-height: 0.84;
}

.changelog-content__index small {
  padding-top: 4px;
  font-family: "Segoe UI", system-ui, sans-serif;
  font-size: 7px;
  line-height: 1.45;
  letter-spacing: 0.12em;
}

.changelog-article-header {
  position: relative;
  max-width: 760px;
  margin: 0 0 36px;
  padding: 0 110px 28px 0;
  border-bottom: 1px solid rgba(211, 181, 83, 0.18);
}

.changelog-article-header::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 82px;
  height: 2px;
  background: var(--archive-gold);
}

.changelog-article-header__meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  color: var(--archive-gold);
  font-family: "Segoe UI", system-ui, sans-serif;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.13em;
}

.changelog-article-header__meta span {
  padding: 5px 8px;
  border: 1px solid rgba(211, 181, 83, 0.3);
  background: rgba(211, 181, 83, 0.05);
}

.changelog-article-header__meta time {
  color: #858176;
}

.changelog-article-header h3 {
  margin: 0;
  color: #fbf2de;
  font-family: "Noto Serif SC", "Songti SC", SimSun, serif;
  font-size: clamp(28px, 4vw, 46px);
  font-weight: 700;
  line-height: 1.26;
  letter-spacing: 0.045em;
}

.changelog-article-header > p {
  margin: 17px 0 0;
  color: #a9a18f;
  font-size: 14px;
  line-height: 1.8;
}

.changelog-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 16px;
}

.changelog-tags:empty {
  display: none;
}

.changelog-tags span {
  padding: 5px 9px;
  border: 1px solid rgba(211, 181, 83, 0.18);
  color: #a9a18f;
  background: rgba(255, 255, 255, 0.018);
  font-size: 10px;
  letter-spacing: 0.06em;
}

.changelog-prose {
  max-width: 760px;
  color: #c8beaa;
  font-size: 15px;
  line-height: 1.95;
  letter-spacing: 0.025em;
}

.changelog-prose h2,
.changelog-prose h3,
.changelog-prose h4 {
  position: relative;
  margin: 2.1em 0 0.75em;
  color: #eee4cf;
  font-family: "Noto Serif SC", "Songti SC", SimSun, serif;
  line-height: 1.4;
  letter-spacing: 0.05em;
}

.changelog-prose h2 {
  padding-left: 18px;
  font-size: 23px;
}

.changelog-prose h2::before {
  content: "";
  position: absolute;
  top: 0.23em;
  bottom: 0.2em;
  left: 0;
  width: 3px;
  background: linear-gradient(var(--archive-gold), var(--archive-red));
}

.changelog-prose h3 {
  font-size: 19px;
}

.changelog-prose h4 {
  color: #d5c9b3;
  font-size: 16px;
}

.changelog-prose p {
  margin: 0 0 1.25em;
}

.changelog-prose strong {
  color: #f2e7d0;
}

.changelog-prose em {
  color: #dbc987;
}

.changelog-prose a {
  color: var(--archive-gold-bright);
  text-decoration-color: rgba(242, 213, 109, 0.42);
  text-underline-offset: 4px;
}

.changelog-prose ul,
.changelog-prose ol {
  margin: 0 0 1.35em;
  padding-left: 1.4em;
}

.changelog-prose li {
  margin: 0.45em 0;
  padding-left: 0.35em;
}

.changelog-prose li::marker {
  color: var(--archive-gold);
}

.changelog-prose blockquote {
  margin: 1.55em 0;
  padding: 15px 18px;
  border-left: 2px solid var(--archive-gold);
  color: #d5c9b3;
  background:
    linear-gradient(90deg, rgba(211, 181, 83, 0.09), transparent);
  font-family: "Noto Serif SC", "Songti SC", SimSun, serif;
}

.changelog-prose hr {
  height: 1px;
  margin: 32px 0;
  border: 0;
  background: linear-gradient(90deg, transparent, rgba(211, 181, 83, 0.48), transparent);
}

.changelog-prose code {
  padding: 0.15em 0.35em;
  border: 1px solid rgba(211, 181, 83, 0.15);
  color: #e2cf8e;
  background: rgba(0, 0, 0, 0.32);
  font-family: ui-monospace, Consolas, monospace;
  font-size: 0.9em;
}

.changelog-prose pre {
  overflow-x: auto;
  margin: 1.5em 0;
  padding: 16px;
  border: 1px solid rgba(211, 181, 83, 0.17);
  background: #05070a;
}

.changelog-prose pre code {
  padding: 0;
  border: 0;
  background: transparent;
}

.changelog-article-footer {
  max-width: 760px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 14px;
  margin-top: 58px;
  color: #5e5b54;
  font-family: "Segoe UI", system-ui, sans-serif;
  font-size: 8px;
  letter-spacing: 0.14em;
}

.changelog-article-footer i {
  height: 1px;
  background: rgba(211, 181, 83, 0.16);
}

.changelog-article-footer strong {
  color: #847d6e;
  font-size: 9px;
  font-weight: 500;
}

.changelog-content.is-switching .changelog-article-header,
.changelog-content.is-switching .changelog-prose,
.changelog-content.is-switching .changelog-article-footer {
  animation: changelog-record-in 0.56s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.changelog-content.is-switching .changelog-prose {
  animation-delay: 0.06s;
}

.changelog-content.is-switching .changelog-article-footer {
  animation-delay: 0.1s;
}

@keyframes changelog-hang-in {
  0% {
    opacity: 0;
    transform: translate(-50%, -115%) rotate(-2deg);
  }
  58% {
    opacity: 1;
    transform: translate(-50%, 5px) rotate(0.8deg);
  }
  78% {
    transform: translate(-50%, -2px) rotate(-0.35deg);
  }
  100% {
    opacity: 1;
    transform: translate(-50%, 0) rotate(0);
  }
}

@keyframes changelog-ornament-sway {
  0%,
  100% {
    transform: rotate(-0.8deg);
  }
  50% {
    transform: rotate(0.8deg);
  }
}

@keyframes changelog-new-pulse {
  0%,
  100% {
    box-shadow: 0 0 0 rgba(148, 29, 44, 0);
  }
  50% {
    box-shadow: 0 0 16px rgba(238, 105, 116, 0.24);
  }
}

@keyframes changelog-scan {
  0% {
    top: -20%;
    opacity: 0;
  }
  15% {
    opacity: 0.65;
  }
  72% {
    opacity: 0.25;
  }
  100% {
    top: 110%;
    opacity: 0;
  }
}

@keyframes changelog-record-in {
  from {
    opacity: 0;
    transform: translateY(14px);
    filter: blur(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
}

@media (max-width: 860px) {
  .changelog-dialog {
    width: min(720px, 96vw);
  }

  .changelog-header {
    min-height: 104px;
    padding: 16px 20px;
  }

  .changelog-header__crest {
    flex-basis: 66px;
    width: 66px;
    height: 66px;
  }

  .changelog-header__crest img {
    width: 92px;
    height: 62px;
  }

  .changelog-header__security {
    display: none;
  }

  .changelog-layout {
    grid-template-columns: 230px minmax(0, 1fr);
  }

  .changelog-content {
    padding-inline: 32px;
  }

  .changelog-article-header {
    padding-right: 82px;
  }
}

@media (min-width: 641px) and (max-height: 800px) {
  body.changelog-available #landing-view .empire-logo {
    width: min(34%, 240px);
    margin-bottom: 10px;
  }

  body.changelog-available #landing-view .intro-text {
    line-height: 1.58;
  }
}

@media (min-width: 641px) and (max-height: 740px) {
  body.changelog-available #landing-view .empire-logo {
    width: min(30%, 196px);
  }
}

@media (max-width: 640px) {
  .changelog-widget {
    top: -5px;
    width: min(242px, calc(100vw - 20px));
    min-height: 66px;
    grid-template-columns: 68px minmax(0, 1fr) 12px;
    gap: 5px;
    padding: 6px 12px 6px 3px;
    border-radius: 0 0 15px 15px;
  }

  .changelog-widget::after {
    left: 76px;
    right: 14px;
  }

  .changelog-widget__ornament {
    width: 68px;
    height: 56px;
    margin-top: -1px;
  }

  .changelog-widget__ornament img {
    width: 90px;
    height: 61px;
  }

  .changelog-widget__copy {
    gap: 3px;
  }

  .changelog-widget__copy small {
    font-size: 7px;
    letter-spacing: 0.1em;
  }

  .changelog-widget__copy strong {
    font-size: 13px;
    letter-spacing: 0.03em;
  }

  .changelog-widget__new {
    position: absolute;
    right: 8px;
    bottom: -8px;
    min-height: 17px;
    padding-inline: 5px;
    font-size: 6px;
  }

  .changelog-widget__signal {
    top: 9px;
    right: 9px;
  }

  body.changelog-available #landing-view .music-player {
    top: 72px;
  }

  body.changelog-available .event-splash-settings,
  body.changelog-available .theme-toggle-button,
  body.changelog-available .background-toggle-button {
    top: 140px;
  }

  .changelog-overlay {
    padding: 0;
  }

  .changelog-dialog,
  .changelog-overlay.is-open .changelog-dialog {
    width: 100vw;
    height: 100dvh;
    min-height: 0;
    border-width: 0;
    border-radius: 0;
    clip-path: inset(0 0 0 0);
    transform: translateY(18px);
  }

  .changelog-overlay.is-open .changelog-dialog {
    transform: translateY(0);
  }

  .changelog-dialog__corner {
    display: none;
  }

  .changelog-header {
    min-height: 92px;
    gap: 10px;
    padding: max(12px, env(safe-area-inset-top)) 14px 12px;
  }

  .changelog-header::after {
    left: 78px;
    width: 74px;
  }

  .changelog-header__identity {
    gap: 10px;
  }

  .changelog-header__crest {
    flex-basis: 54px;
    width: 54px;
    height: 58px;
  }

  .changelog-header__crest img {
    width: 78px;
    height: 53px;
  }

  .changelog-header__eyebrow {
    margin-bottom: 5px;
    font-size: 6px;
    letter-spacing: 0.13em;
  }

  .changelog-header h2 {
    font-size: clamp(18px, 5.5vw, 23px);
    letter-spacing: 0.04em;
  }

  .changelog-header p {
    max-width: 62vw;
    margin-top: 5px;
    font-size: 9px;
  }

  .changelog-close {
    width: 42px;
    height: 42px;
    flex-basis: 42px;
  }

  .changelog-layout {
    grid-template-columns: 1fr;
    grid-template-rows: 138px minmax(0, 1fr);
  }

  .changelog-rail {
    grid-template-rows: auto minmax(0, 1fr);
    border-right: 0;
    border-bottom: 1px solid var(--archive-line);
  }

  .changelog-rail__heading {
    padding: 8px 14px;
  }

  .changelog-entry-list {
    display: flex;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 0 7px 8px;
    scroll-snap-type: x proximity;
  }

  .changelog-entry {
    width: min(74vw, 270px);
    min-height: 84px;
    flex: 0 0 min(74vw, 270px);
    scroll-snap-align: start;
    border-right: 1px solid rgba(211, 181, 83, 0.09);
    border-bottom: 0;
  }

  .changelog-entry:hover,
  .changelog-entry:focus-visible {
    padding-left: 18px;
  }

  .changelog-entry::before {
    top: auto;
    right: 0;
    bottom: 0;
    width: auto;
    height: 2px;
    transform: scaleX(0);
  }

  .changelog-entry.is-active::before {
    transform: scaleX(1);
  }

  .changelog-rail__footer {
    display: none;
  }

  .changelog-content {
    padding: 28px 20px calc(42px + env(safe-area-inset-bottom));
  }

  .changelog-content__progress {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
  }

  .changelog-content__index {
    top: 22px;
    right: 18px;
  }

  .changelog-content__index span {
    font-size: 52px;
  }

  .changelog-article-header {
    margin-bottom: 28px;
    padding-right: 70px;
    padding-bottom: 23px;
  }

  .changelog-article-header h3 {
    font-size: clamp(25px, 8vw, 34px);
  }

  .changelog-article-header > p,
  .changelog-prose {
    font-size: 14px;
  }

  .changelog-prose {
    line-height: 1.86;
  }

  .changelog-article-footer {
    grid-template-columns: auto 1fr;
  }

  .changelog-article-footer strong {
    display: none;
  }
}

@media (max-width: 360px) {
  .changelog-widget {
    width: min(222px, calc(100vw - 16px));
  }

  .changelog-widget__copy small {
    max-width: 120px;
  }

  .changelog-header p {
    display: none;
  }

  .changelog-article-header {
    padding-right: 48px;
  }

  .changelog-content__index small {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .changelog-widget,
  .changelog-widget__ornament,
  .changelog-widget__new,
  .changelog-overlay.is-open .changelog-dialog::after,
  .changelog-content.is-switching .changelog-article-header,
  .changelog-content.is-switching .changelog-prose,
  .changelog-content.is-switching .changelog-article-footer {
    animation: none !important;
  }

  .changelog-dialog,
  .changelog-backdrop,
  .changelog-entry,
  .changelog-close {
    transition-duration: 0.01ms !important;
  }
}

/* -------------------------------------------------------------------------- */
/* Theme-aware archive presentation                                            */
/* The site switches :root[data-theme] at runtime, so the changelog follows it */
/* without reloading and swaps to a high-contrast crest on dark surfaces.       */
/* -------------------------------------------------------------------------- */

.changelog-ornament__image--dark {
  display: none !important;
}

:root[data-theme="dark"] .changelog-ornament__image--light {
  display: none !important;
}

:root[data-theme="dark"] .changelog-ornament__image--dark {
  display: block !important;
}

:root[data-theme="dark"] .changelog-widget__ornament .changelog-ornament__image--dark {
  filter:
    drop-shadow(0 5px 10px rgba(0, 0, 0, 0.52))
    drop-shadow(0 0 9px rgba(242, 213, 109, 0.18));
}

:root[data-theme="dark"] .changelog-header__crest .changelog-ornament__image--dark {
  filter:
    drop-shadow(0 7px 13px rgba(0, 0, 0, 0.5))
    drop-shadow(0 0 8px rgba(242, 213, 109, 0.13));
}

:root[data-theme="light"] .empire-changelog {
  --archive-ink: #2b2116;
  --archive-ink-soft: #493a28;
  --archive-paper: #33291d;
  --archive-paper-muted: #756955;
  --archive-gold: #9b7424;
  --archive-gold-bright: #bd8d28;
  --archive-red: #842334;
  --archive-line: rgba(132, 94, 26, 0.23);
}

:root[data-theme="light"] .changelog-widget {
  border-color: rgba(132, 94, 26, 0.42);
  color: #302315;
  background:
    linear-gradient(90deg, transparent 0 31%, rgba(155, 116, 36, 0.16) 50%, transparent 69%)
      0 100% / 180% 1px no-repeat,
    linear-gradient(135deg, rgba(255, 255, 255, 0.78), transparent 42%),
    rgba(247, 241, 226, 0.96);
  box-shadow:
    0 18px 42px rgba(73, 54, 27, 0.18),
    inset 0 -1px 0 rgba(96, 65, 18, 0.1);
}

:root[data-theme="light"] .changelog-widget::before {
  border-color: rgba(132, 94, 26, 0.16);
}

:root[data-theme="light"] .changelog-widget:hover,
:root[data-theme="light"] .changelog-widget:focus-visible {
  border-color: rgba(155, 116, 36, 0.78);
  box-shadow:
    0 24px 58px rgba(73, 54, 27, 0.24),
    0 0 0 3px rgba(155, 116, 36, 0.11),
    inset 0 -1px 0 rgba(96, 65, 18, 0.12);
}

:root[data-theme="light"] .changelog-widget__ornament img {
  filter:
    drop-shadow(0 5px 9px rgba(75, 52, 18, 0.22))
    drop-shadow(0 0 6px rgba(155, 116, 36, 0.1));
}

:root[data-theme="light"] .changelog-widget__copy small {
  color: #766b58;
}

:root[data-theme="light"] .changelog-widget__copy strong {
  color: #302315;
}

:root[data-theme="light"] .changelog-widget__new {
  border-color: rgba(132, 35, 52, 0.35);
  color: #741d2c;
  background: rgba(132, 35, 52, 0.09);
}

:root[data-theme="light"] .changelog-backdrop {
  background:
    linear-gradient(rgba(155, 116, 36, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(155, 116, 36, 0.04) 1px, transparent 1px),
    radial-gradient(circle at 50% 18%, rgba(132, 35, 52, 0.11), transparent 32%),
    rgba(80, 66, 45, 0.46);
  background-size: 38px 38px, 38px 38px, auto, auto;
  -webkit-backdrop-filter: blur(16px) saturate(82%);
  backdrop-filter: blur(16px) saturate(82%);
}

:root[data-theme="light"] .changelog-dialog {
  color: var(--archive-paper);
  background:
    radial-gradient(
      circle at var(--changelog-pointer-x) var(--changelog-pointer-y),
      rgba(189, 141, 40, 0.12),
      transparent 27%
    ),
    linear-gradient(115deg, rgba(255, 255, 255, 0.74), transparent 25%),
    #f5eedf;
  box-shadow:
    0 42px 120px rgba(54, 39, 17, 0.36),
    0 0 0 1px rgba(96, 65, 18, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.78);
}

:root[data-theme="light"] .changelog-dialog::before {
  border-color: rgba(91, 61, 17, 0.035);
}

:root[data-theme="light"] .changelog-dialog::after {
  background: linear-gradient(
    180deg,
    transparent,
    rgba(189, 141, 40, 0.08),
    transparent
  );
  mix-blend-mode: multiply;
}

:root[data-theme="light"] .changelog-header {
  background:
    linear-gradient(90deg, rgba(155, 116, 36, 0.12), transparent 36%),
    rgba(239, 229, 208, 0.9);
}

:root[data-theme="light"] .changelog-header__crest {
  border-right-color: rgba(132, 94, 26, 0.22);
}

:root[data-theme="light"] .changelog-header__crest img {
  filter: drop-shadow(0 7px 12px rgba(75, 52, 18, 0.2));
}

:root[data-theme="light"] .changelog-header h2 {
  color: #2e2317;
}

:root[data-theme="light"] .changelog-header p {
  color: #716551;
}

:root[data-theme="light"] .changelog-header__security {
  color: #716b5f;
}

:root[data-theme="light"] .changelog-close {
  border-color: rgba(132, 94, 26, 0.32);
  background: rgba(255, 255, 255, 0.38);
}

:root[data-theme="light"] .changelog-close span {
  background: #5c4a32;
}

:root[data-theme="light"] .changelog-close:hover,
:root[data-theme="light"] .changelog-close:focus-visible {
  border-color: rgba(155, 116, 36, 0.82);
  background: rgba(155, 116, 36, 0.11);
}

:root[data-theme="light"] .changelog-rail {
  background:
    linear-gradient(rgba(155, 116, 36, 0.04) 1px, transparent 1px) 0 0 / 100% 34px,
    #ece2cf;
}

:root[data-theme="light"] .changelog-rail__heading {
  color: #786b56;
}

:root[data-theme="light"] .changelog-rail__heading strong,
:root[data-theme="light"] .changelog-rail__footer strong {
  color: #665943;
}

:root[data-theme="light"] .changelog-entry-list {
  scrollbar-color: rgba(132, 94, 26, 0.34) transparent;
}

:root[data-theme="light"] .changelog-entry {
  color: #50422f;
  border-bottom-color: rgba(132, 94, 26, 0.12);
}

:root[data-theme="light"] .changelog-entry:hover,
:root[data-theme="light"] .changelog-entry:focus-visible {
  color: #261d13;
  background: rgba(155, 116, 36, 0.08);
}

:root[data-theme="light"] .changelog-entry.is-active {
  color: #2c2114;
  background: linear-gradient(90deg, rgba(155, 116, 36, 0.17), transparent 82%);
}

:root[data-theme="light"] .changelog-entry__number {
  color: #938671;
}

:root[data-theme="light"] .changelog-entry__copy time,
:root[data-theme="light"] .changelog-entry__copy small {
  color: #81745f;
}

:root[data-theme="light"] .changelog-rail__footer {
  color: #776c59;
}

:root[data-theme="light"] .changelog-content {
  color: #3e3223;
  background:
    radial-gradient(circle at 88% 11%, rgba(155, 116, 36, 0.1), transparent 29%),
    linear-gradient(90deg, rgba(255, 255, 255, 0.4), transparent 16%),
    #f8f2e5;
  scrollbar-color: rgba(132, 94, 26, 0.38) transparent;
}

:root[data-theme="light"] .changelog-content__progress {
  background: rgba(132, 94, 26, 0.17);
}

:root[data-theme="light"] .changelog-content__index {
  color: rgba(132, 94, 26, 0.16);
}

:root[data-theme="light"] .changelog-article-header__meta time {
  color: #786d5b;
}

:root[data-theme="light"] .changelog-article-header h3 {
  color: #2d2216;
}

:root[data-theme="light"] .changelog-article-header > p,
:root[data-theme="light"] .changelog-tags span {
  color: #716550;
}

:root[data-theme="light"] .changelog-tags span {
  background: rgba(255, 255, 255, 0.38);
}

:root[data-theme="light"] .changelog-prose {
  color: #493d2c;
}

:root[data-theme="light"] .changelog-prose h2,
:root[data-theme="light"] .changelog-prose h3,
:root[data-theme="light"] .changelog-prose h4 {
  color: #312619;
}

:root[data-theme="light"] .changelog-prose strong {
  color: #251c12;
}

:root[data-theme="light"] .changelog-prose em {
  color: #7f5f1e;
}

:root[data-theme="light"] .changelog-prose blockquote {
  color: #4b3d2a;
  background: linear-gradient(90deg, rgba(155, 116, 36, 0.12), transparent);
}

:root[data-theme="light"] .changelog-prose code {
  color: #704f12;
  background: rgba(111, 78, 23, 0.08);
}

:root[data-theme="light"] .changelog-prose pre {
  border-color: rgba(132, 94, 26, 0.2);
  background: #e9deca;
}

:root[data-theme="light"] .changelog-article-footer {
  color: #887c68;
}

:root[data-theme="light"] .changelog-article-footer strong {
  color: #6f634f;
}
