.thumbnails img {
  transition: all 0.2s ease-in-out;
  position: absolute;
}

@media (hover: hover) and (pointer: fine) {
  .bucketscard:hover .bucketsframe,
  .bucketscard:hover .bucketsimg {
    /*bucketscardがホバーされてるやつやつの、子孫のframeとimgを傾ける*/
    opacity: 1;
    transform: scale(1) rotate(2deg);
    box-shadow: 0 0 7px rgba(0, 0, 0, 0.5);
  }


  .bucketsimg.hover {
    opacity: 1 !important;
    transform: scale(1) rotate(2deg) !important;
    box-shadow: 0 0 7px rgba(0, 0, 0, 0.5);
  }

  .thumbnails:hover img {
    opacity: 0.7;
    transform: scale(0.95);
  }
}


.bucketscard .card-img-overlay {
  padding: 0px;
}

.bucketscard {
  padding: 0px;
  background-color: transparent;
  border-radius: 0px;
  border: 0px;
  /* 正方形以外をトリムで表示できない！！たすけて！！！できた！！！優秀過ぎてつらい */
  position: relative;
  transition: opacity 1s;
  opacity: 0;
}

.viewcard {
  /*右のサイドバーがzindex4*/
  opacity: 1;
  z-index: 3;
  margin-bottom: 0px;
  margin-top: 30px;
}

.bucketscard:before {
  content: "";
  display: block;
  width: 100%;
  padding-top: 100%;
}

.playframe {
  padding: 30%;
}

.bucketsimg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
}

.viewbtn {
  opacity: 1;
}


#bucketscontent {
  padding: 0px 0px;
  /* background-color: rgb(0, 130, 235); */
}

.sidebar {
  z-index: 4;
}

.option_search {
  position: absolute;
  margin: 5px 20px 5px 20px;
  right: 0;
}

.option_button span {
  pointer-events: none;
}

/* =====================================================================
   種同定できたときの「やったね」画面 (#idresult)
   =====================================================================
   クイズ用の .pokemodal とは別物。あちらは 3D 回転で出てくる作りで、
   中に写真・分類・補足情報を縦に積むには窮屈なので分けてある。
   見た目(濃紺のカード・白文字・角丸)は .pokemodal に合わせた。
   z-index は .pokemodal(999) より上に置く。
   ===================================================================== */

.idresult {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1050;
}

/* 画面の中で上下の真ん中に置き、カードの高さは見えている範囲に収める。
   以前は margin: 5vh と max-height: 90vh で、スマホでは下が切れた（2026-09-24） */
.idresult.show {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  box-sizing: border-box;
}

/* 開いているあいだは裏のページを止める（buckets_result.js が html に付ける） */
html.idresult-open .main-panel,
html.idresult-open body {
  overflow: hidden !important;
}

.idresult-backdrop {
  touch-action: none; /* 暗いところをなぞっても、裏が動かないように */
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
}

.idresult-card {
  position: relative;
  margin: 0;
  width: 100%;
  max-width: 560px;
  max-height: 100%;
  overflow-y: auto;
  overscroll-behavior: contain; /* 端までスクロールしても、裏へは送らない */
  -webkit-overflow-scrolling: touch;
  padding: 24px 22px 20px;
  border-radius: 10px;
  background: linear-gradient(135deg, #0f5ba7, #0e2a40);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
  color: #fff;
  text-align: center;

  /* 出るときだけふわっと。閉じるときは即消す(display:none なので) */
  animation: idresult-in 320ms cubic-bezier(0.22, 0.61, 0.36, 1);
}

@keyframes idresult-in {
  from { opacity: 0; transform: translateY(18px) scale(0.96); }
  to   { opacity: 1; transform: none; }
}

.idresult-close {
  position: absolute;
  top: 12px;
  right: 14px;
  font-size: 22px;
  color: #cfe3ff;
  cursor: pointer;
}

.idresult-close:hover {
  color: #fff;
}

.idresult-headline {
  font-size: 20px;
  font-weight: bold;
  line-height: 1.5;
  padding: 0 24px;
}

.idresult-jewel {
  margin-top: 4px;
  font-size: 15px;
  color: #ffe58a;
  font-weight: bold;
}

/* -------------------------------------------------- 写真と額縁 */

.idresult-picture {
  position: relative;
  width: 100%;
  max-width: 320px;
  margin: 16px auto 14px;
}

/* 正方形の枠を作っておく。写真の縦横比がまちまちでも額縁とずれない */
.idresult-picture::before {
  content: "";
  display: block;
  padding-top: 100%;
}

.idresult-img,
.idresult-video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 4px;
}

/* 額縁は写真の上に重ねるだけ。クリックは下の写真に通す */
.idresult-frame {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

/* -------------------------------------------------- 名前と分類 */

.idresult-name {
  font-size: 24px;
  font-weight: bold;
}

.idresult-sciname {
  font-size: 15px;
  font-style: italic;
  color: #cfe3ff;
}

.idresult-level {
  order: -2; /* 「Lv.2」をいちばん左に（「+3 EXP」は order: -1） */
  flex: none;
  font-size: 13px;
  font-weight: 800;
  color: #fff;
}

/* 経験値バー（buckets_result.js の showExp） */
.idresult-exp {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 4px auto 0;
  max-width: 330px;
  font-size: 12px;
  color: #cfe3ff;
}
.idresult-exp-bar {
  flex: 1;
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .2);
  overflow: hidden;
}
.idresult-exp-bar i {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: #78e2a8;
}
/* Lv99（レベルMAX）は金色 */
.is-max .idresult-exp-bar i {
  background: linear-gradient(90deg, #ffd84d, #f7a81f, #ffe98a, #f7a81f, #ffd84d);
}
.is-max .idresult-exp-text {
  font-weight: 800;
  color: #ffd84d;
}

.idresult-taxons {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 2px 14px;
  margin: 14px auto 0;
  width: fit-content;
  max-width: 100%;
  text-align: left;
  font-size: 15px;
}

.idresult-taxons dt {
  color: #cfe3ff;
  font-weight: normal;
  white-space: nowrap;
}

.idresult-taxons dd {
  margin: 0;
  font-weight: bold;
  overflow-wrap: anywhere;
}

/* 学名（属名 種小名）はイタリック */
.idresult-taxons dd.idresult-binomial {
  font-style: italic;
}

/* 段の名前が無い言語(taxon_data に行が無い)のときは、名前だけを中央に並べる */
.idresult-taxons.nolabel {
  grid-template-columns: 1fr;
  text-align: center;
}

/* -------------------------------------------------- 図鑑の補足情報 */

/* 図鑑に書いてある文。まわりと地の色を変えて「図鑑からの引用」だと分かるようにする */
.idresult-description {
  margin-top: 18px;
  padding: 12px 14px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
  font-size: 15px;
  line-height: 1.7;
  text-align: left;
}

.idresult-comments {
  margin-top: 8px;
  padding: 0 14px;
  font-size: 14px;
  line-height: 1.7;
  text-align: left;
  color: #cfe3ff;
}

.idresult-location {
  margin-top: 10px;
  padding: 0 14px;
  font-size: 13px;
  text-align: left;
  color: #9fc2ea;
}

/* -------------------------------------------------- ボタン */

.idresult-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 20px;
}

.idresult-buttons .btn {
  margin: 0;
  font-size: 15px;
}

/* -------------------------------------------------- やったね画面の動き（2026-09-28。buckets_result.js の play が .is-anim を付け直す） */
/* カードは少し弾んで出る。星のかけらが横にはみ出してもスクロールが出ないように */
.idresult-card { overflow-x: hidden; }
.idresult.is-anim .idresult-card { animation: idr-pop .55s cubic-bezier(.2, 1.35, .4, 1) both; }
@keyframes idr-pop { 0% { opacity: 0; transform: translateY(30px) scale(.86); } 100% { opacity: 1; transform: none; } }
/* 見出しはぽんと大きくなってから戻る */
.idresult.is-anim .idresult-headline { animation: idr-head .6s cubic-bezier(.2, 1.6, .4, 1) .15s both; }
@keyframes idr-head { 0% { opacity: 0; transform: scale(.6); } 100% { opacity: 1; transform: none; } }
.idresult.is-anim .idresult-jewel { animation: idr-fade .4s ease-out .3s both; }
/* 写真は少し寄った・ぼけたところから、くっきりと */
.idresult.is-anim .idresult-img, .idresult.is-anim .idresult-video { animation: idr-photo .7s ease-out .2s both; }
@keyframes idr-photo { 0% { opacity: 0; transform: scale(1.12); filter: blur(6px) brightness(1.6); } 100% { opacity: 1; transform: none; filter: none; } }
.idresult.is-anim .idresult-frame { animation: idr-frame .6s cubic-bezier(.2, 1.4, .4, 1) .35s both; }
@keyframes idr-frame { 0% { opacity: 0; transform: scale(1.25); } 100% { opacity: 1; transform: none; } }
/* 光が1回横切る（写真の上だけ） */
.idresult-picture { overflow: visible; }
.idresult-shine { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border-radius: 4px; overflow: hidden; pointer-events: none; }
.idresult-shine::after { content: ""; position: absolute; top: -20%; bottom: -20%; left: -60%; width: 40%; transform: skewX(-20deg);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .75), transparent); animation: idr-shine .9s ease-in-out .7s both; }
@keyframes idr-shine { 0% { left: -60%; } 100% { left: 130%; } }
/* ☆5 は額縁のまわりがゆっくり金色に光りつづける */
.idresult.is-r5 .idresult-picture { animation: idr-gold 1.8s ease-in-out 1s infinite alternate; border-radius: 6px; }
@keyframes idr-gold { from { box-shadow: 0 0 0 rgba(255, 210, 80, 0); } to { box-shadow: 0 0 26px 6px rgba(255, 210, 80, .55); } }
/* 星のかけらが写真の真ん中から飛び散る */
.idresult-burst { position: absolute; left: 50%; top: 50%; width: 0; height: 0; pointer-events: none; z-index: 2; }
.idresult-burst i { position: absolute; left: -7px; top: -7px; width: 14px; height: 14px; opacity: 0;
  background: #fff; clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%);
  animation: idr-spark 1.1s ease-out both; }
.idresult-burst i:nth-child(3n) { background: #ffe58a; }
.idresult-burst i:nth-child(3n+1) { background: #9fe0ff; }
.idresult.is-r5 .idresult-burst i { background: #ffd84d; }
@keyframes idr-spark {
  0% { opacity: 0; transform: translate(0, 0) scale(.2) rotate(0); }
  15% { opacity: 1; }
  100% { opacity: 0; transform: translate(var(--x), var(--y)) scale(var(--s)) rotate(var(--r)); } }
/* NEW! / Lv UP! のスタンプ。写真の右上に、上からどんと押される */
.idresult-stamp { position: absolute; right: -10px; top: -12px; z-index: 3; padding: 6px 12px; border-radius: 10px;
  font-size: 18px; font-weight: 900; letter-spacing: .04em; color: #fff; background: #f28c1e; border: 3px solid #fff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .35); transform: rotate(12deg); animation: idr-stamp .5s cubic-bezier(.3, 1.6, .5, 1) .95s both; }
.idresult.is-levelup .idresult-stamp { background: #2ea44f; }
@keyframes idr-stamp { 0% { opacity: 0; transform: rotate(12deg) scale(2.4); } 100% { opacity: 1; transform: rotate(12deg) scale(1); } }
/* 名前・レベル・経験値は順に */
.idresult.is-anim .idresult-name { animation: idr-up .45s ease-out .5s both; }
.idresult.is-anim .idresult-sciname { animation: idr-up .45s ease-out .58s both; }
.idresult.is-anim .idresult-level { animation: idr-up .45s ease-out .64s both; }
.idresult.is-levelup.is-anim .idresult-level { animation: idr-up .45s ease-out .64s both, idr-lvpulse .5s ease-in-out 1.3s 2; color: #9ff2b8; font-weight: 800; }
@keyframes idr-lvpulse { 50% { transform: scale(1.25); } }
.idresult.is-anim .idresult-exp { animation: idr-up .45s ease-out .7s both; }
/* 分類は1段ずつ上から（--d は buckets_result.js の fillTaxons が入れる） */
.idresult.is-anim .idresult-taxons > * { animation: idr-row .4s ease-out both; animation-delay: var(--d, .8s); }
@keyframes idr-row { 0% { opacity: 0; transform: translateX(-14px); } 100% { opacity: 1; transform: none; } }
.idresult.is-anim .idresult-description, .idresult.is-anim .idresult-comments, .idresult.is-anim .idresult-location { animation: idr-fade .5s ease-out 1.4s both; }
.idresult.is-anim .idresult-buttons { animation: idr-up .45s ease-out 1.5s both; }
@keyframes idr-up { 0% { opacity: 0; transform: translateY(10px); } 100% { opacity: 1; transform: none; } }
@keyframes idr-fade { 0% { opacity: 0; } 100% { opacity: 1; } }
/* 図鑑の達成率（新しく登録したとき。buckets_result.js の fillComp。2026-09-28） */
.idresult-comp { display: flex; align-items: center; gap: 14px; margin: 14px auto 0; max-width: 420px; padding: 12px 14px; border-radius: 12px;
  background: rgba(255, 255, 255, .09); text-align: left; animation: idr-up .45s ease-out 1.1s both; }
.idresult-comp.is-loading { min-height: 96px; }
.idresult-comp-ring { position: relative; flex: 0 0 84px; width: 84px; height: 84px; }
.idresult-comp-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.idresult-comp-ring circle { fill: none; stroke-width: 9; stroke-linecap: round; }
.idresult-comp-ring .bg { stroke: rgba(255, 255, 255, .15); }
.idresult-comp-ring .before { stroke: #5fb3e8; }
.idresult-comp-ring .fg { stroke: #ffd84d; transition: stroke-dashoffset .9s cubic-bezier(.3, 0, .2, 1); }
.idresult-comp-num { position: absolute; top: 0; right: 0; bottom: 0; left: 0; display: flex; align-items: baseline; justify-content: center; padding-top: 28px; }
.idresult-comp-num b { font-size: 20px; font-weight: 900; color: #fff; }
.idresult-comp-num small { font-size: 11px; color: #cfe3ff; margin-left: 1px; }
.idresult-comp.is-go .idresult-comp-num b { animation: idr-lvpulse .5s ease-in-out .9s 1; }
.idresult-comp-body { flex: 1; min-width: 0; }
.idresult-comp-title { font-size: 13px; font-weight: 800; color: #ffe58a; }
.idresult-comp-count { font-size: 12px; color: #cfe3ff; margin-bottom: 6px; }
.idresult-comp-row { display: grid; grid-template-columns: minmax(0, 7em) 1fr auto auto; align-items: center; gap: 6px; font-size: 12px; margin-top: 3px; }
.idresult-comp-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 700; }
.idresult-comp-bar { position: relative; height: 7px; border-radius: 999px; background: rgba(255, 255, 255, .15); overflow: hidden; }
.idresult-comp-bar i { position: absolute; top: 0; left: 0; bottom: 0; border-radius: inherit; }
.idresult-comp-bar i.old { background: #5fb3e8; }
.idresult-comp-bar i.new { background: #ffd84d; transition: width .9s cubic-bezier(.3, 0, .2, 1); }
.idresult-comp-n { color: #cfe3ff; font-variant-numeric: tabular-nums; }
.idresult-comp-plus { font-weight: 900; color: #ffd84d; opacity: 0; }
.idresult-comp.is-go .idresult-comp-plus { animation: idr-plus .5s cubic-bezier(.3, 1.6, .5, 1) .8s both; }
.idresult-comp-row.is-full .idresult-comp-plus { color: #9ff2b8; }
@keyframes idr-plus { 0% { opacity: 0; transform: translateY(6px) scale(.6); } 100% { opacity: 1; transform: none; } }
.idresult-comp-link, .idresult-comp-link:hover { display: inline-block; margin-top: 8px; font-size: 13px; font-weight: 800; color: #9fe0ff; text-decoration: none; }
.idresult-comp-link:hover { color: #fff; }
@media (max-width: 575px) { .idresult-comp { gap: 10px; padding: 10px; } .idresult-comp-ring { flex-basis: 72px; width: 72px; height: 72px; } .idresult-comp-num { padding-top: 22px; } }

/* 分類群は押すと系統ツリーへ。文字の見た目（太さ・イタリック）はそのままで、点線の下線だけ */
.idresult-taxlink, .idresult-taxlink:hover, .idresult-taxlink:focus { color: inherit; font: inherit; text-decoration: none; }
.idresult-taxlink { border-bottom: 1px dashed rgba(207, 227, 255, .6); cursor: pointer; }
.idresult-taxlink:hover, .idresult-taxlink:focus-visible { border-bottom-style: solid; border-bottom-color: #fff; }
/* 動きを減らす設定では、飛び散るかけら・光・金の点滅だけ止める（中身が出てくる動きは残す。2026-09-28 の方針） */
@media (prefers-reduced-motion: reduce) {
  .idresult-burst, .idresult-shine { display: none; }
  .idresult.is-r5 .idresult-picture { animation: none; }
}

/* 右上の × は押せる範囲を 44px の丸に（2026-09-28。以前は文字の大きさ 17x21px だけで、スマホでは右上のハンバーガーのすぐ下に来て押し損ねやすかった） */
.idresult-close { top: 6px; right: 6px; z-index: 5; width: 44px; height: 44px; display: flex; align-items: center; justify-content: center;
  border-radius: 50%; background: rgba(255, 255, 255, .12); font-size: 22px; -webkit-tap-highlight-color: transparent; }
.idresult-close:hover, .idresult-close:active { background: rgba(255, 255, 255, .25); }
/* カードの上下はナビバーにかからないように（見えている高さ dvh で。vh はスマホのアドレスバーぶん長く、カードが上にはみ出した） */
.idresult.show { padding-top: max(12px, calc(var(--navbar-h, 0px) + 6px)); }
.idresult-card { max-height: calc(100dvh - max(12px, calc(var(--navbar-h, 0px) + 6px)) - 12px); }

/* 縦に入りきらないとボタンが画面の外に出てしまうので、写真と余白を詰める。
   それでも溢れる場合はカードの中だけがスクロールする */
@media (max-width: 575px) {
  .idresult-card { margin: 0 auto; padding: 20px 16px 16px; } /* 以前は margin: 3vh / max-height: 94vh（vh はアドレスバーぶん長く、上がはみ出した） */
  .idresult-headline { font-size: 18px; padding: 0 18px; }
  .idresult-name { font-size: 21px; }
  .idresult-picture { max-width: 200px; margin: 12px auto 10px; }
  .idresult-taxons { gap: 0 12px; font-size: 14px; }
  .idresult-description { margin-top: 14px; padding: 10px 12px; }
  .idresult-buttons { margin-top: 16px; }
}

/* =====================================================================
 * 並べ方と下の台（2026-09-27 に作り直し）
 * 以前は bootstrap の col-5 / col-sm-2 で、スマホは2列・PC は5列、下に緑の大きなボタン2つ。
 * いまは格子（スマホ3列・タブレット4列・PC は幅に合わせて）、空きは点線の枠に小さなバケツ、
 * 下はホームと同じすりガラスの台。カードの中身（buckets.js の addbucketscard）はそのまま
 * ===================================================================== */
#result.thumbnails {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 12px 12px 0;
  padding-bottom: calc(96px + env(safe-area-inset-bottom));
}
@media (min-width: 600px) { #result.thumbnails { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin: 16px 16px 0; } }
@media (min-width: 992px) { #result.thumbnails { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 18px; margin: 22px 26px 0; } }
#result .bucketscard { width: auto; max-width: none; flex: none; margin: 0 !important; height: auto !important; }
#result .bucketscard:last-child { margin-bottom: 0 !important; } /* buckets.js が最後の1枚に下の余白を付けるが、格子では padding-bottom で取る */
#result .viewcard { margin-top: 0; }
#result .bucketscard:not(:has(.emptybucketsimg)) { filter: drop-shadow(0 4px 8px rgba(0, 20, 40, .35)); }
/* 空き：点線の枠に小さく薄いバケツ（絵は DB管理で選んだもの） */
#result .emptybucketsimg {
  inset: 0; width: 100%; height: 100%;
  object-fit: contain; padding: 24%;
  opacity: .6;
  border: 2px dashed rgba(255, 255, 255, .45);
  border-radius: 14px;
  background: rgba(255, 255, 255, .07);
}

/* 下の台 */
.bk-dock {
  position: fixed; z-index: 10;
  left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom));
  max-width: 440px; margin: 0 auto;
  display: flex; gap: 6px; padding: 6px;
  border-radius: 22px;
  background: rgba(6, 36, 60, .55);
  border: 1px solid rgba(255, 255, 255, .38);
  -webkit-backdrop-filter: blur(10px) saturate(1.3);
  backdrop-filter: blur(10px) saturate(1.3);
  box-shadow: 0 8px 24px rgba(0, 20, 40, .3);
}
@media (min-width: 992px) { .bk-dock { left: calc(260px + 12px); } } /* サイドバーの右の真ん中に */
.bk-dock-btn {
  flex: 1 1 0; min-width: 0;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  height: 54px; border-radius: 16px; border: 0; padding: 0 10px;
  background: transparent; color: #f2fbff;
  font-size: 15px; font-weight: 800; letter-spacing: .04em; text-decoration: none;
  cursor: pointer; -webkit-tap-highlight-color: transparent;
  transition: background .15s ease, transform .12s ease;
}
.bk-dock-btn:hover, .bk-dock-btn:focus { color: #fff; text-decoration: none; background: rgba(255, 255, 255, .12); }
.bk-dock-btn:active { transform: translateY(2px) scale(.98); }
.bk-dock-btn:focus-visible { outline: 3px solid #ffd84a; outline-offset: 2px; }
.bk-dock-btn + .bk-dock-btn { position: relative; }
.bk-dock-btn + .bk-dock-btn::before { content: ""; position: absolute; left: -3px; top: 14px; bottom: 14px; width: 1px; background: rgba(255, 255, 255, .25); }
.bk-ic { width: 24px; height: 24px; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* 種同定の選択肢（白い四角だったのを、角の丸い札に。正解・不正解の色は変えていない） */
.pokemodal .option_button.bubbly-button.more {
  margin: 8px 6px 0;
  padding: 12px 14px;
  border-radius: 14px;
  background: #fff;
  color: #06293a;
  font-family: inherit;
  font-size: 16px; font-weight: 800;
  border: 2px solid rgba(255, 255, 255, .9);
  box-shadow: 0 4px 0 rgba(0, 20, 40, .28), 0 8px 18px rgba(0, 20, 40, .25);
  transition: transform .1s ease, box-shadow .1s ease, background .15s ease;
}
.pokemodal .option_button.bubbly-button.more:hover { background: #eaf6ff; }
.pokemodal .option_button.bubbly-button.more:active { transform: translateY(3px); box-shadow: 0 1px 0 rgba(0, 20, 40, .28); background: #d7eefc; }
.pokemodal .option_button.bubbly-button.more:disabled { opacity: .55; }

/* 種同定の「ここまで正解」（js/buckets.js の renderProgress。2026-09-28）。まちがえても、読み直すまでは次に開いたとき続きから */
.bk-progress { margin: 6px 0 10px; padding: 8px 10px; border-radius: 12px; background: #eaf7ee; color: #1d4f2e; }
.bk-progress-head { font-size: 12px; font-weight: 800; color: #2e7d4a; margin-bottom: 4px; }
.bk-progress ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 6px; align-items: center; }
.bk-progress li { display: inline-flex; align-items: baseline; gap: 4px; font-size: 13px; }
.bk-progress li + li::before { content: "›"; color: #7fae8c; margin-right: 2px; }
.bk-progress-rank { font-size: 11px; color: #5d8a6b; }
.bk-progress-btn { display: inline-flex; align-items: baseline; gap: 4px; padding: 2px 8px; border: 1px solid #b9dcc3; border-radius: 999px; background: #fff; color: inherit; font-size: 13px; cursor: pointer; }
.bk-progress-btn:hover, .bk-progress-btn:focus-visible { border-color: #2e7d4a; background: #f4fbf6; }

/* 難易度「むずかしい」の種同定: 選択肢の日本語の下に学名を小さく（buckets.js の latinOptions。2026-09-28） */
/* 日本語は中央のまま、学名はその右に小さくぶら下げる（2026-09-28。下に改行するとスマホで画面からはみ出し、隣に並べて左揃えにすると見た目がへんだった。ユーザー判断）。
   学名は位置の計算に入れない（absolute）ので、学名の長さで日本語の位置が動かない。ボタンの右端をこえるときは … で省く。押したらボタン（#option_N）に届くように */
.pokemodal .option_button.bubbly-button.more { overflow: hidden; }
.pokemodal .option_button span.has-en { position: relative; display: inline-block; } /* :has() は古いブラウザで効かないので、buckets.js が目印を付ける */
.bk-opt-en { position: absolute; left: calc(100% + .5em); top: 50%; transform: translateY(-45%); max-width: 38vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-size: .72em; font-weight: 600; letter-spacing: .02em; opacity: .75; pointer-events: none; text-align: left; }
.bk-opt-en.is-sci { font-style: italic; } /* 和名の問題の学名（属名＋種小名） */
/* 画面の低いスマホでは写真を少し低くして、選択肢4つまで1画面に収める */
@media (max-height: 740px) {
  .pokemodal .modal-preview img { max-height: calc(var(--vh, 1vh) * 26); }
  .pokemodal .option_button.bubbly-button.more { margin-top: 6px; padding: 10px 12px; }
}
@media (max-height: 660px) {
  .pokemodal .modal-preview img { max-height: calc(var(--vh, 1vh) * 20); }
  .pokemodal .header-title .title { font-size: 20px; }
  .pokemodal .option_button.bubbly-button.more { margin-top: 5px; padding: 8px 12px; font-size: 15px; }
}
/* あとから届いた説明文は、ふわっと出す（buckets_result.js の fillDetail） */
.idresult-late { animation: idr-fade .4s ease-out both; }
/* 「ブラウザで調べる」（buckets_result.js の searchButton。2026-09-28） */
.idresult-search { display: inline-grid; place-items: center; width: 30px; height: 30px; margin: 0 0 0 6px; padding: 0; border: 2px solid rgba(207, 227, 255, .55); border-radius: 50%; background: rgba(255, 255, 255, .08); color: #cfe3ff; vertical-align: middle; cursor: pointer; } /* 種名の右の虫めがね（2026-10-01） */
.idresult-search:hover { background: rgba(255, 255, 255, .18); color: #fff; }
.idresult-search svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; }
.idresult-search-note { margin: 4px 12px 2px; color: #fff3b0; font-size: 12px; font-weight: 700; line-height: 1.4; -webkit-user-select: text; user-select: text; }
.idresult.is-anim .idresult-search { animation: idr-up .45s ease-out .62s both; }
/* 種同定でまちがえたとき（buckets.js。2026-09-28。以前は画面の端の小さな知らせ）: 押した選択肢が赤くふるえ、問題文の場所に「おしい！」 */
.pokemodal .option_button.bubbly-button.more.is-miss { background: #ffe3e0; color: #b3261e; box-shadow: 0 0 0 3px #e2453a inset, 0 4px 0 rgba(0, 20, 40, .28); animation: bk-miss .45s ease-in-out; }
.pokemodal .option_button.bubbly-button.more.is-miss:disabled { opacity: 1; }
@keyframes bk-miss { 0%, 100% { transform: translateX(0); } 20% { transform: translateX(-8px); } 40% { transform: translateX(7px); } 60% { transform: translateX(-5px); } 80% { transform: translateX(3px); } }
#pmodal-header.is-miss-msg { color: #ffb347; font-size: clamp(16px, 4.6vw, 22px); line-height: 1.45; padding-right: 52px; animation: bk-miss-msg .35s cubic-bezier(.3, 1.6, .5, 1); } /* 右上の × にかからないように */
@keyframes bk-miss-msg { from { transform: scale(.85); opacity: 0; } to { transform: none; opacity: 1; } }

/* 経験値が増える動き（2026-10-01。buckets_result.js の showExp）: 「+N EXP」がバーの左に出て、レベルが上がると Lv の数字が跳ねる */
.idresult-exp-gain { order: -1; flex: none; font-size: 12px; font-weight: 800; color: #9ff2b8; opacity: 0; transform: translateX(-6px); transition: opacity .25s, transform .4s ease-out; }
.idresult-exp-gain.is-on { opacity: 1; transform: none; }
.idresult-exp.is-levelup .idresult-exp-bar { box-shadow: 0 0 0 2px rgba(159, 242, 184, .55), 0 0 12px rgba(120, 226, 168, .8); transition: box-shadow .3s; }
.idresult.is-anim .idresult-level.is-pop { animation: idr-lvpop .55s cubic-bezier(.3, 1.8, .5, 1); color: #9ff2b8; font-weight: 800; }
@keyframes idr-lvpop { 0% { transform: scale(1); } 40% { transform: scale(1.45); } 100% { transform: scale(1); } }
@media (prefers-reduced-motion: reduce) { .idresult.is-anim .idresult-level.is-pop { animation: none; } }

/* さっきまちがえた分類群（2026-10-01。buckets.js の missLine）。「ここまで正解」の下に。押すと系統ツリー */
.bk-progress-miss { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 6px; margin-top: 6px; padding-top: 6px; border-top: 1px dashed #b9dcc3; font-size: 13px; }
.bk-progress.is-only-miss .bk-progress-miss { margin-top: 0; padding-top: 0; border-top: 0; }
.bk-progress-miss-head { font-size: 11px; font-weight: 800; color: #b3261e; }
.bk-progress-miss-name { display: inline-flex; align-items: baseline; gap: 4px; padding: 2px 8px; border: 1px solid #f1b5ae; border-radius: 999px; background: #fff4f2; color: #8c1d16; font-size: 13px; font-weight: 700; text-decoration: line-through; text-decoration-color: rgba(179, 38, 30, .5); }
button.bk-progress-miss-name { cursor: pointer; }
button.bk-progress-miss-name::after { content: " 🌳"; text-decoration: none; display: inline-block; }
button.bk-progress-miss-name:hover, button.bk-progress-miss-name:focus-visible { border-color: #b3261e; }

/* 図鑑のまちがいの報告（「図鑑」の隣の「報告」。入力欄の見た目は js/reportform.js が入れる。2026-10-01） */
.idresult-report { margin: 10px 0 0; text-align: center; }
.idresult-buttons .idresult-report-btn { border-color: #ff6b6b; color: #ff6b6b; background: transparent; } /* 図鑑の隣の「報告」（赤い文字） */
.idresult-buttons .idresult-report-btn:hover, .idresult-buttons .idresult-report-btn:focus { border-color: #ff8f8f; color: #ff8f8f; background: rgba(255, 107, 107, .12); }
.idresult-buttons .idresult-report-btn:disabled { opacity: .55; }
.idresult-buttons .idresult-report-btn[hidden] { display: none; }
/* ごほうびの1行（「50ジュエル獲得！ ・ 経験値 +2」。buckets_result.js の show。2026-10-01） */
.idresult-reward-sep { margin: 0 6px; color: rgba(255, 255, 255, .5); }
.idresult-reward-exp { color: #9ff2b8; }

/* 種同定の写真は押すと拡大（js/zoomview.js。2026-10-02） */
.pokemodal img.bk-zoomable { cursor: zoom-in; }
/* 「相棒にする」（2026-10-04。やったね画面のボタンの いちばん前） */
.idresult-buttons .idresult-partner-btn { order: -1; border: 0; background: linear-gradient(135deg, #ff9a3d, #ff6a3d); color: #fff; font-weight: 800; }
.idresult-buttons .idresult-partner-btn:hover, .idresult-buttons .idresult-partner-btn:focus { color: #fff; filter: brightness(1.06); }
.idresult-buttons .idresult-partner-btn.is-done { background: rgba(255, 255, 255, .14); color: #ffd9a8; opacity: 1; }
.idresult-buttons .idresult-partner-btn[hidden] { display: none; }
/* 種同定の窓・やったね画面が 出ているあいだ、うしろの カードの 光（.reflection）を 止めて 暗くする（2026-10-04 ユーザー指摘「うしろが キラキラし続けて うるさい」） */
html.bk-quiz-open .reflection, html.idresult-open .reflection { animation: none; -webkit-animation: none; opacity: 0; }
html.bk-quiz-open body::before { content: ""; position: fixed; inset: 0; z-index: 998; background: rgba(0, 10, 25, .6); pointer-events: none; }
