/* =====================================================
操作ガイド
===================================================== */


/* 画面全体をフワッと暗くする */
.operation-guide-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.62);
    opacity: 0;
    animation: operation-guide-overlay-fade-in 0.4s ease forwards;
    z-index: 15000;
}

@keyframes operation-guide-overlay-fade-in {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* 操作対象を前面へ出す */
.operation-guide-target {
    position: relative !important;
    z-index: 15001 !important;
    box-shadow:
        0 0 0 4px #ffffff,
        0 0 0 7px rgba(255, 255, 255, 0.45);
}


/* 吹き出し */
.operation-guide-bubble {
    position: fixed;
    left: 50%;
    width: calc(100% - 40px);
    max-width: 340px;
    padding: 16px 18px;
    border-radius: 12px;
    background: #ffffff;
    color: #222222;
    font-size: 17px;
    font-weight: 700;
    line-height: 1.6;
    text-align: left;
    box-sizing: border-box;
    box-shadow: 0 5px 18px rgba(0, 0, 0, 0.3);
    opacity: 0;
    transform: translateX(-50%);
    animation: operation-guide-bubble-fade-in 0.35s ease 0.1s forwards;
    cursor: pointer;
    z-index: 15002;
}

@keyframes operation-guide-bubble-fade-in {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}


/* 対象の下に表示 */
.operation-guide-bubble.operation-guide-below::before {
    content: "";
    position: absolute;
    top: -12px;
    left: 50%;
    width: 0;
    height: 0;
    border-right: 12px solid transparent;
    border-bottom: 12px solid #ffffff;
    border-left: 12px solid transparent;
    transform: translateX(-50%);
}


/* 対象の上に表示 */
.operation-guide-bubble.operation-guide-above::after {
    content: "";
    position: absolute;
    bottom: -12px;
    left: 50%;
    width: 0;
    height: 0;
    border-top: 12px solid #ffffff;
    border-right: 12px solid transparent;
    border-left: 12px solid transparent;
    transform: translateX(-50%);
}


/* ユーザー登録へ */
.operation-guide-bubble-tap {
    display: block;
    margin-top: 12px;
    font-size: 15px;
    font-weight: 700;
    text-align: right;
    color: var(--rally-theme-color);
}


/* 今は登録しない */
.operation-guide-bubble-skip {
    display: block;
    margin-top: 10px;
    padding-top: 9px;
    border-top: 1px solid #dddddd;
    font-size: 13px;
    font-weight: 500;
    text-align: right;
    color: #666666;
}


/* =====================================================
操作ガイド｜背景を暗くしない通常案内
===================================================== */

.operation-guide-inline-bubble {
    position: relative;
    width: calc(100% - 40px);
    max-width: 340px;
    margin: 0 auto 24px;
    padding: 14px 16px;
    border: 2px solid var(--rally-theme-color);
    border-radius: 12px;
    background: #ffffff;
    color: #222222;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.6;
    text-align: left;
    box-sizing: border-box;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.12);
    opacity: 0;
    animation: operation-guide-bubble-fade-in 0.35s ease forwards;
}

.operation-guide-inline-bubble::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: -11px;
    width: 18px;
    height: 18px;
    background: #ffffff;
    border-right: 2px solid var(--rally-theme-color);
    border-bottom: 2px solid var(--rally-theme-color);
    transform: translateX(-50%) rotate(45deg);
}


/* =====================================================
操作ガイド｜閉じるボタン
===================================================== */

.operation-guide-close-button {
    position: fixed;
    top: 15px;
    right: 15px;
    width: 44px;
    height: 44px;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    border: none;
    border-radius: 50%;
    background: #ffffff;
    color: #222222;
    font-size: 24px;
    line-height: 1;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.22);
    cursor: pointer;
    z-index: 15003;
    -webkit-tap-highlight-color: transparent;
}

.operation-guide-close-button:active {
    transform: scale(0.94);
}

@media (display-mode: standalone) {

    .operation-guide-close-button {
        top: calc(env(safe-area-inset-top) + 15px);
    }
}


/* =====================================================
操作ガイド｜親要素に重なり順がある場合
===================================================== */

.operation-guide-parent-active {
    z-index: 15001 !important;
}