@charset “utf-8”;
/* === モーダル非表示（初期） ============================== */
.modalNoDisp {
  display: none;
}
/* === モーダルバックグランド ============================== */
.modalBg {
  position: fixed;
  overflow: hidden;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background: radial-gradient(
    circle at 50% 50%,
    rgba(0, 0, 0, 0.9),
    rgba(0, 0, 0, 0.7)
  );
  z-index: 100;
}
/* === モーダルバックグランド：OPEN時のアニメーション ====== */
.modalBgOpen {
  animation: bgOpenAnime 0.3s ease;
}
@keyframes bgOpenAnime {
  /* フェードイン */
  0% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}
/* === モーダルバックグランド：CLOSE時のアニメーション ===== */
.modalBgClose {
  bottom: 100%;
  animation: bgCloseAnime 0.3s ease;
}
@keyframes bgCloseAnime {
  /* フェードイン */
  0% {
    opacity: 1;
    bottom: 0;
  }
  100% {
    opacity: 0;
    bottom: 0;
  }
}
/* === モーダルウインド ==================================== */
.modalBg .modalWindow {
  /* モーダルウインドを中心に表示 */
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 11;
  font-size: 16pt;
  /* text-align    : center; */
}
/* === モーダルウインド：OPEN時のアニメーション============= */
.modalBgOpen .modalWindow {
  animation: modalOpenAnime 0.3s ease;
}
@keyframes modalOpenAnime {
  /* 下→中心 */
  0% {
    top: 150%;
  }
  100% {
    top: 50%;
  }
}
/* === モーダルウインド：CLOSE時のアニメーション============ */
.modalBgClose .modalWindow {
  animation: modalCloseAnime 0.3s ease;
}
@keyframes modalCloseAnime {
  /* 中心→下 */
  0% {
    top: 50%;
  }
  100% {
    top: 150%;
  }
}
.wrap-obi2 {
  width: 100%;
  height: 20px;
  background: url("img/obi2.png") repeat-x;
  background-position-y: 3px;
  margin: 0;
  clear: both;
}
@media screen and (max-width: 500px) {
  .wrap-obi2 {
    height: 10px;
    background-position-y: 0px;
  }
}
/********
    ファンアートポップアップ
*********/
.fan-modalWindow {
  /* ↓モーダルウインドウの見た目：変更してください */
  width: 70vw;
  height: 50vw;
  /* min-height    : 330px; */
  /* background    : #fff; */
  /* border        : 3px solid #35557f; */
  /* border-radius : 10px; */
}
.modal-fan-image {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 70%;
  display: inline-flex;
}
.modal-fan-image-fanart {
  background: url(img/present.png) no-repeat;
  background-size: contain;
}
.modal-fan-image-benmik {
  background: url(img/benmik/back.png) no-repeat;
  background-size: contain;
}
.lp-fan-image {
  width: 100%;
  object-fit: contain;
}

.modal-fan-detail {
  position: absolute;
  top: 0;
  bottom: 0;
  right: 0;
  width: 30%;
}

.lp-fan-close {
  width: 40px;
  height: 40px;
  margin-left: 10px;
}
.lp-fan-close a {
  display: block;
}
.lp-fan-close a img {
  width: 100%;
}

.lp-fan-detail {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 50px;
  text-align: left;
  font-size: 13px;
}
a.lp-fan-button {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 0px;
  height: 40px;
  line-height: 40px;
  background-color: #fff;
  text-align: center;
  text-decoration: none;
  color: #000;
  font-size: 12px;
  font-weight: bold;
}
.lp-fan-button::after {
  content: "＞";
  position: absolute;
  right: 5px;
}
@media screen and (max-width: 500px) {
  .modalBg .fan-modalWindow {
    width: 90%;
    height: auto;
    text-align: center;
  }
  .modal-fan-image {
    width: 70vw;
    height: 70vw;
    position: static;
  }
  .modal-fan-detail {
    position: static;
    width: 100%;
    height: 50px;
  }
  .lp-fan-close {
    width: 100%;
    height: 50px;
  }
  .lp-fan-close a {
    width: 30px;
  }
  .lp-fan-detail {
    height: 150px;
    position: static;
    font-size: 12px;
  }
  a.lp-fan-button {
    position: static;
    width: 100%;
    display: block;
  }
}
@media screen and (max-width: 330px) {
  .modal-fan-detail {
    height: 100px;
  }
  .lp-fan-close {
    height: 20px;
  }
  .lp-fan-close a {
    height: 100%;
    width: auto;
  }
  .lp-fan-close a img {
    height: 100%;
    width: auto;
  }
  .lp-fan-detail {
    height: auto;
    margin: 5px 0;
  }
}
@media screen and (min-width: 1200px) {
  .modalBg .fan-modalWindow {
    width: 800px;
    height: 600px;
  }
  .modal-fan-image {
    width: 600px;
    height: 600px;
  }
  .modal-fan-detail {
    width: 200px;
    height: 600px;
  }
  .lp-fan-detail {
    font-size: 16px;
  }
}
/********
    ナマイキポップアップ
*********/
.modalBg .namaiki-modalWindow {
  display: flex;
  width: 90%;
}
.modal-namaiki-area {
  background-color: #000;
  width: 95%;
}
.modal-namaiki-frame {
  display: flex;
}
.modal-namaiki-image {
  width: 80%;
  padding: 25px;
}
.modal-namaiki-image img {
  width: 100%;
}
.modal-namaiki-detail {
  width: 50%;
  padding: 20px;
}
.lp-namaiki-close {
  width: 5%;
  margin-left: 10px;
}
.lp-namaiki-close a {
  display: block;
}
.lp-namaiki-close a img {
  width: 100%;
}
.lp-namaiki-button {
  clear: both;
}
@media screen and (max-width: 600px) {
  .modal-namaiki-frame {
    display: block;
  }
  .modal-namaiki-image {
    margin: 0 auto;
    padding: 10px;
  }
  .modal-namaiki-detail {
    margin: 0 auto;
    width: 80%;
    padding: 0;
  }
}
@media screen and (min-width: 1200px) {
  .modalBg .namaiki-modalWindow {
    width: 1000px;
    height: 550px;
  }

  .modal-namaiki-area {
    width: 940px;
  }
  .modal-namaiki-image {
    width: 500px;
    padding: 25px;
  }
  .modal-namaiki-detail {
    width: 440px;
    padding: 20px;
  }
  .lp-namaiki-close {
    width: 50px;
    margin-left: 10px;
  }
}

/********
    ナマイキホルダー用ポップアップ
*********/
.modalBg .holder-modalWindow {
  width: 90%;
}
.modal-holder-area {
  background-color: #000;
  width: 95%;
  max-width: 800px;
  margin: 0 auto;
}
.modal-holder-image {
  width: 90%;
  padding: 25px;
  margin: 0 auto;
}
.modal-holder-image img {
  width: 100%;
}
.lp-holder-close {
  width: 5%;
  margin-left: 10px;
}
.lp-holder-close a {
  display: block;
}
.lp-holder-close a img {
  width: 100%;
}
/* 詳細 */
#lp-name {
  letter-spacing: inherit;
  font-size: 20px;
}
#lp-detail {
  font-size: 14px;
  line-height: 24px;
  margin: 10px 0;
  height: 100px;
  overflow-y: auto;
}
#lp-habitat {
  font-size: 12px;
}
.lp-gene-button {
  background: linear-gradient(5deg, #00f7dc 30%, #7bc3f1 50%, #ea97ff 60%);
  padding: 1px;
  width: 80%;
  font-size: 14px;
  margin: 5px 0;
}
.lp-gene-button-inner {
  background: #000;
  padding: 1px;
  text-align: center;
}
.lp-gene-button-inner a {
  line-height: 20px;
  margin: 0;
  padding: 10px;
  color: #fff;
  text-decoration: none;
  display: block;
  position: relative;
}
.lp-gene-button-inner a::after {
  content: ">";
  position: absolute;
  right: 12px;
}
@media screen and (max-height: 700px) {
  .modalBg .namaiki-modalWindow {
    width: 90%;
    height: auto;
    font-size: 16px;
  }
  #lp-no {
    letter-spacing: 1.9px;
    font-size: 12px;
  }
  #lp-name {
    letter-spacing: 1.5px;
    font-size: 16px;
  }
  #lp-detail {
    font-size: 12px;
    height: 50px;
    margin: 0;
  }
  #lp-type {
    font-size: 12px;
  }
  #lp-np {
    font-size: 12px;
  }
  .lp-gene-button {
    width: 180px;
  }
}
@media screen and (min-width: 1000px) {
  #lp-no {
    letter-spacing: 1.9px;
    font-size: 20px;
  }
  #lp-name {
    letter-spacing: 3px;
    font-size: 32px;
  }
  #lp-detail {
    font-size: 14px;
  }
  #lp-type {
    font-size: 14px;
  }
  #lp-np {
    font-size: 14px;
  }
  .lp-gene-button {
    width: 180px;
  }
}

@media screen and (max-width: 500px) {
  .al-modalWindow {
    width: 90%;
  }
}

#lp-ALArea {
  position: relative;
  height: 100px;
}
#lp-ALSpin {
  display: none;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 100;
}
#lp-ALResult {
  display: none;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 100;
}
#input-ALid {
  border-radius: 50px;
  padding: 0 20px;
  width: 100%;
}
#lp-ALtwitter,
#lp-ALdiscord,
#lp-ALwallet {
  font-size: 12px;
}
.input-name {
  font-size: 15px;
  margin: 0;
}


/* ===== 検索モーダル ===== */
.search-modalWindow {
  width: 90%;
  max-width: 720px;
}
.search-modal {
  background: #000;
  border: 1px solid #444;
  border-radius: 12px;
  padding: 16px;
}
.search-modal-header h3 {
  margin: 10px 0 16px;
}
.search-modal-body .lbl {
  display: block;
  font-size: 14px;
  margin-bottom: 6px;
  color: #ddd;
}
.search-modal-body input[type="text"],
.search-modal-body input[type="number"] {
  width: 100%;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid #333;
  background: #111;
  color: #fff;
  outline: none;
}
.np-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 12px;
}
.search-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 18px;
}
.btn-primary,
.btn-outline {
  padding: 10px 14px;
  border-radius: 10px;
  font-weight: bold;
  border: 1px solid #fff;
  background: #fff;
  color: #000;
  cursor: pointer;
  font-size: 14px;
}
.btn-outline {
  background: transparent;
  color: #fff;
  border-color: #888;
}
.btn-primary:hover,
.btn-outline:hover {
  opacity: 0.85;
}
@media screen and (max-width: 500px) {
  .search-modalWindow { width: 94%; }
  .np-row { grid-template-columns: 1fr; }
}

/* =========================
   検索モーダルのスクロール修正（上書き）
   ========================= */

/* 1) 背景は縦スクロール可（既に追加済でも再掲OK） */
#modalSearch .modalBg {
  overflow: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4vh 0;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

/* 2) 中央固定の absolute をやめて、flex でセンタリング */
#modalSearch .modalWindow {
  position: static;      /* ← これが効くとスクロール可能になる */
  top: auto;
  left: auto;
  transform: none;
  width: min(720px, 92vw);
}

/* 3) モーダル外枠は画面高に収める。内部をスクロール */
#modalSearch .search-modalWindow {
  width: 100%;
  max-height: 92vh;
  overflow: hidden;      /* 外枠は隠す、内側(body)をスクロール */
  border-radius: 12px;
}

/* 4) 中身（フォーム）をスクロール領域に */
#modalSearch .search-modal {
  display: flex;
  flex-direction: column;
  height: 100%;
}

#modalSearch .search-modal-body {
  overflow: auto;
  -webkit-overflow-scrolling: touch; /* iOS */
  touch-action: pan-y;               /* モバイルの縦スクロールを明示 */
  padding-bottom: calc(var(--footer-h, 64px) + 16px);
  overscroll-behavior: contain;
}

/* 5) フッターは sticky（ボタン被り対策は既存の --footer-h とセット） */
#modalSearch .search-modal-footer {
  position: sticky;
  bottom: 0;
  height: var(--footer-h, 64px);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 10px 14px;
  background: linear-gradient(180deg, rgba(0,0,0,0), rgba(0,0,0,0.85));
  border-top: 1px solid #333;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 1;
}

/* 6) さらに縦が短い端末はフルスクリーン化 */
@media (max-height: 700px) {
  #modalSearch .modalWindow,
  #modalSearch .search-modalWindow {
    width: 100vw;
    height: 100vh;
    max-height: 100vh;
    border-radius: 0;
  }
  #modalSearch .search-modal-header {
    position: sticky;
    top: 0;
    z-index: 2;
    background: #000;
    border-bottom: 1px solid #333;
    padding-top: max(10px, env(safe-area-inset-top));
  }
  #modalSearch .search-modal-footer {
    padding-bottom: max(10px, env(safe-area-inset-bottom));
  }
  #modalSearch .search-modal-body {
    padding-bottom: calc(var(--footer-h, 64px) + 16px + env(safe-area-inset-bottom));
  }
}
