.poke-wrapper {
  background-color: transparent;
  justify-content: space-around !important;
}

.poke-box {
  opacity: 0;
  /* background-color: black; */
  padding: 10px;
  /* border-radius: 10px; */
  /* margin: 0px 0px 37px 0px!important; */
  margin: 0px 0px 0px 0px !important;
  /* margin-bottom: 60px!important; */
}

#poke-box-inner {
  position: relative;
}

#poke-box-inner:before {
  content: "";
  display: block;
  width: 100%;
  padding-top: 100%;
}

.poke-box.show {
  opacity: 1;
  -webkit-animation: 0.4s fadeIn ease-in 0s;
  -moz-animation: 0.4s fadeIn ease-in 0s;
  animation: 0.4s fadeIn ease-in 0s;
}

@keyframes fadeIn {
  0% {
    transform: scale(0.9);
  }
  100% {
    transform: scale(1);
  }
}

@-webkit-keyframes fadeIn {
  0% {
    -webkit-transform: scale(0.9);
  }
  100% {
    -webkit-transform: scale(1);
  }
}

@-moz-keyframes fadeIn {
  0% {
    -moz-transform: scale(0.9);
  }
  100% {
    -moz-transform: scale(1);
  }
}

.poke-box-empty {
  background-color: transparent;
  padding: 0px 0px 0px 0px;
  /* border-radius: 10px; */
}

.poke-box .panimal-pics {
  height: 100%;
  width: 100%;
  object-fit: cover;
  position: absolute;
  top: 0px;
  left: 0px;
  border-radius: 10px 10px 0px 0px;
  transition: all 0.2s ease-in-out;
  filter: brightness(120%) saturate(150%) contrast(100%);
  box-shadow: 0 3px 5px rgba(0, 0, 0, 0.4);
}

.poke-box .panimal-frame {
  position: absolute;
  top: 0px;
  left: 0px;
  height: auto;
  width: 100%;
  /* border-radius: 10px 10px 0px 0px; */
  transition: all 0.2s ease-in-out;
}

.panimal-frame:hover {
  opacity: 1;
  transform: scale(1) rotate(2deg);
  box-shadow: 0 0 7px rgba(0, 0, 0, 0.5);
}

.poke-box .item-meta {
  position: absolute;
  width: 100%;
  display: flex;
  justify-content: space-around;
  background: #000;
  opacity: 0.8;
  padding: 8px 2px 8px 2px;
  /* border-radius: 10px; */
}

.poke-box .item-meta div {
  font-size: 14px;
  display: flex;
  color: #ecf0f1;
  font-family: "Open Sans";
}

.poke-box .item-meta i {
  color: #2ceb6c;
  font-weight: bold;
  margin-right: 3px;
}

/*以降modal*/

.pokemodal {
  display: none;
  visibility: hidden;
  overflow: hidden;
  border-radius: 10px;
  background: #2c3e50;
  position: fixed;
  width: 90%;
  height: calc(var(--vh, 1vh) * 100 - 77px);
  top: 67px;
  right: 0;
  left: 0;
  margin: auto;
  z-index: 999;
  -webkit-backface-visibility: hidden;
  -moz-backface-visibility: hidden;
  backface-visibility: hidden;
  -webkit-perspective: 1300px;
  perspective: 1300px;
  -moz-perspective: 1300px;
  perspective: 1300px;
  -webkit-transition: all 0.1s ease;
  -moz-transition: all 0.1s ease;
  transition: all 0.1s ease;
  perspective: 1300px;
  overflow-y: scroll;
  /*blur-text-chromium-please-die*/
  /*  -webkit-transform: translateX(-50%) translateY(-50%) translateZ(0);
  -moz-transform: translateX(-50%) translateY(-50%) translateZ(0);
  transform: translateX(-50%) translateY(-50%) translateZ(0);*/
}

@media (min-width: 992px) {
  .pokemodal {
    overflow-y: auto; 
    /* PC画面だけ右側がカクカクなのでスクロールバー消しました */
    overflow-x: hidden;
    width: 40%;
    height: 80%;
    /*autoではscrollが効かないのでhtmlで指定する*/
    top: 10%;
  }
}

.pokemodal.show {
  /* visibility: visible; */
}

.modal-wrapper {
  background: linear-gradient(135deg, #0f5ba7, #0e2a40);
  padding: 20px;
  height: 100%;
  -webkit-transition: all 0.3s cubic-bezier(0.455, 0.03, 0.515, 0.955);
  -moz-transition: all 0.3s cubic-bezier(0.455, 0.03, 0.515, 0.955);
  transition: all 0.3s cubic-bezier(0.455, 0.03, 0.515, 0.955);
  -webkit-transform: rotateY(-70deg);
  -moz-transform: rotateY(-70deg);
  transform: rotateY(-70deg);
  -webkit-transform-style: preserve-3d;
  -moz-transform-style: preserve-3d;
  transform-style: preserve-3d;
  opacity: 0;
  color: #fff;
  perspective: 1300px;
  visibility: hidden;
}

.pokemodal.show .modal-wrapper {
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-width: none;
  visibility: visible;
  opacity: 1;
  -webkit-transform: rotateY(0);
  -moz-transform: rotateY(0);
  transform: rotateY(0);
}

.pokemodal.show .modal-wrapper .modal-close:hover {
  color: #000;
}

.pokemodal .modal-wrapper:after {
  content: "";
  display: table;
  clear: both;
}

.pokemodal .header-title .title {
  color: whitesmoke;
  font-size: 26px;
  font-weight: bold;
  font-family: "Open Sans";
}

#pmodal-sciname {
  display: inline-block;
  margin: 5px 0;
  text-decoration: none;
  color: #b3b6b7;
  -webkit-transition: color 0.3s linear;
  -moz-transition: color 0.3s linear;
  transition: color 0.3s linear;
  font-family: "Open Sans";
  font-size: 14px;
}

.pokemodal .header-title > a:hover {
  color: #f0f3f4;
}

.pokemodal .modal-info p {
  margin: 8px 0;
  font: normal 14px/1.25 "Open Sans";
}

.pokemodal .modal-info p:first-child {
  margin-top: 0;
}

.pokemodal .modal-preview {
  float: left;
  margin-right: 10px;
}

.pokemodal .modal-preview ul {
  list-style-type: none;
}

.pokemodal .modal-preview li {
  padding: 5px 0;
  border-bottom: 1px solid;
  font-size: 14px;
  color: #d6dbdf;
  font-family: "Open Sans";
}

.pokemodal .modal-preview i {
  color: white;
  font-weight: bold;
}

.pokemodal .modal-preview img {
  width: 100%;
  max-height: calc(var(--vh, 1vh) * 40);
  object-fit: cover;
}

.pokemodal .modal-info {
  width: 100%;
  float: left;
}

.bubbly-button.more {
  margin: 10px 20px 0px 20px;
  font-size: 16px;
  margin-top: 10px;
  text-decoration: none;
  display: inline-block;
  padding: 10px 15px;
  background: #ffffff;
  color: #000000;
  -webkit-transition: background-color 0.2s ease;
  -moz-transition: background-color 0.2s ease;
  transition: background-color 0.2s ease;
  font-family: "Open Sans";
}

.bubbly-button .more:hover {
  background: #6c3483;
}

#pm-next_btn,
#pm-prev_btn {
  visibility: hidden;
  position: absolute;
  bottom: 5px;
}

#pm-prev_btn.show,
#pm-next_btn.show {
  visibility: visible;
}

.caret-wrap {
  position: relative;
}

.pokemodal .modal-close {
  position: absolute;
  top: 10px;
  right: 40px;
  cursor: pointer;
  font-size: 50px;
  /* 押せる範囲を広げる（文字の幅 18px だけだった。2026-09-28）。見た目の大きさは変えない */
  z-index: 5;
  width: auto; /* light-bootstrap の .fa { width: 18px }（border-box）だと余白が効かない */
  min-width: 44px;
  padding: 8px 12px;
  margin: -8px -12px 0 0;
  -webkit-tap-highlight-color: transparent;
}

/* 名前の下の1行（採集方法・レベル・能力値・相棒）。折り返さずに1行で */
.pm-statline {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 8px;
  white-space: nowrap;
  overflow: hidden;
  margin: 2px 0 8px;
  padding: 6px 0;
  border-top: 1px solid rgba(214, 219, 223, .4);
  border-bottom: 1px solid rgba(214, 219, 223, .4);
  font-size: 14px;
  color: #d6dbdf;
  font-family: "Open Sans";
}
.pm-statline i {
  color: #fff;
  margin-right: .2em;
}
.pm-statline #tweet_btn {
  margin-left: auto;
  cursor: pointer;
}
/* 帯のすぐ下の細い経験値バー */
.pm-expbar {
  height: 3px;
  margin: -9px 0 8px;
  padding: 0;
  background: rgba(255, 255, 255, .15);
}
.pm-expbar[hidden] {
  display: none;
}
/* Lv99（レベルMAX）は金色 */
.pm-expbar.is-max i {
  background: linear-gradient(90deg, #ffd84d, #f7a81f, #ffe98a, #f7a81f, #ffd84d);
}
.pm-stat-level.is-max {
  color: #ffd84d;
  font-weight: 800;
}
.pm-expbar i {
  display: block;
  height: 100%;
  width: 0;
  background: #78e2a8;
  transition: width .4s ease-out;
}
.pm-stats {
  display: inline-flex;
  gap: 8px;
}
.pm-stats:empty {
  display: none;
}
/* パワーは、ほかの項目と同じ文字だけの表示（バッジにすると目立ちすぎる） */
.pm-stat {
  font-variant-numeric: tabular-nums;
}
.pm-stat small {
  font-size: inherit;
  margin-right: .15em;
}

/* 狭い画面では、採集方法は絵だけにして1行に収める（名前は絵に title で残す） */
@media (max-width: 420px) {
  .pm-statline {
    gap: 7px;
    font-size: 13px;
  }
  .pm-stat-sampling [data-l1a] {
    display: none !important;
  }
}
@media (max-width: 360px) {
  .pm-statline {
    gap: 5px;
    font-size: 12px;
  }
  /* 相棒は ♥ だけで伝わるので文字を省く */
  .pm-stat-partner [data-l1c] {
    display: none !important;
  }
}

/* 相棒（左）と BOX（右）を、スマホでも1行に並べる */
.pm-actions {
  display: flex;
  flex-wrap: nowrap;
  justify-content: center;
  gap: 10px;
  margin: 10px 0 4px;
}
#like_wrapper,
#box_wrapper {
  min-width: 0;
}

/* 相棒・BOX のボタン（文字入り。dictionary.js の setActionButton） */
.pm-action {
  display: inline-flex;
  align-items: center;
  gap: .45em;
  padding: 10px 22px;
  border-radius: 999px;
  border: 2px solid currentColor;
  background: #fff;
  font-size: 17px;
  font-weight: 700;
  cursor: pointer;
  transition: transform .08s;
}
/* 押したときの判定は id で見ているので、中のアイコンや文字を押しても button に届くように */
.pm-action > * {
  pointer-events: none;
}
.pm-action:active {
  transform: scale(.96);
}
.pm-action--like {
  color: #fff;
  background: #f54888; /* 図鑑メニューの2番目と同じ色 */
  border-color: #f54888;
}
.pm-action--like[data-state="on"] {
  color: #f54888;
  background: #fff;
  cursor: default;
}
.pm-action--like[data-state="on"]:active {
  transform: none;
}
.pm-action--box {
  color: #4a6572;
}
.pm-action--box[data-state="in"] {
  color: #2c8f5b;
}
/* 狭い画面ほど文字と余白を小さくして、1行に収める */
@media (max-width: 575px) {
  .pm-actions {
    gap: 6px;
  }
  .pm-action {
    gap: .3em;
    padding: 8px clamp(8px, 3vw, 14px);
    font-size: clamp(12px, 3.9vw, 15px);
    white-space: nowrap;
  }
}

#use_wrapper {
  position: absolute;
  bottom: 0px;
  right: 30px;
  width: 50px;
  cursor: pointer;
  font-size: 50px;
}

#map{
  height: 200px;
}

/* アイコンにできない（まだ解放していない）キャラクター */
.pm-action--like[data-state="locked"] {
  color: #8a99a3;
  background: #eef3f6;
  border-color: #c9d6de;
  cursor: default;
}

/* ------------------------------------------------------------------
   図鑑の「コレクション」（dictionary.js の renderCollection）
   アイテム・称号・キャラクターを区切って並べる
   ------------------------------------------------------------------ */
.coll-section {
  margin: 10px 0 18px;
}
.coll-title {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin: 0 0 8px;
  font-size: clamp(18px, 3vw, 22px);
  font-weight: 700;
  color: #fff;
  text-shadow: 0 2px 6px rgba(0, 20, 35, .45);
}
.coll-count {
  font-size: 12px;
  font-weight: 700;
  background: rgba(0, 20, 35, .28);
  border-radius: 999px;
  padding: 2px 10px;
}
.coll-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 10px;
}
.coll-card {
  cursor: pointer;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 3px 10px rgba(0, 20, 35, .25);
  overflow: hidden;
  transition: transform .1s;
}
.coll-card:hover { transform: translateY(-2px); }
/* まだ手に入れていないアイテム・称号は開けない */
.coll-card.is-closed { cursor: default; }
.coll-card.is-closed:hover { transform: none; }
.coll-pic {
  position: relative;
  aspect-ratio: 1;
  background: #fff;
}
.coll-pic img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
}
/* キャラクターは立ち絵なので、上（顔のほう）を見せる */
.coll-card.is-chara .coll-pic {
  background: linear-gradient(180deg, #e8f6ff, #fff);
}
.coll-card.is-chara:not(.is-locked) .coll-pic img {
  object-fit: cover;
  object-position: center 8%;
}
.coll-card.is-locked .coll-pic {
  background: #dfe7ec;
}
.coll-card.is-locked .coll-pic img {
  padding: 18%;
}
.coll-badge {
  position: absolute;
  right: 6px;
  top: 6px;
  padding: 1px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  color: #fff;
  background: #2c8f5b;
  pointer-events: none;
}
.coll-name {
  padding: 6px 8px 8px;
  font-size: 13px;
  font-weight: 700;
  color: #06293a;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  pointer-events: none;
}
.coll-card.is-locked .coll-name { color: #8a99a3; }

/* 図鑑のコレクションのオバケ（dictionary.js の renderCollection / openObake） */
.obake-card { cursor: pointer; }
.obake-card.is-closed { cursor: default; }
.obake-card:not(.is-locked) .coll-pic img { object-fit: contain; background: linear-gradient(#bfe6f7 60%, #f0dcae 60%); }
.obake-card.is-glow:not(.is-locked) .coll-pic img, .obake-pic.is-glow img { filter: drop-shadow(0 0 5px rgba(255, 200, 70, .95)); }
.obake-modal { position: fixed; inset: 0; z-index: 3000; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(0, 0, 0, .55); }
.obake-box, .obake-box * { box-sizing: border-box; }
.obake-box { width: 100%; max-width: 360px; padding: 18px 18px 16px; border-radius: 16px; background: #fff; color: #06293a; text-align: center; box-shadow: 0 10px 30px rgba(0, 0, 0, .35); }
.obake-pic { width: 160px; height: 160px; margin: 0 auto 8px; border-radius: 14px; background: linear-gradient(#bfe6f7 60%, #f0dcae 60%); display: grid; place-items: center; overflow: hidden; }
.obake-pic img { width: 80%; height: 80%; object-fit: contain; }
.obake-box h4 { margin: 4px 0 6px; font-size: 20px; font-weight: 800; }
.obake-desc { margin: 0 0 8px; font-size: 14px; line-height: 1.6; text-align: left; }
.obake-met { margin: 0 0 12px; font-size: 12px; color: #52606b; }
.obake-box button { padding: 8px 26px; border: 0; border-radius: 999px; background: #1aa6b7; color: #fff; font-weight: 800; cursor: pointer; }

/* 図鑑の一覧: 並び替えが「レベル」のとき、写真の左下にレベル（dictionary.js の levelBadges。2026-09-28） */
#poke-box-inner .pbox-lv { position: absolute; left: 6%; bottom: 6%; z-index: 3; padding: 1px 6px; border-radius: 6px;
  background: rgba(6, 41, 58, .85); color: #fff; font-size: 12px; font-weight: 800; line-height: 1.4; pointer-events: none; }
#poke-box-inner .pbox-lv.is-power { background: rgba(192, 70, 20, .9); } /* パワーで並び替えたとき */
#poke-box-inner .pbox-lv.is-max { background: linear-gradient(90deg, #f7a81f, #ffd84d); color: #5a3a00; }

/* 写真の右下に撮影者（2026-09-29。dictionary.js の data-credit。ログインしていないと撮影者は届かないので出ない） */
.pokemodal .pm-photo { position: relative; }
.pokemodal .pm-photo img { display: block; }
.pokemodal .pm-credit { position: absolute; right: 21px; bottom: 6px; max-width: calc(100% - 42px); padding: 1px 7px; border-radius: 6px; background: rgba(0, 0, 0, .5); color: #fff; font-size: 11px; font-weight: 600; line-height: 1.5; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; pointer-events: none; }
@media (max-width: 767px) { .pokemodal .pm-credit { right: 21px; font-size: 10px; } }
/* 写真の左下に「発見: ○○さん」（写真を投稿して図鑑に載せた人。2026-09-29。dictionary.js の data-finder） */
.pokemodal .pm-finder { position: absolute; left: 21px; bottom: 6px; max-width: calc(55% - 21px); padding: 1px 8px; border-radius: 6px; background: rgba(242, 140, 30, .9); color: #fff; font-size: 11px; font-weight: 800; line-height: 1.5; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; pointer-events: none; }
.pokemodal .pm-finder:not([hidden]) ~ .pm-credit { max-width: calc(45% - 21px); }

/* アバタースキル（図鑑のキャラクターの窓の中。js/veeskill.js の renderAvatarSkillPanel、dictionary.js の showAvatarSkill。2026-10-01）。押して切り替える */
.pm-avsk { margin: 8px 12px 4px; padding: 10px 12px; border-radius: 14px; background: #f3f8fb; color: #06293a; }
.pm-avsk[hidden] { display: none; }
.avsk-title { display: flex; align-items: baseline; flex-wrap: wrap; gap: 2px 8px; margin-bottom: 6px; font-size: 14px; font-weight: 900; }
.avsk-lead { font-size: 11px; font-weight: 600; color: #4d6572; }
.avsk-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding-top: 6px; }
.avsk-card { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 3px; padding: 8px 10px; border: 3px solid #d5e3ea; border-radius: 12px; background: #fff; color: #06293a; text-align: left; font: inherit; cursor: pointer; }
.avsk-card:hover { border-color: #a9c8d8; }
.avsk-card.is-on { border-color: #f28c1e; background: #fff6eb; }
.avsk-name { font-size: 14px; font-weight: 900; }
.avsk-on { position: absolute; top: -9px; right: 8px; padding: 1px 6px; border-radius: 999px; background: #f28c1e; color: #fff; font-size: 10px; font-weight: 800; visibility: hidden; }
.avsk-card.is-on .avsk-on { visibility: visible; }
.avsk-desc { font-size: 11px; line-height: 1.45; color: #4d6572; }
@media (max-width: 380px) { .avsk-grid { grid-template-columns: 1fr; } }
/* 称号ページへの入口（図鑑のコレクション。2026-10-01） */
.coll-trophylink { display: block; margin: 0 0 14px; padding: 10px 14px; border-radius: 10px; background: linear-gradient(135deg, #2a475e, #1b2838); color: #c7d5e0 !important; font-weight: 800; text-decoration: none !important; }
.coll-trophylink:hover { color: #fff !important; }
