/* Sociomecca Article Navigator v1.0.7 */

.sm-article-nav {
    position: fixed;
    left: 50%;
    bottom: max(16px, env(safe-area-inset-bottom));
    transform: translate(-50%, 18px);
    z-index: 9996;
    width: min(540px, calc(100vw - 32px));
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s ease, transform .2s ease, filter .2s ease;
    font-family: inherit;
}

.sm-article-nav.is-visible {
    opacity: 1;
    transform: translate(-50%, 0);
    pointer-events: auto;
}

.sm-article-nav__button {
    width: 100%;
    border: 1px solid rgba(255,255,255,.18);
    border-radius: 18px;
    padding: 13px 14px 13px 18px;
    background: #102a43;
    box-shadow:
        0 14px 38px rgba(10, 25, 44, .28),
        0 2px 8px rgba(10, 25, 44, .18),
        inset 0 1px 0 rgba(255,255,255,.08);
    color: #fff;
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 14px;
    text-align: left;
    cursor: pointer;
    transition: background .18s ease, box-shadow .18s ease, transform .18s ease;
    -webkit-tap-highlight-color: transparent;
}

.sm-article-nav__button:hover,
.sm-article-nav__button:focus-visible {
    background: #153a60;
    box-shadow:
        0 16px 42px rgba(10, 25, 44, .32),
        0 3px 10px rgba(10, 25, 44, .20),
        inset 0 1px 0 rgba(255,255,255,.10);
}

.sm-article-nav__copy {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.sm-article-nav__eyebrow {
    font-size: 11px;
    line-height: 1.35;
    color: rgba(255,255,255,.72);
    font-weight: 600;
    letter-spacing: .02em;
}

.sm-article-nav__text {
    font-size: 15px;
    line-height: 1.4;
    font-weight: 800;
    letter-spacing: .015em;
    color: #fff;
}

.sm-article-nav__arrow {
    width: 38px;
    height: 38px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    background: rgba(255,255,255,.14);
    border: 1px solid rgba(255,255,255,.16);
    color: #fff;
    font-size: 19px;
    line-height: 1;
    font-weight: 800;
    transition: transform .18s ease, background .18s ease;
}

.sm-article-nav__button:hover .sm-article-nav__arrow,
.sm-article-nav__button:focus-visible .sm-article-nav__arrow {
    transform: translateX(3px);
    background: rgba(255,255,255,.21);
}

/* リード中は存在だけ知らせる。見た目は同じCTAのまま、透明度だけ落とす。 */
.sm-article-nav.is-soft {
    opacity: .46;
    filter: saturate(.82);
}

.sm-article-nav.is-soft:hover,
.sm-article-nav.is-soft:focus-within {
    opacity: .78;
    filter: saturate(.95);
}

/* H2「1.〜」が見えた瞬間から完全表示。 */
.sm-article-nav.is-strong {
    opacity: 1;
    filter: none;
}

/* 攻略読了後も別UI感は維持し、矢印だけ「戻る」方向にする。 */
.sm-article-nav.is-reverse .sm-article-nav__button {
    background: #102a43;
}

.sm-article-nav.is-reverse .sm-article-nav__arrow {
    transform: rotate(-90deg);
}

.sm-article-nav.is-reverse .sm-article-nav__button:hover .sm-article-nav__arrow,
.sm-article-nav.is-reverse .sm-article-nav__button:focus-visible .sm-article-nav__arrow {
    transform: rotate(-90deg) translateX(3px);
}

.sm-article-nav__button:focus-visible {
    outline: 3px solid rgba(47,111,236,.35);
    outline-offset: 3px;
}

@media (max-width: 599px) {
    .sm-article-nav {
        width: calc(100vw - 20px);
        bottom: max(10px, env(safe-area-inset-bottom));
    }

    .sm-article-nav__button {
        border-radius: 16px;
        padding: 12px 12px 12px 15px;
        gap: 11px;
    }

    .sm-article-nav__eyebrow {
        font-size: 10.5px;
    }

    .sm-article-nav__text {
        font-size: 14.5px;
    }

    .sm-article-nav__arrow {
        width: 36px;
        height: 36px;
        font-size: 18px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .sm-article-nav,
    .sm-article-nav__button,
    .sm-article-nav__arrow {
        transition: none !important;
    }
}
