.hwb {
  position: relative;
  width: calc(100% - 32px);
  margin: 16px;
  color: #edc38d;
  font-family: var(--jp);
}

.hwb .hwb__main {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 8px;
  background: #4a0a0a;
  color: #edc38d;
  text-decoration: none;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
}

.hwb__main img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: left center;
}

.hwb__main::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(to left, rgba(74, 10, 10, 0.92) 0%, rgba(74, 10, 10, 0.92) 48%, rgba(74, 10, 10, 0) 100%);
}

.hwb__copy {
  position: relative;
  z-index: 1;
  padding: 16px;
  text-align: right;
}

.hwb__eyebrow {
  display: block;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.2em;
}

.hwb__title {
  display: block;
  margin-top: 6px;
  font-size: 30px;
  font-weight: 900;
  line-height: 1.2;
  letter-spacing: 0;
  white-space: nowrap;
}

.hwb__title span {
  display: block;
}

.hwb__tag {
  display: block;
  margin-top: 6px;
  font-size: 11px;
  line-height: 1.2;
}

.hwb__cta {
  display: block;
  margin-top: 8px;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.2;
}

.hwb__close {
  display: none;
}

.hwb a:focus-visible,
.hwb button:focus-visible {
  outline: 3px solid #edc38d;
  outline-offset: 3px;
}

@media (min-width: 900px) {
  .hwb {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 30;
    width: 360px;
    margin: 0;
    animation: hwb-enter 0.4s ease-out;
  }

  .hwb__copy {
    padding: 20px;
  }

  .hwb__title {
    font-size: 28px;
  }

  .hwb__close {
    position: absolute;
    top: -12px;
    right: -12px;
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    padding: 0;
    border: 1px solid #edc38d;
    border-radius: 50%;
    background: #4a0a0a;
    color: #edc38d;
    font: inherit;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
  }
}

@keyframes hwb-enter {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .hwb {
    animation: none;
  }
}

/* スマホ用メニューを開いている間は隠す。幅 900px ちょうどでメニューと重なるため */
html.menu-open .hwb { display: none; }
