/*========= 画像をマウスオーバーで切り替え、画像の上に文字を配置するためのCSS ===============*/
.bg{}
.switch_image01 {
    position: relative;
}
.switch_image01 img {
    transition: opacity 0.5s;
}
.switch_image01:hover img:first-of-type {
    opacity: 0;
}
.switch_image01 img:last-of-type {
    position: absolute;
    top: 0px;
    left: 0px;
    opacity: 0;
}
.switch_image01:hover img:last-of-type {
    opacity: 1;
}

/* 修正前（現状）：幅未指定のため、コンテナ幅の半分でテキストが折り返される */
.center {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

/* 修正後（提案）：body に .fixed が付くとこちらが優先され、一行表示になる */
body.fixed .center {
  width: max-content;
  max-width: none;
  white-space: nowrap;
}

/* ここからデモページ専用の装飾（納品物には含まれません） */
body {
  margin: 0;
  font-family: "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
  background: #f4f4f4;
}
.demo-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 14px 12px;
  background: #222;
  color: #fff;
  font-size: 14px;
  flex-wrap: wrap;
}
.demo-bar .status {
  font-weight: bold;
  padding: 4px 12px;
  border-radius: 999px;
}
body:not(.fixed) .demo-bar .status {
  background: #e0554d;
}
body.fixed .demo-bar .status {
  background: #3fae5c;
}
.demo-toggle {
  cursor: pointer;
  border: none;
  background: #fff;
  color: #222;
  padding: 8px 18px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: bold;
}
.demo-toggle:hover {
  background: #ddd;
}
.demo-stage {
  display: flex;
  justify-content: center;
  padding: 40px 12px;
}
