/* (CSS / チュートリアルガイドのスタイル一式) */
.tut-root { position: fixed; inset: 0; z-index: 9000; pointer-events: none; }
.tut-root.is-on { pointer-events: auto; }

/* 全画面メッセージ用の暗幕（ぼかし＋暗転） */
.tut-fill {
  position: fixed; inset: 0;
  background: rgba(8,10,20,0.45);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  opacity: 0; transition: opacity .4s ease; display: none;
}
.tut-fill.is-show { opacity: 1; }

/* フォーカス用の暗幕（4枚の矩形で対象だけ穴を空ける） */
.tut-spot { position: fixed; inset: 0; display: none; }
.tut-spot.is-show { display: block; }
.tut-rect {
  position: fixed;
  background: rgba(8,10,20,0.55);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  transition: left .35s ease, top .35s ease, width .35s ease, height .35s ease, opacity .4s ease;
  opacity: 0;
}
.tut-spot.is-show .tut-rect { opacity: 1; }

/* 注目リング（対象に被せる別レイヤー。対象自身のスタイルは触らない） */
.tut-ring {
  position: fixed; border-radius: 10px; pointer-events: none;
  box-shadow: 0 0 0 2px rgba(255,224,130,0.9), 0 0 18px 4px rgba(255,224,130,0.55);
  opacity: 0; transition: left .35s ease, top .35s ease, width .35s ease, height .35s ease, opacity .3s ease;
}
.tut-ring.is-show { opacity: 1; animation: tut-ring-pulse 1.4s ease-in-out infinite; }
@keyframes tut-ring-pulse {
  0%   { box-shadow: 0 0 0 2px rgba(255,224,130,0.9), 0 0 14px 3px rgba(255,224,130,0.45); }
  50%  { box-shadow: 0 0 0 3px rgba(255,224,130,1),   0 0 26px 8px rgba(255,224,130,0.7); }
  100% { box-shadow: 0 0 0 2px rgba(255,224,130,0.9), 0 0 14px 3px rgba(255,224,130,0.45); }
}

/* 全画面メッセージのテキスト */
.tut-msg {
  position: fixed; inset: 0; display: flex; align-items: center; justify-content: center;
  padding: 24px; text-align: center; pointer-events: none;
}
.tut-msg-inner {
  color: #fff; font-size: clamp(1.3rem, 4vw, 2.2rem); font-weight: 800; line-height: 1.5;
  white-space: pre-line;
  text-shadow: 0 2px 16px rgba(0,0,0,0.6);
  opacity: 0; transform: translateY(12px); transition: opacity .45s ease, transform .45s ease;
}
.tut-msg.is-show .tut-msg-inner { opacity: 1; transform: translateY(0); }

/* 吹き出し */
.tut-tip {
  position: fixed; width: 260px; max-width: calc(100vw - 28px);
  background: #14182a; color: #eef; border: 1px solid rgba(255,224,130,0.5);
  border-radius: 12px; padding: 14px 16px; box-shadow: 0 10px 30px rgba(0,0,0,0.5);
  opacity: 0; transition: opacity .3s ease, left .35s ease, top .35s ease; pointer-events: auto;
}
.tut-tip.is-show { opacity: 1; }
.tut-tip h4 { margin: 0 0 6px; font-size: 1.05rem; color: #ffe082; }
.tut-tip p  { margin: 0 0 12px; font-size: .95rem; line-height: 1.65; }
.tut-tip-btns { display: flex; gap: 8px; justify-content: flex-end; align-items: center; }
.tut-tip-btns .tut-skip { margin-right: auto; background: none; border: none; color: #99a; font-size: .85rem; cursor: pointer; min-height: 44px; padding: 0 6px; }
.tut-tip-btns button.tut-nav {
  background: #2a3052; color: #eef; border: 1px solid rgba(255,255,255,0.15);
  border-radius: 8px; min-height: 44px; padding: 8px 18px; font-size: .9rem; cursor: pointer;
}
.tut-tip-btns button.tut-nav.is-primary { background: #ffe082; color: #2a2200; border-color: #ffe082; font-weight: 700; }

/* スマホ：吹き出しを画面下のシートとして全幅固定 */
.tut-tip.is-sheet {
  left: 0; right: 0; bottom: 0; top: auto;
  width: 100%; max-width: 100%; border-radius: 16px 16px 0 0;
  padding: 18px 18px calc(18px + env(safe-area-inset-bottom, 0px));
}
.tut-tip.is-sheet p { font-size: 1rem; }

/* キャンセル✕（常設、44pxタップ領域） */
.tut-cancel {
  position: fixed; top: 14px; right: 14px; width: 44px; height: 44px; border-radius: 50%;
  background: rgba(20,24,42,0.85); color: #fff; border: 1px solid rgba(255,255,255,0.2);
  font-size: 1.15rem; cursor: pointer; display: flex; align-items: center; justify-content: center;
}

/* 終了の波紋 */
.tut-ripple {
  position: fixed; left: 50%; top: 50%; width: 40px; height: 40px; margin: -20px 0 0 -20px;
  border-radius: 50%; border: 3px solid rgba(255,224,130,0.8); transform: scale(0); opacity: .9;
}
.tut-ripple.is-go { animation: tut-ripple-go .9s ease-out forwards; }
@keyframes tut-ripple-go {
  0%   { transform: scale(0);  opacity: .9; }
  100% { transform: scale(26); opacity: 0;  }
}

/* 中央のやわらかい閃光（終了演出をリッチに） */
.tut-burst {
  position: fixed; left: 50%; top: 50%; width: 60px; height: 60px; margin: -30px 0 0 -30px;
  border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, rgba(255,236,180,0.85) 0%, rgba(255,224,130,0.35) 42%, rgba(255,224,130,0) 70%);
  transform: scale(0); opacity: 0;
}
.tut-burst.is-go { animation: tut-burst-go 1.1s ease-out forwards; }
@keyframes tut-burst-go {
  0%   { transform: scale(0);  opacity: 0; }
  15%  { opacity: .9; }
  100% { transform: scale(22); opacity: 0; }
}

/* 締め：✕ のフェードアウト */
.tut-cancel { transition: opacity .4s ease; }
.tut-cancel.is-hidden { opacity: 0; pointer-events: none; }

/* 締め：手描き風の矢印 */
.tut-arrow { position: fixed; inset: 0; pointer-events: none; opacity: 0; transition: opacity .4s ease; }
.tut-arrow.is-show { opacity: 1; }
.tut-arrow path { fill: none; stroke: #ffe082; stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; filter: drop-shadow(0 0 6px rgba(255,224,130,.6)); }
.tut-arrow .tut-arrow-line { stroke-dasharray: 1; stroke-dashoffset: 1; }
.tut-arrow.is-show .tut-arrow-line { animation: tut-arrow-draw .7s ease forwards; }
@keyframes tut-arrow-draw { to { stroke-dashoffset: 0; } }

/* 締め：タップで終了の案内 */
.tut-taphint {
  position: fixed; left: 0; right: 0; bottom: 12%; text-align: center; pointer-events: none;
  color: #fff; font-size: 1.05rem; font-weight: 700; text-shadow: 0 2px 12px rgba(0,0,0,.6);
  opacity: 0; transition: opacity .5s ease;
}
.tut-taphint.is-show { opacity: 1; animation: tut-taphint-pulse 1.5s ease-in-out infinite; }
@keyframes tut-taphint-pulse { 0%,100% { opacity: .65; } 50% { opacity: 1; } }

/* 起動ボタン */
.tut-launch {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(255,224,130,0.12); color: #ffe082; border: 1px solid rgba(255,224,130,0.5);
  border-radius: 999px; padding: 6px 14px; font-size: .85rem; cursor: pointer;
}
.tut-launch:hover { background: rgba(255,224,130,0.22); }

@media (prefers-reduced-motion: reduce) {
  .tut-ring.is-show { animation: none; }
  .tut-ripple.is-go { animation-duration: .4s; }
  .tut-burst.is-go { animation-duration: .4s; }
  .tut-arrow.is-show .tut-arrow-line { animation: none; stroke-dashoffset: 0; }
  .tut-taphint.is-show { animation: none; }
}
