:root {
  background: #120609;
}

.history-page {
  position: relative;
  isolation: isolate;
  display: flex;
  min-height: 100svh;
  overflow: hidden;
  flex-direction: column;
  padding: max(29px, env(safe-area-inset-top)) 28px max(24px, env(safe-area-inset-bottom));
  color: #fff3cb;
  background:
    radial-gradient(circle at 77% 14%, rgba(240, 183, 71, 0.18), transparent 19%),
    radial-gradient(circle at 13% 57%, rgba(208, 24, 42, 0.39), transparent 34%),
    linear-gradient(144deg, #63000a 0%, #250207 49%, #100408 100%);
}

.history-page__grain,
.history-page__halo,
.history-page__ribbon {
  position: absolute;
  z-index: -1;
  pointer-events: none;
}

.history-page__grain {
  inset: 0;
  opacity: 0.22;
  background-image:
    repeating-radial-gradient(circle at 50% 50%, transparent 0 2px, rgba(255, 229, 166, 0.38) 2.3px 2.8px, transparent 3px 6px),
    linear-gradient(90deg, rgba(255, 229, 166, 0.05) 1px, transparent 1px);
  background-size: 12px 12px, 34px 34px;
}

.history-page__halo {
  top: -29vmax;
  right: -26vmax;
  width: 66vmax;
  height: 66vmax;
  border: 1px solid rgba(255, 222, 139, 0.32);
  border-radius: 50%;
  box-shadow: 0 0 0 28px rgba(255, 222, 139, 0.04), 0 0 0 58px rgba(255, 222, 139, 0.025);
}

.history-page__ribbon--one {
  top: -29px;
  right: -30%;
  width: 79%;
  height: 103px;
  transform: rotate(20deg);
  background: linear-gradient(90deg, rgba(241, 29, 51, 0.12), rgba(246, 42, 59, 0.9) 51%, rgba(253, 172, 82, 0.24));
}

.history-page__ribbon--two {
  bottom: 16%;
  left: -31%;
  width: 93%;
  height: 78px;
  transform: rotate(-19deg);
  background: linear-gradient(90deg, transparent, rgba(215, 20, 40, 0.78), rgba(255, 198, 97, 0.15));
}

.history-page__quote-mark {
  position: absolute;
  z-index: -1;
  top: 83px;
  right: 18px;
  color: rgba(255, 225, 142, 0.12);
  font-family: Georgia, "Times New Roman", serif;
  font-size: min(62vw, 250px);
  line-height: 0.72;
}

.history-page__header,
.history-page__meta,
.history-page__footer,
.history-page__content {
  position: relative;
  z-index: 1;
}

.history-page__header {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #f9dc92;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.15em;
}

.history-page__header i {
  width: 26px;
  height: 1px;
  background: #f9dc92;
}

.history-page__header p {
  margin: 0;
}

.history-page__meta {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 13px 0 0;
  color: rgba(255, 232, 177, 0.55);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 10px;
  letter-spacing: 0.14em;
}

.history-page__meta i {
  width: 34px;
  height: 1px;
  background: rgba(255, 232, 177, 0.44);
}

.history-page__content {
  align-self: center;
  width: min(100%, 570px);
  margin: auto 0;
  padding: 49px 0 43px;
}

.history-page__kicker {
  margin: 0 0 15px;
  color: #ffdc8b;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.19em;
}

.history-page h2 {
  margin: 0 0 32px;
  color: #fff5d8;
  font-family: "Songti SC", SimSun, serif;
  font-size: clamp(31px, 8.4vw, 47px);
  font-weight: 700;
  line-height: 1.26;
  letter-spacing: 0.08em;
  text-shadow: 0 8px 24px rgba(0, 0, 0, 0.36);
}

.history-page__quote {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0;
  color: rgba(255, 242, 203, 0.9);
  font-family: "Songti SC", SimSun, serif;
  font-size: clamp(18px, 5.15vw, 27px);
  font-weight: 600;
  line-height: 1.5;
  letter-spacing: 0.055em;
}

.history-page cite {
  display: block;
  margin-top: 25px;
  color: #f7d783;
  font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
  font-size: 12px;
  font-style: normal;
  letter-spacing: 0.16em;
}

.history-page__footer {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 19px;
}

.history-page__footer p {
  max-width: 203px;
  margin: 0;
  color: rgba(255, 226, 157, 0.67);
  font-family: "Songti SC", SimSun, serif;
  font-size: 10px;
  line-height: 1.8;
  letter-spacing: 0.09em;
}

.history-page__actions {
  display: flex;
  align-items: flex-end;
  flex-direction: column;
  gap: 7px;
}

.page-forward {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 0;
  border: 0;
  background: transparent;
  color: #fff0c2;
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
}

.page-forward svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.page-return {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex: 0 0 auto;
  padding: 9px 0;
  border: 0;
  border-bottom: 1px solid rgba(255, 223, 148, 0.62);
  background: transparent;
  color: #ffe4a0;
  cursor: pointer;
  font-size: 11px;
  letter-spacing: 0.09em;
}

.page-return svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.history-page .history-page__header,
.history-page .history-page__meta,
.history-page .history-page__kicker,
.history-page h2,
.history-page__quote span,
.history-page cite,
.history-page__footer {
  opacity: 0;
}

.history-page.is-active .history-page__header { animation: history-rise 640ms ease-out both; }
.history-page.is-active .history-page__meta { animation: history-rise 640ms ease-out 90ms both; }
.history-page.is-active .history-page__kicker { animation: history-rise 670ms ease-out 160ms both; }
.history-page.is-active h2 { animation: history-rise 750ms cubic-bezier(0.2, 0.82, 0.3, 1) 260ms both; }
.history-page.is-active .history-page__quote span { animation: quote-line 660ms cubic-bezier(0.2, 0.82, 0.3, 1) both; }
.history-page.is-active .history-page__quote span:nth-child(1) { animation-delay: 440ms; }
.history-page.is-active .history-page__quote span:nth-child(2) { animation-delay: 540ms; }
.history-page.is-active .history-page__quote span:nth-child(3) { animation-delay: 640ms; }
.history-page.is-active .history-page__quote span:nth-child(4) { animation-delay: 740ms; }
.history-page.is-active cite { animation: history-rise 560ms ease-out 880ms both; }
.history-page.is-active .history-page__footer { animation: history-rise 620ms ease-out 980ms both; }
.history-page.is-active .history-page__halo { animation: halo-turn 20s linear infinite, halo-breathe 5.5s ease-in-out infinite; }
.history-page.is-active .history-page__ribbon--one { animation: ribbon-drift-one 8s ease-in-out infinite; }
.history-page.is-active .history-page__ribbon--two { animation: ribbon-drift-two 9s ease-in-out -1s infinite; }
.history-page.is-active .history-page__quote-mark { animation: quote-glow 4s ease-in-out infinite; }

@keyframes history-rise {
  from { opacity: 0; transform: translate3d(0, 16px, 0); filter: blur(3px); }
  to { opacity: 1; transform: translate3d(0, 0, 0); filter: blur(0); }
}

@keyframes quote-line {
  from { opacity: 0; transform: translate3d(-14px, 0, 0); filter: blur(3px); }
  to { opacity: 1; transform: translate3d(0, 0, 0); filter: blur(0); }
}

@keyframes halo-turn { to { transform: rotate(360deg); } }
@keyframes halo-breathe { 50% { opacity: 0.63; } }
@keyframes quote-glow { 50% { color: rgba(255, 225, 142, 0.2); } }
@keyframes ribbon-drift-one { 50% { transform: rotate(17deg) translate3d(-2%, 5px, 0); } }
@keyframes ribbon-drift-two { 50% { transform: rotate(-16deg) translate3d(3%, -7px, 0); } }

@media (min-width: 740px) {
  .history-page {
    width: min(100%, 720px);
    min-height: 920px;
    margin: 24px auto;
    box-shadow: 0 30px 90px rgba(0, 0, 0, 0.4);
  }
}

@media (prefers-reduced-motion: reduce) {
  .history-page *,
  .history-page *::before,
  .history-page *::after {
    animation: none !important;
  }

  .history-page .history-page__header,
  .history-page .history-page__meta,
  .history-page .history-page__kicker,
  .history-page h2,
  .history-page__quote span,
  .history-page cite,
  .history-page__footer {
    opacity: 1;
  }
}
