@font-face {
  font-family: 'YDWaosagiR'; 
  src: url('fonts/YDWaosagi.otf') format('opentype');
}

body {
  background: #f5f5f5;
  background-image: url("./img/background02.png");
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  position: relative; /* ← 擬似要素を重ねるため */
  z-index: 0; /* ← 子要素より後ろに */
}
body::before {
  content: "";
  position: fixed; /* スクロールしても背景に追従 */
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.85); /* 半透明の白 */
  z-index: -1; /* ← 背景より下に配置 */
}

body {
  font-family: "YDWaosagiR",sans-serif;
  margin: 0;
  padding: 0;
}

/* ヘッダー */
.header {
  background: #f18541;
  padding: 1em;
  text-align: center;
  white-space: nowrap;
}

.header ul {
  font-size: 20px;
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  justify-content: center;
  gap: 1.5em;
}

.header a {
  color: white;
  text-decoration: none;
}


/* ホーム */
.page_setumei {
  font-size: 22px;
  color: #474747;
  padding: 2em 0;
  white-space: nowrap;
}

.page_setumei img {
  margin-top: 60px;
}


.update-history {
  font-size: 20px;
  color: #474747;
  text-align: center;

  max-width: 600px;
  margin: 60px auto;
  padding: 20px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.update-history ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.update-history li {
  display: flex;
  flex-direction: column;
  padding: 12px;
  border-left: 4px solid #f18541;
  margin-bottom: 12px;
  background: #f9f9f9;
  border-radius: 8px;
}

.update-history .date {
  font-weight: bold;
  /* color: #4a90e2; */
}

.update-history .content {
  margin-top: 4px;
}

/* キャラクターページ */
.character-page {
  display: flex;
  justify-content: center; /* 横方向の中央寄せ */
  gap: 2em; /* キャラ画像と説明文の間隔 */
  flex-wrap: wrap; /* 小さい画面で折り返し可能に */
  padding: 2em 0; /* 上下に余白 */
  margin-bottom: 100px;
}

.portrait img {
  width: auto;
  max-height: 700px;
}

.description img {
  margin-top: 30px;
  max-width: 500px;
  height: auto;
}

/* ポーズ切り替えボタン1 */
.pose-buttons {
  margin-top: 1em;
}

.pose-buttons button {
  margin: 0.3em;
  padding: 0.4em 0.8em;
  background: #555;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

.pose-buttons button.active {
  background: #ff7f50;
}

/* ポーズ切り替えボタン2 */
.pose-buttons2 {
  margin-top: 1em;
}

.pose-buttons2 button {
  margin: 0.3em;
  padding: 0.4em 0.8em;
  background: #555;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

.pose-buttons2 button.active {
  background: #20b2aa;
}

/* 音声再生ボタン1 */
.voice-samples button {
  margin: 0.5em;
  padding: 0.5em 1em;
  background: #444;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.2s;
}

.voice-samples button:hover {
  background: #666;
}

.voice-samples button.playing {
  background: #ff7f50;
}

/* 音声再生ボタン2 */
.voice-samples2 button {
  margin: 0.5em;
  padding: 0.5em 1em;
  background: #444;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.2s;
}

.voice-samples2 button:hover {
  background: #666;
}

.voice-samples2 button.playing {
  background: #20b2aa;
}

/* フッター */
footer {
    text-align: center;
    padding: 10px;
    background-color: #ddd;
}

*, *::before, *::after {
  box-sizing: border-box;
}

body {
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
}

.header {
  white-space: normal;
}

.header ul {
  flex-wrap: wrap;
  gap: 0.6em 1.5em;
}

.header a {
  display: inline-block;
  padding: 0.2em 0;
}

.page_setumei {
  max-width: 900px;
  margin: 0 auto;
  padding: 2em 16px;
  line-height: 1.8;
  white-space: normal;
}

.update-history {
  width: min(600px, calc(100% - 32px));
}

.update-history font[size="6"] {
  font-size: clamp(28px, 7vw, 40px);
}

@media (max-width: 768px) {
  body {
    background-attachment: scroll;
  }

  .header {
    padding: 0.75em;
  }

  .header ul {
    font-size: 16px;
    gap: 0.5em 1em;
  }

  .page_setumei {
    font-size: 17px;
    padding: 1.5em 14px;
  }

  .page_setumei br {
    display: none;
  }

  .page_setumei img {
    margin-top: 28px;
    max-height: 100px;
  }

  .update-history {
    font-size: 16px;
    margin: 36px auto;
    padding: 16px;
  }
}

@media (max-width: 480px) {
  .header ul {
    font-size: 14px;
  }
}
