/* 島の宝箱の窓 (なぞかけ宝箱の難しさを選ぶ・謎に答える・10-21・public/isle_chest_ui.js) */
.chestDlg { position: fixed; inset: 0; z-index: 40; display: flex; align-items: center; justify-content: center; background: rgba(8, 12, 28, 0.45); padding: 16px; }
.chestDlg.hidden { display: none; }
.chestCard {
  width: min(560px, 100%); max-height: calc(100% - 16px); overflow: auto; background: #fffaf0; color: #2b2418;
  border: 3px solid #b07a3a; border-radius: 16px; padding: 16px 18px 14px; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}
.chestCard.gold { border-color: #e2b33b; background: linear-gradient(#fffbe8, #fff4cc); }
.chestPic { float: right; width: 72px; height: auto; margin: -4px 0 4px 12px; }
.chestPic.hidden { display: none; }
.chestTitle { margin: 0 0 6px; font-size: 20px; color: #7a4a22; }
.chestCard.gold .chestTitle { color: #9a6a00; }
.chestLead { margin: 0 0 12px; font-size: 15px; line-height: 1.6; white-space: pre-wrap; }
.chestLevels, .chestChoices { display: flex; flex-direction: column; gap: 8px; }
.clBtn, .ccBtn {
  text-align: left; padding: 10px 12px; border-radius: 10px; border: 2px solid #d9b98a; background: #fff; color: #2b2418;
  font-size: 15px; cursor: pointer; line-height: 1.45;
}
.clBtn:hover, .ccBtn:hover, .clBtn:focus-visible, .ccBtn:focus-visible { border-color: #b07a3a; background: #fff3dc; outline: none; }
.clBtn:disabled, .ccBtn:disabled { opacity: 0.6; cursor: default; }
.ccBtn.picked { border-color: #3a7bd5; background: #e6f0ff; opacity: 1; }
.clName { display: block; font-size: 16px; }
.clHint { display: block; font-size: 13px; color: #6b5a40; margin-top: 2px; }
.chestTime { margin-top: 12px; height: 8px; border-radius: 4px; background: #eadbc2; overflow: hidden; }
.chestTime i { display: block; height: 100%; width: 100%; background: linear-gradient(90deg, #e2863b, #f2c84b); transition: width 0.2s linear; }
.chestLeft { margin: 6px 0 0; font-size: 13px; color: #6b5a40; text-align: right; }
.chestFoot { display: flex; justify-content: flex-end; margin-top: 12px; }
.chestFoot:empty { display: none; }
.chestClose { padding: 8px 16px; border-radius: 10px; border: 2px solid #c9b18d; background: #fff; color: #4a3a22; font-size: 14px; cursor: pointer; }
/* 金の当たり・正解の大きな知らせ (town.html の #isleBanner に gold を付ける) */
#isleBanner.gold { border-color: #ffe27a; background: linear-gradient(rgba(70, 48, 0, 0.95), rgba(40, 28, 0, 0.95)); box-shadow: 0 0 24px rgba(255, 214, 90, 0.6); }
#isleBanner.gold .ibTitle { color: #ffe680; font-size: 30px; }
@media (max-height: 460px) {
  .chestCard { padding: 10px 12px; }
  .chestPic { width: 48px; margin: -2px 0 2px 8px; }
  .chestTitle { font-size: 17px; margin-bottom: 4px; }
  .chestLead { font-size: 13px; margin-bottom: 8px; line-height: 1.45; }
  .clBtn, .ccBtn { padding: 6px 10px; font-size: 13px; }
  .clName { font-size: 14px; }
  .clHint { font-size: 12px; }
  .chestLevels, .chestChoices { gap: 5px; }
  /* (スマホ横: 難しさは 2 列・大きな知らせは上の端に小さく = 宝箱に重ならない) */
  .chestLevels { display: grid; grid-template-columns: 1fr 1fr; }
  .chestFoot { margin-top: 8px; }
  .chestClose { padding: 5px 14px; font-size: 13px; }
  body #isleBanner { top: 6px; padding: 7px 16px 6px; }
  body #isleBanner .ibTitle, body #isleBanner.gold .ibTitle { font-size: 19px; }
  body #isleBanner .ibSub { font-size: 12px; margin-top: 2px; }
}
/* 島のチュートリアルの入口 (10-21・public/tut_isle.js): 左上の札の中の「チュートリアル」(札は押せない作りなので、この行だけ押せる) */
#isleTut { display: flex; align-items: center; gap: 8px; margin-top: 6px; font-size: 13px; color: #4a5568; pointer-events: auto; }
#isleTut.hidden { display: none; }
#isleTut .coachBtn { min-height: 30px; font-size: 13px; }
/* 初めて島に来た時の「やってみる？」 */
.isleTutOffer {
  position: fixed; left: 50%; top: calc(76px + var(--bandH, 0px)); transform: translateX(-50%); z-index: 30; width: min(460px, calc(100% - 32px));
  background: #fffaf0; color: #2b2418; border: 3px solid #c9a227; border-radius: 14px; padding: 12px 14px 10px; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
}
.isleTutOffer .itoHead { margin: 0; font-size: 16px; font-weight: bold; color: #7a4a22; }
.isleTutOffer .coachHowto { margin-top: 8px; }
.itoLater { margin-top: 8px; min-height: 44px; padding: 4px 12px; border-radius: 10px;   /* (min-height = 11-07 小さい画面の見回り: スマホで高さ 33 画素で押しにくかった) */ border: 2px solid #c9b18d; background: #fff; color: #4a3a22; font: inherit; font-size: 13px; cursor: pointer; }
@media (max-height: 460px) {
  .isleTutOffer { top: 6px; padding: 8px 10px; }
  .isleTutOffer .itoHead { font-size: 14px; }
  #isleTut { margin-top: 0; }
}
/* 島のチュートリアルの吹き出しは右の列 (public/tut_isle.js の place) */
@media (max-height: 460px) {
  /* (スマホの横: チュートリアルの間は宝箱の窓を左へ寄せて、右の列の吹き出しと重ねない) */
  body.coachOn .chestDlg { justify-content: flex-start; }
  body.coachOn .chestCard { width: min(560px, 58vw); }
}
