/* =================================================
   あなたのフジタコイン（コイン枚数確認画面）/favorite/
   FUJITA築育サイト

   構成:
   1. 背景エリア（#DAF2FF＋雲装飾）
   2. タイトル・説明文
   3. Main Box（キャラ＋コイン枚数＋グリッド＋メッセージ／コンプリートボタン）
   4. フローティングボタン（tobira-guide流用）
   5. レスポンシブ（768px以下=SP、769〜999px=Main BoxのみSPレイアウト）
================================================= */

.is-pc-only { display: block !important; }
.is-sp-only { display: none !important; }

.fav-hero {
  position: relative;
  background: #DAF2FF;
  overflow: hidden;
  padding: 0 0 100px;
}

.fav-hero__cloud {
  position: absolute;
}

/* -----------------------------------------------
   タイトル・説明文
----------------------------------------------- */
.fav-title {
  position: relative;
  z-index: 1;
  margin: 0;
  padding-top: 100px;
  font-family: var(--font-main);
  font-weight: 900;
  font-size: 60px;
  letter-spacing: 0.05em;
  text-align: center;
  background: linear-gradient(125.53deg, #0E845C 9.49%, #0867AE 94.76%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.fav-read {
  position: relative;
  z-index: 1;
  max-width: 856px;
  margin: 20px auto 0;
  padding: 0 20px;
  font-family: var(--font-main);
  font-weight: 500;
  font-size: 18px;
  color: var(--color-text);
  text-align: center;
  line-height: 1.7;
}

/* 10枚コンプリート時の通知（.fav-readと差し替えで表示） */
.fav-complete {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  max-width: 856px;
  margin: 20px auto 0;
  padding: 0 20px;
}

.fav-complete[hidden] {
  display: none;
}

.fav-complete__img {
  display: block;
  width: 160px;
  height: auto;
  flex-shrink: 0;
}

.fav-complete__text {
  margin: 0;
  font-family: var(--font-main);
  font-weight: 900;
  font-size: 50px;
  line-height: 1.3;
  color: #D42C26;
  text-align: center;
  -webkit-text-stroke: 6px #fff;
  paint-order: stroke fill;
}

/* -----------------------------------------------
   Main Box
----------------------------------------------- */
.fav-box {
  position: relative;
  z-index: 1;
  width: 912px;
  max-width: calc(100% - 40px);
  margin: 60px auto 0;
  background: var(--color-white);
  border-radius: 40px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  padding: 40px;
  display: flex;
  flex-direction: column;
}

.fav-box__row {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 40px;
}

.fav-box__char {
  flex: 0 0 271px;
  width: 271px;
}

.fav-box__char img {
  display: block;
  width: 100%;
  height: auto;
}

.fav-box__body {
  flex: 1;
  min-width: 0;
}

.fav-box__head {
  margin: 0;
  font-family: var(--font-main);
  font-weight: 700;
  font-size: 36px;
  color: #0867AE;
}

.fav-box__count {
  margin: 20px 0 0;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 80px;
  letter-spacing: 0.1em;
  color: #0867AE;
  text-align: center;
}

.fav-box__count span { font-size: inherit; }

/* -----------------------------------------------
   コイングリッド
----------------------------------------------- */
.fav-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px 10px;
  max-width: 367px;
  margin-top: 30px;
}

.fav-grid__slot {
  width: 100%;
  aspect-ratio: 1 / 1;
}

.fav-grid__slot img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* -----------------------------------------------
   メッセージ／コンプリート時ボタン
----------------------------------------------- */
.fav-message {
  margin-top: 30px;
}

.fav-message__text {
  margin: 0;
  font-family: var(--font-main);
  font-weight: 500;
  font-size: 26px;
  color: var(--color-text);
  line-height: 2;
  text-align: center;
}

.fav-hints {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
}

.fav-hints[hidden] {
  display: none;
}

.fav-hint {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.fav-hint[hidden] {
  display: none;
}

.fav-hint__tag {
  flex-shrink: 0;
  padding: 4px 14px;
  border-radius: 999px;
  background: var(--color-green);
  color: var(--color-white);
  font-family: var(--font-main);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.05em;
}

.fav-hint__text {
  font-family: var(--font-main);
  font-weight: 500;
  font-size: 16px;
  color: #0867AE;
  text-decoration: underline;
}

.fav-hint:hover .fav-hint__text {
  color: var(--color-green);
}

.fav-challenge-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  width: 406.8px;
  max-width: 100%;
  height: 94px;
  margin: 0 auto;
  background: #fff;
  border: 3px solid #0867AE;
  border-radius: 47px;
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transition: opacity var(--transition);
}

.fav-challenge-btn[hidden] {
  display: none;
}
.fav-challenge-btn:hover { opacity: 0.85; }

.fav-challenge-btn__text {
  font-family: var(--font-main);
  font-weight: 700;
  font-size: 24px;
  color: #0867AE;
  letter-spacing: 0.05em;
}

.fav-challenge-btn__icon {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: #0867AE;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 24px;
  flex-shrink: 0;
}

/* -----------------------------------------------
   フローティングボタン（quiz.css の .tobira-guide と同一・流用）
----------------------------------------------- */
.tobira-guide {
  position: fixed;
  bottom: 20%; /* フッターのロゴ・テキストと被らないよう引き上げ（PC向け。SPは下部メディアクエリで別途上書き） */
  left: var(--space-md);
  z-index: 100;
}
.tobira-guide.is-pc-only { width: 115px; height: 216px; }
.tobira-guide.is-sp-only { width: 73px;  height: 137px; }

.tobira-guide__char {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: none;
}
.tobira-guide__char.is-active { display: block; }
.tobira-guide.is-pc-only .tobira-guide__char { width: 115px; bottom: 64px; }
.tobira-guide.is-sp-only .tobira-guide__char { width: 73px;  bottom: 40px; }

.tobira-guide__btn {
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background:
    linear-gradient(#fff, #fff) padding-box,
    linear-gradient(95deg, #0E845C 9.49%, #0867AE 94.76%) border-box;
  color: #0E845C;
  font-family: var(--font-main);
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}
.tobira-guide__btn-line {
  display: block;
}
.tobira-guide.is-pc-only .tobira-guide__btn { width:108px; height:108px; border:4px solid transparent; font-size:16px; line-height:1.4; }
.tobira-guide.is-sp-only .tobira-guide__btn { width:68px;  height:68px;  border:3px solid transparent; font-size:9px;  line-height:1.4; }

/* -----------------------------------------------
   中間幅（769px〜999px）：Main BoxのみSPレイアウトに切替
   PCの横並びだと崩れるため
----------------------------------------------- */
@media screen and (min-width: 769px) and (max-width: 999px) {
  .fav-box {
    padding: 32px 24px;
  }
  .fav-box__row { flex-direction: column; }
  .fav-box__char { width: 180px; flex-basis: auto; }
  .fav-grid { max-width: 100%; }
}

/* -----------------------------------------------
   SP（768px以下）
----------------------------------------------- */
@media screen and (max-width: 768px) {
  .is-pc-only { display: none !important; }
  .is-sp-only { display: block !important; }

  .fav-title { font-size: 32px; padding-top: 60px; }
  .fav-read { font-size: 14px; margin-top: 12px; }

  .fav-complete {
    flex-direction: column;
    gap: 12px;
    margin-top: 12px;
  }
  .fav-complete__img { width: 100px; }
  .fav-complete__text {
    font-size: 28px;
    -webkit-text-stroke: 4px #fff;
  }

  .fav-box {
    margin-top: 80px;
    padding: 24px 16px;
    border-radius: 24px;
  }
  .fav-box__row { flex-direction: column; gap: 0; }
  .fav-box__char { width: 140px; flex-basis: auto; margin-top: -80px; }
  .fav-box__head { text-align: center; }
  .fav-box__count { margin-top: 0; text-align: center; }
  .fav-grid { max-width: 100%; margin: 20px auto 0; }
  .fav-message { text-align: center; }
  .fav-message__text { font-size: 18px; }
  .fav-hints { margin-top: 12px; gap: 10px; }
  .fav-hint { flex-direction: column; gap: 4px; }
  .fav-hint__text { font-size: 14px; }
  .fav-challenge-btn { width: 100%; height: 68px; margin: 0 auto; }
  .fav-challenge-btn__text { font-size: 18px; }
  .fav-challenge-btn__icon { width: 40px; height: 40px; font-size: 18px; }

  .tobira-guide { bottom: var(--space-sm); left: var(--space-sm); }
}
