/* --------------- */
/* Tutorial(スポットライト＋指差しアイコン＋吹き出し。pages/js/tutorial.js) */
/* --------------- */

/* New Gameポップアップ(1103)・Botの考え中のスピナー(1200)より上に出す */
.tutorial-layer {
    position: fixed;
    inset: 0;
    z-index: 1300;
}

.tutorial-layer[hidden] {
    display: none;
}

/* 全面でクリックを止める。対象が無いステップは全体を暗くする */
.tutorial-blocker {
    position: absolute;
    inset: 0;
    background: transparent;
}

.tutorial-blocker.dimmed {
    background: rgba(0, 0, 0, 0.55);
}

/* 対象の周りを、大きな影で暗くする(対象の部分だけくり抜いて見える) */
.tutorial-spotlight {
    position: fixed;
    border-radius: 8px;
    box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.55);
    outline: 2px solid rgba(255, 255, 255, 0.8);
    pointer-events: none;
    transition: left 0.25s ease, top 0.25s ease, width 0.25s ease, height 0.25s ease;
}

/* 対象を1つずつ照らすステップ(spotEach)の枠。暗くするのは clip-path で穴を開けた全面の層(tutorial.js) */
/* 穴は .tutorial-spotlight と同じ丸みの角丸(tutorial.js の TUTORIAL_SPOT_RADIUS)のため、枠も同じだけ丸める */
.tutorial-spot-ring {
    position: fixed;
    border-radius: 8px;
    outline: 2px solid rgba(255, 255, 255, 0.8);
    pointer-events: none;
}

/* 指差しアイコン(右を指す画像)。サイズは tutorial.js の TUTORIAL_POINTER_SIZE と合わせる */
.tutorial-pointer {
    position: fixed;
    width: 48px;
    height: 48px;
    display: none;
    pointer-events: none;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.4));
    animation: tutorial-tap 1s ease-in-out infinite;
}

@keyframes tutorial-tap {
    0%, 100% {
        transform: translateX(-10px);
    }

    50% {
        transform: translateX(0) scale(0.92);
    }
}

/* 吹き出し */
.tutorial-tooltip {
    position: fixed;
    width: min(90vw, 320px);
    box-sizing: border-box;
    padding: 14px 16px 12px;
    border-radius: 10px;
    background: var(--color-white);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

/* 開始時に吹き出し全体へフォーカスする(tutorial.js)。吹き出し自体には枠を出さない */
.tutorial-tooltip:focus {
    outline: none;
}

.tutorial-tooltip.centered {
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
}

.tutorial-text {
    margin: 0 0 12px;
    font-size: 0.9rem;
    line-height: 1.6;
}

.tutorial-footer {
    justify-content: space-between;
}

.tutorial-btns {
    gap: 6px;
}

.tutorial-btns .message-btn {
    width: auto;
    min-width: 56px;
    height: 32px;
    padding: 0 10px;
}

.tutorial-btns .message-btn:disabled {
    opacity: 0.5;
    cursor: default;
}

/* 動きを減らす設定のときは、指のアニメーションとスポットライトの移動の動きを止める */
@media (prefers-reduced-motion: reduce) {
    .tutorial-pointer {
        animation: none;
    }

    .tutorial-spotlight {
        transition: none;
    }
}

@media (max-width: 768px) {
    .tutorial-text {
        font-size: 0.85rem;
    }
}


/* 「操作方法」のBot対局の制限のステップで、盤回転・合意ドローを押せない見た目にする(common.cssの.menu-btn:disabledと同じ) */
.menu-btn.tutorial-disabled {
    background-color: var(--color-gray);
    cursor: not-allowed;
    opacity: 0.6;
}
