@charset "utf-8";
/* =============================================================
   stage3-fix.css  (画面右下の固定ボタン: お問い合わせ / ページTOPへ)
   template.dwt の head で import.css の次に直接読み込みます。
   元に戻すときは、template.dwt の該当 <link> と固定ボタンの <nav> を削除。
   ============================================================= */

/* ページ先頭へ戻る動作をなめらかに(視覚効果を減らす設定では無効) */
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
}

.fixed-nav {
    position: fixed;
    right: 10px;
    bottom: 12px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 6px;
    width: 116px;
    margin: 0;
    padding: 0;
}
.fixed-nav a:link,
.fixed-nav a:visited,
.fixed-nav a:active,
.fixed-nav a:hover {
    display: block;
    box-sizing: border-box;
    padding: 7px 8px;
    border-radius: 999px;
    font-size: 13px;
    white-space: nowrap;
    line-height: 1.3;
    font-weight: bold;
    text-align: center;
    text-decoration: none;
    box-shadow: 0 2px 6px rgba(0, 0, 0, .3);
    opacity: 1;
}

/* お問い合わせ: 白文字 × 濃いピンク (5.1:1) */
.fixed-nav a.fn-contact:link,
.fixed-nav a.fn-contact:visited,
.fixed-nav a.fn-contact:active {
    background-color: #D9005F;
    color: #fff;
    border: 2px solid #D9005F;
}
.fixed-nav a.fn-contact:hover,
.fixed-nav a.fn-contact:focus-visible {
    background-color: #A8004A;
    border-color: #A8004A;
    color: #fff;
}

/* ページTOPへ: 白地 × 濃い青 (控えめな見た目) */
.fixed-nav a.fn-top:link,
.fixed-nav a.fn-top:visited,
.fixed-nav a.fn-top:active {
    background-color: #fff;
    color: #1a2a8f;
    border: 2px solid #1a2a8f;
}
.fixed-nav a.fn-top:hover,
.fixed-nav a.fn-top:focus-visible {
    background-color: #1a2a8f;
    color: #fff;
}
.fixed-nav a.fn-top::before {
    content: "\2191\00a0";   /* ↑ */
}

.fixed-nav a:focus-visible {
    outline: 3px solid #1a1aff;
    outline-offset: 2px;
}

/* 対応ブラウザでは、ページ最上部にいる間は「TOPへ」を隠す */
@supports (animation-timeline: scroll()) {
    .fixed-nav a.fn-top {
        animation: fn-top-show linear both;
        animation-timeline: scroll(root);
        animation-range: 0 240px;
    }
    @keyframes fn-top-show {
        from { opacity: 0; visibility: hidden; }
        to   { opacity: 1; visibility: visible; }
    }
}

@media print {
    .fixed-nav { display: none; }
}
