@font-face {
  font-family: "ReDPL History";
  src: url("./history.92fa032908ed.woff2") format("woff2");
  font-weight: 400 800;
  font-display: swap;
}

.history-page {
  --text-font: "ReDPL History", "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, sans-serif;
}
.history-page .topbar nav { gap: clamp(.75rem, 4vw, 1.6rem); }
.history-nav, .history-home { font-size: .875rem; font-weight: 650; white-space: nowrap; }
.history-home { text-decoration: none; }
.history-home:hover { text-decoration: underline; }

.history-hero {
  background: #ffebae;
  border-radius: 0 0 48% 52% / 0 0 6% 8%;
  padding: clamp(2.6rem, 6.3vw, 6.5rem) 0 clamp(2rem, 5vw, 4.4rem);
}
.history-opening { display: grid; gap: clamp(1.4rem, 4vw, 3.5rem); align-items: center; }
.history-opening h1 {
  font: 800 clamp(3rem, 1.4rem + 5.4vw, 6.1rem)/1.12 var(--text-font);
  letter-spacing: .075em;
}
.history-opening h1 span {
  display: block;
  margin-bottom: .5rem;
  font-size: .34em;
  letter-spacing: .04em;
}
.history-opening p { max-width: 32rem; margin-top: 1rem; text-wrap: pretty; }
.history-opening .button { margin-top: 1.15rem; }
.history-cover { display: grid; grid-template-columns: .85fr 1.3fr .85fr; align-items: end; }
.history-cover img { display: block; width: 100%; height: auto; }
.history-cover img:nth-child(2) { align-self: center; transform: translateY(-10%); }

.history-content { max-width: 68rem; padding-block: clamp(2.5rem, 5vw, 5rem); }
.history-content :is(nav, article) { scroll-margin-top: 5.2rem; }
.history-index {
  padding: clamp(1.05rem, 3vw, 2rem);
  border: 1px solid #e5ce96;
  border-radius: 1rem 1.4rem 1.1rem 1rem;
  background: #fff3d6;
}
.history-index h2 { margin-bottom: .55rem; font-size: clamp(1.25rem, 1rem + 1.2vw, 1.65rem); }
.history-index ol { display: grid; column-gap: 2rem; padding: 0; list-style: none; }
.history-index li { min-width: 0; border-bottom: 1px solid #e5ce96; }
.history-index a {
  display: flex;
  align-items: baseline;
  gap: .65rem;
  min-height: 2.75rem;
  padding-block: .45rem;
  text-decoration: none;
  font-weight: 600;
}
.history-index a:hover { text-decoration: underline; }
.index-number { flex: 0 0 1.5rem; color: #73521e; font-variant-numeric: tabular-nums; font-size: .875rem; }
.reading-note { margin-top: 1rem; font-size: .875rem; color: var(--muted); }

.episode { margin-top: clamp(2.5rem, 6.5vw, 6rem); }
.episode-header { margin-bottom: .95rem; }
.episode-meta {
  display: flex;
  flex-wrap: wrap;
  gap: .05rem .85rem;
  color: #73521e;
  font-size: .825rem;
  font-weight: 650;
}
.episode-meta span:first-child { color: var(--navy); font-variant-numeric: tabular-nums; }
.episode-header h2 {
  margin-top: .18rem;
  font-size: clamp(1.45rem, 1rem + 2vw, 2.65rem);
  letter-spacing: .025em;
  text-wrap: pretty;
}
.comic-panels {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(.45rem, 1.5vw, 1rem);
  padding: 0;
  list-style: none;
}
.comic-panel {
  display: grid;
  grid-template-rows: auto 1fr;
  min-width: 0;
  overflow: hidden;
  border: 1px solid #e5ce96;
  border-radius: .8rem 1.05rem .8rem .9rem;
  background: var(--paper);
}
.panel-art {
  position: relative;
  overflow: hidden;
  background: #fff1ca;
}
.comic-panel:nth-child(even) .panel-art { background: #ffefc3; }
.panel-art img { display: block; width: 100%; height: auto; }
.panel-number {
  position: absolute;
  z-index: 1;
  top: .45rem;
  left: .45rem;
  display: grid;
  place-items: center;
  width: 1.5rem;
  height: 1.5rem;
  border: 1px solid #d7b45c;
  border-radius: 50%;
  background: var(--cream);
  color: var(--navy);
  font-size: .78rem;
  font-weight: 700;
}
.panel-copy { padding: .65rem clamp(.65rem, 2vw, 1.05rem) .8rem; }
.panel-copy h3 {
  font-size: clamp(.875rem, .81rem + .45vw, 1.15rem);
  line-height: 1.45;
  letter-spacing: 0;
  text-wrap: pretty;
}
.panel-dialogue { margin-top: .25rem; font-size: clamp(.875rem, .83rem + .25vw, 1rem); line-height: 1.65; text-wrap: pretty; }
.episode-summary { max-width: 44rem; margin-top: 1rem; text-wrap: pretty; }
.episode-sources { margin-top: .35rem; color: var(--muted); font-size: .8125rem; line-height: 1.6; }
.episode-sources a { display: inline-block; min-height: 1.65rem; }
.history-end { display: flex; flex-wrap: wrap; align-items: center; gap: .85rem 1.5rem; margin-top: clamp(2.5rem, 6vw, 5rem); }

@media (min-width: 36rem) {
  .history-index ol { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 52rem) {
  .history-opening { grid-template-columns: .9fr 1.1fr; }
  .comic-panels { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
