@charset "utf-8";

.history-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background-color: rgb(255 255 255 / 50%);
  z-index: -1;
  /* テキストにかぶらず背景だけ白くなる */
}

.history-section {
  padding: 3rem 2rem;
  margin: 3rem auto;
  background-color: #fec;
  box-shadow:
    2px 2px 3px rgba(0, 0, 0, 0.4),
    0 0 30px #630 inset;
  color: #2c1a08;
  line-height: 1.9;
  position: relative;
  z-index: 1;
  font-family: var(--mincho);
}

.history-section h2 {
  font-size: 2rem;
  letter-spacing: 0.2em;
  margin-bottom: var(--page-space-block);
  color: #3b2a1d;
  padding-bottom: 0.5rem;
  font-weight: 700;
  text-align: center;
}

.history-box p {
  line-height: 1.8;
  color: #2e1f13;
  margin-bottom: var(--page-space-block);
  text-align: justify;
}

.name {
  font-size: 1.5em;
}

h4.name,
h4.name ruby {
  text-align: center;
  font-weight: 700;
}

.mask-bg {
  color: transparent;
  font-weight: bold;
  overflow: hidden;
  position: relative;
  transition: color 0ms 450ms;
  padding-block-start: 1.2em; /* ルビがoverflow:hiddenの内側に収まるように確保 */
  width: 100%;
  text-align: center;
  transform: translateZ(0); /* GPU合成でサブピクセルのにじみ防止 */
}

#yaminohamaru.mask-bg::after {
  background: linear-gradient(241deg, #141e30, #485563);
  bottom: -4px; /* 境界のサブピクセルを確実に覆う */
  content: '';
  display: block;
  left: 0;
  position: absolute;
  right: 0;
  top: -4px;
  transform: translate(0, 100%);
}

#yaminohamaru.mask-bg.is-animated {
  color: #8e1616;
}

.mask-bg.is-animated::after {
  animation: mask-bg 1.8s cubic-bezier(0.8, 0, 0.17, 1);
  will-change: transform;
}

@keyframes mask-bg {
  0% {
    transform: translate(0, 101%);
  }

  40%,
  60% {
    transform: translate(0, 0%);
  }

  100% {
    transform: translate(0, -101%);
    opacity: 0;
  }
}

.rikishi-box {
  background: #996633;
  margin: 1em 0;
  padding: 0;
  border: 8px solid #a60;
  box-shadow:
    2px 2px 4px #999,
    2px 2px 2px #663300 inset;
  margin-bottom: var(--page-space-block);
}

.rikishi {
  display: flex;
  flex-direction: row-reverse;
}

.column {
  display: flex;
  flex-direction: row-reverse;
  flex: 1;
  min-width: 0;
  margin: 0;
}

.column > img,
.column > a {
  flex: 1;
  min-width: 0;
}

.column a {
  display: block;
}

.rikishi img {
  width: 100%;
  height: auto;
  display: block;
}

@media screen and (max-width: 768px) {
  .rikishi {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    direction: rtl;
  }

  .column {
    direction: ltr;
  }

  .rikishi img {
    width: 100%;
    height: auto;
  }
}

@media screen and (max-width: 480px) {
  .rikishi img {
    height: 180px;
  }
}

.banzuke {
  margin: 0;
}
