/* ============================================================
   Feature: LINE booking walkthrough (2026-10-08)
   Step tabs + one phone that cross-fades between 4 real
   captures of the demo official LINE. Uses .lpv2 tokens.
   ============================================================ */

.lbk {
    --lbk-step-ms: 3800ms;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

/* ---------- phone ---------- */
.lbk__visual {
    position: relative;
    align-self: center;
}

.lbk__phone {
    width: min(260px, 72vw);
    border-radius: 42px;
    background: #141414;
    padding: 10px;
    box-shadow: 0 32px 64px rgba(28, 28, 26, 0.16);
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.lbk__phone:focus-visible {
    outline: 3px solid var(--v2-pink);
    outline-offset: 4px;
}

.lbk__screen {
    position: relative;
    border-radius: 33px;
    overflow: hidden;
    background: #fff;
    padding: 22px 0 20px;
}

.lbk__screen::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 7px;
    width: 88px;
    height: 4px;
    margin-left: -44px;
    border-radius: 4px;
    background: #111;
}

.lbk__viewport {
    position: relative;
    width: 100%;
    aspect-ratio: 720 / 1427;
    overflow: hidden;
}

.lbk__frame {
    position: absolute;
    inset: 0;
    margin: 0;
    opacity: 0;
    transition: opacity 0.35s ease;
}

.lbk__frame.is-on {
    opacity: 1;
}

.lbk__frame img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top;
}

/* highlight: --x/--y/--w/--h = target box in % of the 720x1427 capture */
.lbk__spot {
    position: absolute;
    left: var(--x);
    top: var(--y);
    width: var(--w);
    height: var(--h);
    border-radius: 12px;
    box-shadow: inset 0 0 0 2.5px var(--v2-pink), 0 0 0 999px rgba(28, 28, 26, 0.38);
    opacity: 0;
    transition: opacity 0.4s ease 0.35s;
    pointer-events: none;
}

.lbk__spot::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    box-shadow: 0 0 0 0 rgba(196, 68, 91, 0.55);
}

.lbk__frame.is-on .lbk__spot {
    opacity: 1;
}

.lbk__frame.is-on .lbk__spot::after {
    animation: lbk-ping 1.8s ease-out 0.8s infinite;
}

@keyframes lbk-ping {
    to {
        box-shadow: 0 0 0 10px rgba(196, 68, 91, 0);
    }
}

.lbk__cap {
    margin: 16px 0 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 22px;
    font-size: 14px;
    font-weight: 700;
    color: var(--v2-ink);
    text-align: center;
    transition: opacity 0.2s ease;
}

.lbk__cap i {
    flex: none;
    width: 10px;
    height: 10px;
    border-radius: 4px;
    box-shadow: inset 0 0 0 2.5px var(--v2-pink);
}

.lbk__cap.is-swap {
    opacity: 0;
}

.lbk__next {
    flex-basis: 100%;
    margin-top: 2px;
    font-size: 12px;
    font-weight: 500;
    color: var(--v2-ink-soft, #8a8580);
}

/* ---------- steps (SP: 4 compact tabs under the phone) ---------- */
.lbk__steps {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
}

.lbk__step {
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 10px 4px;
    font: inherit;
    color: inherit;
    text-align: center;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 16px;
    cursor: pointer;
    transition: background 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.lbk__step[aria-selected="true"] {
    background: #fff;
    border-color: var(--v2-border);
}

.lbk__num {
    width: 30px;
    height: 30px;
    flex: none;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: 13px;
    font-weight: 800;
    background: #f1efeb;
    color: var(--v2-muted);
    transition: background 0.25s ease, color 0.25s ease;
}

.lbk__step[aria-selected="true"] .lbk__num {
    background: var(--v2-pink);
    color: #fff;
}

.lbk__label {
    font-size: 12px;
    font-weight: 700;
    line-height: 1.4;
}

.lbk__label--pc,
.lbk__desc,
.lbk__auto {
    display: none;
}

.lbk__bar {
    position: absolute;
    left: 0;
    bottom: 0;
    height: 3px;
    width: 0;
    background: var(--v2-pink);
}

.lbk.is-playing .lbk__step[aria-selected="true"] .lbk__bar {
    animation: lbk-fill var(--lbk-step-ms) linear forwards;
}

@keyframes lbk-fill {
    to {
        width: 100%;
    }
}

/* ---------- CTA ---------- */
.lbk__cta-wrap {
    text-align: center;
}

.lbk__cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: min(100%, 300px);
    min-height: 52px;
    border-radius: 999px;
    background: var(--v2-line-green);
    color: #fff;
    font-size: 15px;
    font-weight: 800;
    text-decoration: none;
    transition: transform 0.18s ease;
}

@media (hover: hover) and (pointer: fine) {
    .lbk__cta:hover {
        transform: translateY(-1px);
    }
}

.lbk__cta svg {
    width: 20px;
    height: 20px;
    flex: none;
}

.lbk__cta-wrap .lpv2__foot {
    margin-top: 10px;
}

/* ---------- PC: steps left, phone right ---------- */
@media (min-width: 880px) {
    .lbk {
        display: grid;
        grid-template-columns: minmax(0, 1fr) 300px;
        grid-template-rows: 1fr auto auto 1fr;
        grid-template-areas:
            ".     visual"
            "steps visual"
            "cta   visual"
            ".     visual";
        column-gap: 64px;
        row-gap: 0;
        max-width: 860px;
        margin: 0 auto;
    }

    .lbk__visual {
        grid-area: visual;
    }

    .lbk__phone {
        width: 300px;
        border-radius: 46px;
        padding: 11px;
    }

    .lbk__screen {
        border-radius: 36px;
        padding: 24px 0 22px;
    }

    .lbk__steps {
        grid-area: steps;
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .lbk__step {
        display: grid;
        grid-template-columns: 36px 1fr;
        align-items: start;
        gap: 14px;
        padding: 14px 18px;
        text-align: left;
    }

    @media (hover: hover) and (pointer: fine) {
    .lbk__step:hover {
            background: #fff;
        }
}

    .lbk__num {
        width: 36px;
        height: 36px;
        font-size: 14px;
    }

    .lbk__label--sp {
        display: none;
    }

    .lbk__label--pc {
        display: block;
        font-size: 16px;
        line-height: 1.5;
        padding-top: 5px;
    }

    .lbk__auto {
        display: inline-block;
        margin-left: 8px;
        padding: 1px 8px;
        border-radius: 999px;
        background: #e7f8ee;
        color: #067f3a;
        font-size: 11px;
        font-weight: 800;
        vertical-align: 2px;
    }

    .lbk__desc {
        display: block;
        max-height: 0;
        opacity: 0;
        overflow: hidden;
        font-size: 13px;
        font-weight: 500;
        color: var(--v2-muted);
        transition: max-height 0.3s ease, opacity 0.3s ease;
    }

    .lbk__step[aria-selected="true"] .lbk__desc {
        max-height: 60px;
        opacity: 1;
    }

    .lbk__cta-wrap {
        grid-area: cta;
        margin-top: 28px;
        text-align: left;
        padding-left: 18px;
    }

    .lbk__cta-wrap .lpv2__foot {
        text-align: left;
    }
}

@media (prefers-reduced-motion: reduce) {
    .lbk__frame,
    .lbk__cap,
    .lbk__desc {
        transition: none;
    }

    .lbk__frame.is-on .lbk__spot::after {
        animation: none;
    }

    .lbk__bar {
        display: none;
    }
}
