.era-index {
  position: sticky;
  top: calc(var(--ho-header-height) + 24px);
  max-height: calc(100dvh - var(--ho-header-height) - 48px);
  padding-right: 8px;
  overflow-y: auto;
  scrollbar-color: var(--ho-line-strong) transparent;
  scrollbar-width: thin;
  align-self: start;
}

.era-index h2 {
  margin: 0;
  font-family: var(--ho-font-ui);
  font-size: 0.94rem;
  font-weight: 680;
}

.era-index ol {
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}

.era-index button {
  display: grid;
  width: 100%;
  min-height: 46px;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 10px;
  padding: 7px 4px 7px 0;
  align-items: center;
  border: 0;
  border-bottom: 1px solid var(--ho-line);
  background: transparent;
  color: var(--ho-ink-muted);
  text-align: left;
}

.era-index button:hover,
.era-index button.is-current {
  color: var(--ho-ink);
}

.era-index button.is-outside-scope:not(.is-current) {
  /* These still open period context. Keep their text readable; the unfilled
     seal already distinguishes them from periods with event coverage. */
  opacity: 1;
}

.era-index button.is-outside-scope .era-seal,
.era-index button.is-outside-scope:hover .era-seal,
.era-index button.is-outside-scope.is-current .era-seal {
  border-color: var(--ho-line-strong);
  background: transparent;
  color: var(--ho-ink-muted);
  box-shadow: none;
}

.era-index button.is-outside-scope .era-seal::after {
  border-color: var(--ho-line);
}

.era-index button:hover .era-seal,
.era-index button.is-current .era-seal {
  background: #7f2f24;
  box-shadow:
    inset 0 0 0 1px rgba(255, 239, 215, 0.32),
    0 0 0 1px rgba(99, 35, 26, 0.2);
}

.era-seal {
  position: relative;
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid rgba(104, 34, 25, 0.48);
  border-radius: 2px;
  background: #963d2b;
  color: #f7e9d3;
  box-shadow: inset 0 0 0 1px rgba(255, 239, 215, 0.22);
  transition:
    background-color 160ms ease,
    box-shadow 160ms ease;
}

.era-seal::after {
  position: absolute;
  inset: 3px;
  border: 1px solid rgba(255, 235, 207, 0.42);
  content: "";
  pointer-events: none;
}

.era-seal span {
  position: relative;
  z-index: 1;
  font-family: "Kaiti SC", STKaiti, "Yu Mincho", "Hiragino Mincho ProN", serif;
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: -0.09em;
  line-height: 1;
  transform: translateX(-0.03em);
}

.era-label {
  min-width: 0;
}

.era-index strong,
.era-index small {
  display: block;
}

.era-index strong {
  font-family: var(--ho-font-reading);
  font-size: 0.94rem;
  font-weight: 600;
  line-height: 1.15;
}

.era-index small {
  margin-top: 2px;
  color: var(--ho-ink-muted);
  font-size: 0.81rem;
  font-variant-numeric: tabular-nums;
  line-height: 1.15;
}
