/* s21-30 r9（2026-11-08）：ガチャ＆Wan-Coco Garden のチュートリアル（garden-tut.mjs）。
   今までのボタン・画面の位置とデザインは変えない。指マークは今までのチュートリアルと同じ絵（.tut-finger、tutorial-r20.css）と同じ動き（トントン 0.9 秒＋押す瞬間に淡い金色の光） */

/* 指マーク：押す所をトントン */
.gtut-finger { animation: gtut-tap .9s ease-in-out infinite; }
.gtut-finger img { animation: gtut-glint .9s ease-out infinite; }
@keyframes gtut-tap { 0%, 100% { transform: translateY(-6px) scale(1); } 45% { transform: translateY(4px) scale(.9); } }
@keyframes gtut-glint {
  0%, 35%, 62%, 100% { filter: drop-shadow(0 0 0 rgba(255, 226, 160, 0)); }
  45% { filter: drop-shadow(0 0 7px rgba(255, 226, 160, .85)) drop-shadow(0 0 2px rgba(255, 244, 214, .9)); }
}
/* ホーム画面：ボタンの中に置く（ボタンと一緒に動く）。押す操作はさえぎらない。少し遅れてふわっと出す */
.wcg-sign .gtut-finger.gtut-on-sign { position: absolute; left: 66%; top: 26%; /* 375×667 でも指の先まで画面の中 */ z-index: 1; pointer-events: none;
  animation: gtut-in .4s ease-out 1s both, gtut-tap .9s ease-in-out 1s infinite; }
@keyframes gtut-in { from { opacity: 0; } to { opacity: 1; } }
/* s21-30 r46：Garden の説明の後、スタート画面の「Tap to Start」に同じ指マーク（同じ絵・同じトントン） */
#titleStart .gtut-finger.gtut-on-start { position: absolute; left: 84%; top: 34%; z-index: 1; pointer-events: none;
  animation: gtut-in .4s ease-out .4s both, gtut-tap .9s ease-in-out .4s infinite; }
#titleStart .gtut-finger img { width: 54px; height: auto; display: block; }
/* 看板の絵のルール（.wcg-sign img＝幅 100%・影）が指の絵にかからないように */
.wcg-sign .gtut-finger img, .wcg-sign:active .gtut-finger img { width: 54px; transform: none; }
/* ボタンがふわっと光る（明るさと光だけ。大きさ・位置は変えない） */
.wcg-sign.gtut-blink > img { animation: gtut-sign-blink 1.8s ease-in-out 1s infinite; }
@keyframes gtut-sign-blink {
  0%, 100% { filter: drop-shadow(0 4px 6px #2a1a0a55); }
  50% { filter: brightness(1.12) drop-shadow(0 0 8px #fff4b8) drop-shadow(0 0 14px #ffe07a) drop-shadow(0 4px 6px #2a1a0a55); }
}
/* Garden：「庭を編集」の指マーク（ボタンの位置に重ねる。left/top は garden-tut.mjs） */
.gtut-finger.gtut-on-edit { z-index: 5; }
.wcg-edit-btn.gtut-blink { animation: gtut-btn-blink 1.6s ease-in-out infinite; }
@keyframes gtut-btn-blink { 0%, 100% { box-shadow: 0 2px 6px #2a1a0a40; } 50% { box-shadow: 0 0 0 3px #ffe08a, 0 0 16px 5px #ffd25acc; } }

/* s21-30 r13：初めてのガチャの案内。Garden の「ガチャを回す」に指（位置は garden-tut.mjs）＋ボタンがふわっと光る（位置・大きさは変えない） */
.gtut-finger.gtut-on-gacha { z-index: 9150; }
.wcg-gacha-btn.gtut-blink { animation: gtut-gacha-blink 1.4s ease-in-out infinite; }
@keyframes gtut-gacha-blink { 0%, 100% { filter: none; } 50% { filter: brightness(1.1) drop-shadow(0 0 8px #fff6b8) drop-shadow(0 0 14px #ffd25a); } }
/* 結果画面の「ガチャを回す」に指（ボタンの中に置く＝ボタンと一緒に動く。押す操作はさえぎらない） */
.wcg-res-gacha { position: relative; }
/* r47：木目のボタンの右側にガチャマシーンの絵があるので、指は文字の下の真ん中あたり（マシーンに重ねない） */
/* r48：もう少し小さく（54px → 42px）・下へ（文字の下の端より下、カードの文字より上） */
/* r49（ユーザー指示）：少し右へ（30% → 44%＝指先がボタンの真ん中あたり）。大きさ・高さ・動きはそのまま */
.wcg-res-gacha .gtut-finger.gtut-on-res { position: absolute; left: 44%; top: 80%; z-index: 2; pointer-events: none; }
.wcg-res-gacha .gtut-finger img { width: 42px; height: auto; display: block; }
.wcg-res-gacha.gtut-blink { animation: gtut-gacha-blink 1.4s ease-in-out infinite; }
/* Garden：もう一度見る「？」（ホームへのボタンの右。r10：ぷっくりしたピンクの丸いボタン＋太い白の「?」。
   位置は r9 と同じ（中心をそろえるため、少し大きくした分だけ上と左を 2px ずらす） */
/* r15（2026-11-09）：受け取ったクリーム色＋グリーンの丸いボタンの絵（07DB95C0、透明。余白を切って 264px に縮めただけ）。位置・大きさ（44px）は r10〜r14 と同じ */
.wcg-btn.gtut-help, .wcg-btn.gtut-help:active { position: absolute; z-index: 3; top: calc(6px + env(safe-area-inset-top, 0px)); left: calc(124px + env(safe-area-inset-left, 0px));
  width: 44px; min-height: 44px; height: 44px; padding: 0; margin: 0; border: 0; border-radius: 50%; box-sizing: border-box;
  display: block; background: none; box-shadow: none; -webkit-tap-highlight-color: transparent; }
.wcg-btn.gtut-help img { display: block; width: 100%; height: 100%; object-fit: contain; max-width: none; pointer-events: none; filter: drop-shadow(0 2px 3px #2a1a0a55); }
.wcg-btn.gtut-help:active { transform: scale(.94); }
.wcg-editing .gtut-help { display: none; }
/* 案内中：「？」がふわっと光る（大きさ・位置はほとんど変えない） */
.wcg-btn.gtut-help.gtut-blink { animation: gtut-help-blink 1.4s ease-in-out infinite; }
@keyframes gtut-help-blink {
  0%, 100% { box-shadow: 0 0 0 0 #fff0; transform: scale(1); }
  50% { box-shadow: 0 0 0 4px #fff8, 0 0 18px 7px #fff3b0ee; transform: scale(1.06); filter: brightness(1.06); }
}
/* 「？」の案内：指（置き場所は garden-tut.mjs）と木のプレート。幕は敷かないので、Garden はそのまま操作できる */
.gtut-finger.gtut-on-help { z-index: 9150; }
.gtut-plate, .gtut-plate:active { position: fixed; z-index: 9100; left: 50%; transform: translateX(-50%); margin: 0; padding: 0; border: 0; background: none;
  width: min(calc((100vw - 24px) * .6), 276px); /* r15：r10〜r14 の約 60%（前は min(100vw − 24px, 460px)）。縦横比はそのまま */ cursor: pointer; -webkit-tap-highlight-color: transparent; animation: gtut-plate-in .45s cubic-bezier(.2, 1.4, .4, 1) both; }
.gtut-plate img { display: block; width: 100%; height: auto; max-width: none; filter: drop-shadow(0 6px 10px #10123366); }
@keyframes gtut-plate-in { from { opacity: 0; transform: translateX(-50%) scale(.85); } to { opacity: 1; transform: translateX(-50%) scale(1); } }

/* r22：初回の説明の後に 1 回だけ「ホームへ」を案内（指＝今までと同じ絵と動き、置き場所は garden-tut.mjs）。
   ボタンは位置・大きさを変えず、やさしく 3 回光るだけ。札は木枠＋クリーム色（ステージ15の案内の札と同じ見た目で小さめ）。押す操作はさえぎらない */
.gtut-finger.gtut-on-home { z-index: 9150; }
.wcg-back.gtut-home-blink .wcg-back-art { animation: gtut-home-blink 1.2s ease-in-out 3; }
@keyframes gtut-home-blink {
  0%, 100% { filter: none; }
  50% { filter: brightness(1.1) drop-shadow(0 0 6px #fff6b8) drop-shadow(0 0 12px #ffd25a); }
}
.gtut-home-tip { position: fixed; z-index: 9100; margin: 0; padding: 6px 12px; pointer-events: none; white-space: nowrap;
  border: 2px solid #8a5a2b; border-radius: 12px; background: linear-gradient(#fffaf0, #f6e7c8);
  box-shadow: inset 0 0 0 1px #fff8, 0 2px 0 #6e4520, 0 4px 8px #2a1a0a40;
  color: #5a3a1e; font: 800 14px/1.3 "M PLUS Rounded 1c", "Hiragino Maru Gothic ProN", "Yu Gothic", system-ui, sans-serif;
  animation: gtut-in .3s ease-out both; }
/* 4 枚の絵：暗い幕の上に、絵を縦横比のまま画面に収める（--gr＝絵の幅÷高さ） */
.gtut { position: absolute; inset: 0; z-index: 10; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  padding: calc(56px + env(safe-area-inset-top, 0px)) 12px calc(16px + env(safe-area-inset-bottom, 0px)); box-sizing: border-box;
  background: rgba(0, 0, 0, .45); cursor: pointer; -webkit-tap-highlight-color: transparent; }
.gtut-card img { display: block; height: auto; max-width: none;
  width: min(calc(100vw - 24px), 560px, calc((100svh - 150px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px)) * var(--gr, 1.3)));
  filter: drop-shadow(0 6px 12px #10123366); }
.gtut-card img.gtut-pop { animation: tut-ok-pop .5s cubic-bezier(.2, 1.4, .4, 1) both; }
.gtut-bar { display: flex; align-items: center; gap: 14px; }
.gtut-dots { display: flex; gap: 6px; }
.gtut-dots i { width: 8px; height: 8px; border-radius: 50%; background: #ffffff70; }
.gtut-dots i.on { background: #fff; }
.gtut-next, .gtut-next:active, .gtut-skip, .gtut-skip:active {
  font: 800 15px/1 "M PLUS Rounded 1c", "Hiragino Maru Gothic ProN", "Yu Gothic", system-ui, sans-serif; border-radius: 999px; cursor: pointer; transform: none;
  -webkit-tap-highlight-color: transparent; }
.gtut-next { min-width: 120px; min-height: 44px; padding: 10px 22px; border: 2px solid #fff; background: linear-gradient(#ff9fcf, #e8579f); color: #fff; box-shadow: 0 3px 0 #b03d78; }
.gtut-next:active { transform: translateY(2px); box-shadow: 0 1px 0 #b03d78; }
.gtut-skip { position: absolute; top: calc(8px + env(safe-area-inset-top, 0px)); right: calc(8px + env(safe-area-inset-right, 0px));
  min-height: 40px; padding: 8px 14px; border: 2px solid #fff; background: #fffffff0; color: #5a3d2b; font-size: 14px; box-shadow: 0 2px 6px #2a1a0a40; }
@media (prefers-reduced-motion: reduce) {
  .gtut-finger, .gtut-finger img, .wcg-sign.gtut-blink > img, .wcg-edit-btn.gtut-blink, .wcg-btn.gtut-help.gtut-blink, .gtut-plate, .wcg-gacha-btn.gtut-blink, .wcg-res-gacha.gtut-blink, .wcg-back.gtut-home-blink .wcg-back-art, .gtut-home-tip { animation: none !important; }
  .wcg-sign .gtut-finger.gtut-on-sign { opacity: 1; }
}
