:root {
  --bg: #f5f1e8;
  --card: #fffdf8;
  --line: #e4d8bf;
  --text: #182235;
  --muted: #667085;
  --accent: #12677a;
  --accent-dark: #0b4d5d;
  --accent-soft: #e8f3f1;
  --gold: #d69b2d;
  font-family: "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at top left, rgba(18, 103, 122, 0.16), transparent 30%),
    linear-gradient(180deg, #fbf8ef 0%, var(--bg) 52%, #f1eadc 100%);
  color: var(--text);
}

main {
  max-width: 960px;
  margin: 0 auto;
  padding: 28px 16px 48px;
}

.hero {
  align-items: center;
  display: flex;
  gap: 14px;
  margin-bottom: 18px;
}

.hero img {
  border-radius: 14px;
  box-shadow: 0 12px 28px rgba(18, 103, 122, 0.18);
}

header h1 {
  margin: 0;
  font-size: 30px;
  letter-spacing: 0;
}

header p {
  margin: 6px 0 0;
  color: var(--muted);
  font-weight: 700;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 12px 26px rgba(52, 39, 17, 0.08);
  padding: 18px;
  margin-top: 14px;
}

.card h2 {
  margin: 0 0 10px;
  font-size: 18px;
}

.summary-card {
  border-left: 5px solid var(--accent);
}

.summary-card p {
  font-size: 16px;
  line-height: 1.7;
  margin: 0;
}

.loading-card {
  align-items: center;
  display: flex;
  gap: 16px;
}

.loading-card[hidden] {
  display: none;
}

.loading-card h2 {
  font-size: 17px;
  margin: 0 0 4px;
}

.loading-card p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
  margin: 0;
}

.progress-wrap {
  margin-top: 12px;
  max-width: 420px;
}

.progress-bar {
  background: #efe4cf;
  border-radius: 999px;
  height: 9px;
  overflow: hidden;
  width: 100%;
}

.progress-bar span {
  background: linear-gradient(90deg, var(--accent), var(--gold));
  border-radius: inherit;
  display: block;
  height: 100%;
  transition: width 220ms ease;
  width: 0;
}

.progress-meta {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  margin-top: 6px;
}

.archive-loader {
  height: 70px;
  position: relative;
  width: 86px;
}

.archive-loader .ring {
  animation: rewindSpin 1.8s linear infinite;
  border: 4px solid rgba(18, 103, 122, 0.2);
  border-left-color: var(--accent);
  border-radius: 999px;
  display: block;
  height: 44px;
  left: 0;
  position: absolute;
  top: 12px;
  width: 44px;
}

.archive-loader .hand {
  animation: handTick 1.2s ease-in-out infinite;
  background: var(--gold);
  border-radius: 999px;
  display: block;
  height: 4px;
  left: 24px;
  position: absolute;
  top: 32px;
  transform-origin: left center;
  width: 18px;
}

.archive-loader .page {
  animation: pageFloat 1.4s ease-in-out infinite;
  background: #fffdf8;
  border: 1px solid var(--line);
  border-radius: 6px;
  box-shadow: 0 8px 18px rgba(52, 39, 17, 0.12);
  display: block;
  height: 28px;
  position: absolute;
  width: 24px;
}

.archive-loader .page::before {
  background: var(--accent);
  border-radius: 999px;
  content: "";
  height: 3px;
  left: 6px;
  position: absolute;
  top: 8px;
  width: 12px;
}

.archive-loader .page::after {
  background: #ecd9b4;
  border-radius: 999px;
  content: "";
  height: 3px;
  left: 6px;
  position: absolute;
  top: 15px;
  width: 9px;
}

.archive-loader .page-a {
  animation-delay: 0s;
  left: 48px;
  top: 4px;
}

.archive-loader .page-b {
  animation-delay: 0.16s;
  left: 58px;
  top: 22px;
}

.archive-loader .page-c {
  animation-delay: 0.32s;
  left: 48px;
  top: 40px;
}

@keyframes rewindSpin {
  to {
    transform: rotate(-360deg);
  }
}

@keyframes handTick {
  0%,
  100% {
    transform: rotate(-25deg);
  }

  50% {
    transform: rotate(35deg);
  }
}

@keyframes pageFloat {
  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-4px);
  }
}

ul {
  margin: 0;
  padding-left: 0;
}

li {
  list-style: none;
  margin-bottom: 10px;
  line-height: 1.65;
  padding-left: 22px;
  position: relative;
}

li::before {
  background: var(--gold);
  border: 3px solid #fff8ea;
  border-radius: 999px;
  box-shadow: 0 0 0 1px rgba(214, 155, 45, 0.25);
  content: "";
  height: 9px;
  left: 0;
  position: absolute;
  top: 0.58em;
  width: 9px;
}

.meta {
  color: var(--muted);
  font-size: 13px;
  margin-top: -4px;
}

.error {
  color: #b00020;
  font-weight: 700;
}

.empty {
  color: var(--muted);
}

.timeline-card li:not(.meta):not(.empty)::before {
  background: var(--accent);
}

.timeline-card .meta::before {
  background: var(--gold);
  height: 7px;
  left: 1px;
  top: 0.68em;
  width: 7px;
}

.note p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

a {
  color: var(--accent);
  font-weight: 700;
  text-underline-offset: 3px;
}

a:hover {
  color: var(--accent-dark);
}

@media (max-width: 720px) {
  main {
    padding: 18px 12px 36px;
  }

  .hero {
    align-items: flex-start;
  }

  header h1 {
    font-size: 24px;
  }
}
