body {
  background-color: #f1ede4;
  margin: 0;
  font-family: "Meiryo", "Yu Gothic", sans-serif;
}

i {
  font-family: "Noto Sans", sans-serif;
  font-style: italic;
}

.sp-main-container {
  display: none;
}

a {
  color: #969734;
}

/* ナビゲーションバーの全体的なスタイル */
#navbar {
  width: 100%;
  background-color: #333;
  color: #fff;
  padding: 10px;
  display: flex;
  align-items: center;
  top: 0;
  font-family: "Meiryo", "Yu Gothic", sans-serif;
  box-sizing: border-box;
  flex-wrap: wrap;
  position: fixed;
  z-index: 100;
}

#navbar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-right: 20px; /* ナビメニューとの間に余白を追加 */
}

em {
  font-family: "Arial";
  font-style: italic;
}

#navbar-logo img {
  width: 50px;
  height: 50px;
  border-radius: 50%;
}

#navbar-points {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 1em;
  font-weight: bold;
  color: #d36922;
}

#hamburger-menu {
  display: none; /* デフォルトは非表示 */
  cursor: pointer;
  padding: 5px;
  position: absolute;
  right: 20px;
  top: 25px;
  z-index: 100;
}

#hamburger-menu span {
  display: block;
  width: 25px;
  height: 3px;
  background-color: #fff;
  margin: 5px 0;
  transition: transform 0.4s ease;
}

.point-item {
  display: flex;
  align-items: center;
  gap: 5px;
}

nav ul {
  list-style: none;
  display: flex;
  gap: 20px;
  padding: 0;
  margin: 0;
}

nav a {
  color: #fff;
  text-decoration: none;
  font-weight: bold;
  display: flex;
  flex-direction: column;
  align-items: center;
  opacity: 0.7;
  transition: opacity 0.2s;
}

nav a:hover {
  opacity: 1;
}

nav a.active {
  opacity: 1;
  text-decoration: underline;
  color: #d36922;
}

nav img {
  width: 32px;
  height: 32px;
  margin-bottom: 5px;
}

.container {
  max-width: 800px;
  margin: 10% auto;
  padding: 20px;
  background-color: #fff;
  border-radius: 10px;
  box-shadow: 0 0px 10px rgba(0, 0, 0, 0.1);
}

h1,
h2,
h3,
h4 {
  color: #5c4033;
  text-align: center;
}
/* list.php用CSS*/

.character-list {
  list-style: none;
  padding: 0;
}
.character-item {
  display: flex;
  align-items: center;
  border: 1px solid #ccc;
  padding: 10px;
  margin-bottom: 10px;
  border-radius: 8px;
  text-decoration: none;
  color: #333;
  transition: background-color 0.2s;
}
.character-item:hover {
  background-color: #f0f0f0;
}
.character-icon {
  width: 50px;
  height: 50px;
  border-radius: 5px;
  margin-right: 15px;
  object-fit: cover;
}
.character-details {
  display: flex;
  flex-direction: column;
}
.character-name {
  font-size: 1.2em;
  font-weight: bold;
}
.character-greeting {
  font-size: 0.9em;
  color: #666;
  margin-top: 5px;
}

/* ポップアップコンテナの基本スタイル */
#popup-message-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 1000;
}

/* ポップアップメッセージ共通のスタイル */
.popup-message {
  height: auto;
  padding: 5px;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  color: #fff;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: opacity 0.4s ease-in-out, transform 0.4s ease-in-out,
    visibility 0.4s;
  margin-top: 10px; /* 複数表示時の間隔 */
}

/* 表示時のスタイル */
.popup-message.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* 成功メッセージの色 */
.success-popup {
  background-color: #969734; /* 緑 */
}

/* エラーメッセージの色 */
.error-popup {
  background-color: #d36922; /* 赤 */
}

/* トースト通知のコンテナ */
.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

/* トースト通知本体 */
.toast {
  background-color: #333;
  color: white;
  padding: 15px;
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  width: 300px;
  max-width: 90vw;
  /* font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;*/
  animation: slideIn 0.5s ease-out forwards;
  position: relative;
  overflow: hidden;
}

.toast.success {
  background-color: #4caf50; /* Green for success */
}

.toast.error {
  background-color: #f44336; /* Red for error */
}

/* トーストのコンテンツ（アイコンとメッセージ） */
.toast-content {
  display: flex;
  align-items: center;
  gap: 10px;
}

.toast-content svg {
  flex-shrink: 0;
}

/* メッセージ部分 */
.toast-message {
  flex-grow: 1;
  font-weight: bold;
}

/* 閉じるボタン */
.toast-close {
  cursor: pointer;
  font-size: 24px;
  font-weight: bold;
  color: rgba(255, 255, 255, 0.7);
  transition: color 0.2s;
}

.toast-close:hover {
  color: white;
}

/* プログレスバー */
.toast-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background-color: rgba(0, 0, 0, 0.2);
  animation: progressBar 5s linear forwards;
}

/* アニメーション */
@keyframes slideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

.toast.fade-out {
  animation: fadeOut 0.5s ease-in forwards;
}

@keyframes fadeOut {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(100%);
    opacity: 0;
  }
}

@keyframes progressBar {
  from {
    width: 100%;
  }
  to {
    width: 0;
  }
}

/*home.phpのcss*/

/* 新しいメモ帳デザインのCSS */
.note2 {
  color: #696969;
}
.sen2 {
  background-color: #fff;
  background-image: linear-gradient(
    180deg,
    rgba(100, 100, 100, 0) 0%,
    rgba(100, 100, 100, 0) 98%,
    #646464 100%
  );
  background-size: 100% 2em;
  line-height: 2em;
  padding: 2em 1em 0.2em 1em;
  border-radius: 10px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
  border: 1px solid #ffffffff;
  border-radius: 10px;
}

/* 既存のレイアウトCSS */

.main-container {
  width: auto;
  max-width: 90%;
  align-items: flex-start;
  /* gap: 20px; */
  margin: 10% auto;
  display: flex;
  justify-content: center;
}
.chara-prf-bg img {
  display: flex;
  justify-content: center;
  align-items: center;
  background: url("img/back.png") center/cover no-repeat;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
  border: 5px solid #fff;
  margin-top: 3%;
  min-height: 180px;
  max-height: 600px;
  max-width: 600px;
}

.chara-area {
  gap: 20px;
}
.chara-flex-wrapper {
  display: flex;
  align-items: flex-start;
}
.chara-info-container {
  width: auto;
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap; /* Prevent wrapping */
  align-items: stretch;
  margin-top: 0;
  flex-grow: 1; /* Allow to grow and fill space */
}
.chara-info-text {
  top: 0px;
  width: 400px;
  height: auto;
  z-index: 3;
}
.chara-prf-img-container {
  position: relative;
  width: 50%;
  z-index: 2;
}
.main-container img {
  max-height: 600px;
  margin-top: 10%;
}
/* .chara-prf-bg {
  width: 350px;
  max-height: 650px;
  z-index: 4; /* 背景として表示 */

/* background-size: cover;
  background-repeat: no-repeat;
  background-position: center;

  margin-top: 3%;
}  */
.wp-cc-area {
  width: auto;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  margin-top: 50px;
  margin-left: 3%;
}
.work-btn-container {
  display: block;
}
.work-btn {
  cursor: pointer;
  background: none;
  border: none;
  margin-left: 0;
  margin-top: 1em;
  font-weight: bold;
  color: #4e2613;
  text-align: center;
}

.fusen-3:hover {
  transform: scale(1.05);
}
.tooltip-container {
  z-index: 10;
}
.tooltip-text {
  visibility: hidden;
  background-color: #555;
  color: #fff;
  text-align: center;
  border-radius: 6px;
  padding: 5px 10px;
  position: absolute;
  z-index: 1;
  left: 0; /* 左寄せに */
  opacity: 0;
  transition: opacity 0.3s;
  white-space: nowrap; /* テキストが折り返されないように */
  font-size: 12px; /* 文字を小さく */
  width: 150px; /* 幅を広く */
}
.tooltip-container:hover .tooltip-text {
  visibility: visible;
  opacity: 1;
}

.tooltip-text2 {
  visibility: hidden;
  background-color: #555;
  color: #fff;
  text-align: center;
  border-radius: 6px;
  padding: 5px 10px;
  position: absolute;
  z-index: 1;
  bottom: 80px;
  left: 0; /* 左寄せに */
  opacity: 0;
  transition: opacity 0.3s;
  white-space: nowrap;
  font-size: 12px;
  width: 120px;
}
.tooltip-container:hover .tooltip-text2 {
  visibility: visible;
  opacity: 1;
}

/* === 簡易版ステータスバー関連のCSS === */
.status-container {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 10px;
}
.status-item {
  display: flex;
  align-items: center;
  font-size: 14px;
  font-weight: bold;
  width: 40%; /* 2列表示 */
}
.status-label {
  width: 30px;
}
.status-bar {
  height: 10px;
  border-radius: 5px;
  background-color: #969734;
  margin-left: 10px;
}
/* 吹き出しのCSS */
.fukidashi-01 {
  margin: 0 0 0 auto;
  position: relative;
  width: fit-content;
  padding: 12px 16px;
  border: 2px solid #333333;
}
.fukidashi-01::after {
  content: "";
  position: absolute;
  top: calc(100% + 5px);
  left: 50%;
  width: 30px;
  height: 2px;
  box-sizing: border-box;
  background-color: #333333;
  box-shadow: 0 2px 0 #ffffff, 0 -2px 0 #ffffff;
  rotate: 50deg;
}

/* Enoとキャラクター名の位置を調整するためのCSS */
.chara-name-container {
  position: relative;
  z-index: 10;
  top: -20px; /* 値をマイナスにして上に移動 */
}
.tooltip-text,
.tooltip-text2 {
  bottom: auto;
  top: -20%;
  left: 50%;
  transform: translateX(-50%);
}

#hamburger-menu {
  display: none;
  text-align: center;
  font-size: smaller;
}

@media screen and (max-width: 810px) {
  .container {
    margin: 30% 0 0;
    width: 100%;
  }

  body {
    height: 100svh;
  }

  .sp-main-container {
    margin: 30% 0 0;
    display: block;
    width: 100%;
    padding: 0;
    font-family: "Meiryo", "Yu Gothic", sans-serif;
    background: none;
  }
  .sen2 {
    padding: 0;
  }

  .chara-name-c {
    /* padding: 16px 8px 8px 8px; */
    position: relative;
    display: flex;
    flex-direction: column;
    margin-top: 5%;
  }
  .fukidashi-01 {
    position: relative;
    margin: auto auto;
    display: flex;
    flex-direction: column;
    margin-bottom: 5%;
  }
  .chara-name-c h3 {
    color: #4e2613;
    font-size: 1.3em;
    margin: 5vw 0 8px 0;
    font-weight: bold;
  }
  .wp-cc-area {
    display: flex;
    flex-direction: row;
    justify-content: space-around;
  }
  /* .fukidashi-01 {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    padding: 10px 12px;
    margin: 10px 0;
    font-size: 1em;
    color: #4e2613;
    border: 1px solid #e0c9b6;
  } */
  /* .sen2 {
    font-family: "Yu Gothic", "Meiryo", sans-serif;
    font-size: 1em;
    color: #4e2613;
  } */
  .chara-img-c {
    display: flex;
    justify-content: center;
    align-items: center;
    background: url("img/back.png") center/cover no-repeat;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    border: 5px solid #fff;
    margin-top: 3%;
    min-height: 180px;
  }
  .chara-img-c img {
    max-height: 90%;
    max-width: 90%;
  }
  .chara-profile-c {
    width: 100%;
    padding: 16px 8px;
    margin-top: 2%;
    border-radius: 12px;
  }
  .status-c {
    margin-bottom: 12px;
    padding: 10px;
  }
  .status-label {
    font-size: 0.95em;
    color: #4e2613;
    margin-right: 4px;
  }
  .profile-text {
    margin-top: 10px;
    font-size: 1em;
    color: #4e2613;
    font-family: "Meiryo", sans-serif, "Yu Gothic";
    border-radius: 8px;
    padding: 10px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
  }
  .work-btn-new {
    width: 60px;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
  }

  .work-btn-new img {
    display: block;
    width: 100%; /* 画像をボタンの幅に合わせる */
    height: auto;
  }

  .status-c .status-row {
    display: flex;
    flex-wrap: wrap;
  }
  .status-item {
    flex: 0 0 48%; /* 2列 */
    box-sizing: border-box;
  }

  #navbar-logo {
    display: flex;
    size: smaller;
    align-items: center;
    gap: 0;
    margin-right: 20px; /* ナビメニューとの間に余白を追加 */
  }

  .navbar-item {
    width: 10vw;
  }

  /* #navbar-logo {
    display: flex;
    text-align: left;
  } */
}

/* スマートフォン向けのメディアクエリ */
@media (max-width: 810px) {
  #hamburger-menu {
    display: block;
  }

  #navbar {
    flex-direction: row;
    justify-content: space-between;
    padding: 15px;
    width: 100%;
    height: 20%;
  }

  #nav-menu {
    display: none;
    position: absolute;
    top: 18%; /* ナビバーの高さに合わせて調整 */
    left: 0;
    width: auto;
    background-color: #333;
    z-index: 99;
    padding: 10px; /* 縦横のパディングを調整 */
    align-items: center;
    transition: transform 1s ease-in-out;
    transform: translateY(-100%);

    /* 修正箇所 */
    flex-direction: row;
    justify-content: center;
    flex-wrap: wrap; /* ここで折り返しを有効にする */
    gap: 15px; /* 各メニュー項目の間に隙間を追加 */
  }

  #nav-menu.active {
    display: flex; /* `flex`に変更 */
    transform: translateY(0);
  }

  #nav-menu ul {
    flex-direction: row; /* 子要素も横並びに変更 */
    flex-wrap: wrap; /* ここで折り返しを有効にする */
    justify-content: center;
    width: auto;
    padding: 0;
    margin: 0;
    gap: 0px;
  }

  #nav-menu .navbar-item {
    width: auto; /* 幅を自動調整 */
    text-align: center;
    border-bottom: none; /* 縦線のボーダーを削除 */
    width: 100px;
  }
}

#nav-menu .navbar-item:last-child {
  border-bottom: none;
}

#nav-menu .navbar-item .navbar-link {
  width: 100%;
  padding: 15px 0;
}

.center-natte {
  margin-left: -6px;
}

/* ハンバーガーメニューのアニメーション */
#hamburger-menu.active span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}
#hamburger-menu.active span:nth-child(2) {
  opacity: 0;
}
#hamburger-menu.active span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

.naver-leftup {
  display: flex;
  flex-direction: row;
  align-items: center;
}

/* NewHome.php */
.fusen-2 {
  display: inline-block;
  position: relative;
  padding: 0.5em 1em;
  border-right: 27px solid #969734;
  background-color: #f5f5f5;
  color: #4e2613;
  width: 100px;
  margin: 1%;
  filter: drop-shadow(0 1px 1px);
  transition: letter-spacing 0.3s;
}

.sb-container {
  display: flex;
  flex-direction: column;
  width: 150px;
  position: absolute;
  left: 60%;
  top: 22%;
  font-family: "Meiryo", "Yu Gothic", sans-serif;
  font-weight: bold;
}

.fusen-3 {
  display: flex;
  align-items: center;
  position: relative;
  width: 100px;
  height: 100px;
  margin-top: 100%;
  bottom: 0%;
  padding: 2em;
  background-color: #d3ae6f;
  color: #333333;
  filter: drop-shadow(0 1px 1px);
  transition: transform 0.2s;
}
/* .fusen-3 a {
  color: #f1ede4;
  text-decoration: none;
} */

.fusen-3 img {
  margin-left: -20%;
}

.fusen-2:hover {
  letter-spacing: 0.1em;
}

.fusen-3:hover {
  transform: rotate(0.01turn);
}

.WC {
  position: absolute;
  top: 65%;
  left: 30%;
  font-family: "Meiryo", "Yu Gothic", sans-serif;
  font-weight: bold;
  color: #4e2613;
  font-size: larger;
  filter: drop-shadow(1px 1px 1px #fff);
}

.name {
  position: absolute;
  left: 35%;
  transform: rotate(-5deg);
  background: #969734;
  box-shadow: 0px 0px 0px 5px #969734;
  border: dashed 2px white;
  padding: 0.2em 0.5em;
  color: #454545;
  font-weight: bold;
}

.name:after {
  position: absolute;
  content: "";
  right: -7px;
  top: -7px;
  border-width: 0 15px 15px 0;
  border-style: solid;
  border-color: #969734 #f1ede4 #ffdb88;
  box-shadow: -1px 1px 1px rgba(0, 0, 0, 0.15);
}
.name p {
  margin: 0;
  padding: 0;
}

@media screen and (max-width: 810px) {
  .main-container {
    margin-top: 20%;
    min-height: 50%;
  }

  .sb-container {
    left: 65%;
    margin-right: 1%;
    margin-left: 5%;
    top: 30%;
  }

  .fusen-2 {
    margin-left: auto;
    margin-right: 0;
  }
  .WC {
    left: 0;
  }
  .name {
    left: 0;
    top: 25%;
  }
}

h2 {
  padding: 0.5em 0.7em;
  border-left: 5px solid #969734;
}
