/* ความคืบหน้าการเลื่อนหน้า: แถบบนสุด · จุดบอกส่วน (ขวา) · ปุ่มกลับขึ้นบนมีวงแหวนความคืบหน้า */
.m-progress { position: fixed; z-index: 95; left: 0; top: 0; width: 100%; height: 4px; pointer-events: none; }
.m-progress i { display: block; width: 100%; height: 100%; transform-origin: 0 50%; transform: scaleX(0); background: linear-gradient(90deg, #b3202a, #ff6b78); box-shadow: 0 0 10px rgba(255, 107, 120, .7); will-change: transform; }

.m-rail { position: fixed; z-index: 80; right: 18px; top: 50%; translate: 0 -50%; display: none; }
@media (min-width: 1360px) { .m-rail { display: block; } }
.m-rail ul { display: grid; gap: 4px; margin: 0; padding: 0; list-style: none; }
.m-rail a { position: relative; display: flex; align-items: center; justify-content: flex-end; width: 28px; height: 22px; text-decoration: none; }
.m-rail a::before { content: ""; width: 10px; height: 10px; border-radius: 99px; background: #fff; border: 1.5px solid rgba(14, 39, 71, .6); box-shadow: 0 0 0 2px rgba(255, 255, 255, .55); transition: height .3s cubic-bezier(.2, .8, .2, 1), background-color .25s, border-color .25s; }
.m-rail a:hover::before, .m-rail a:focus-visible::before { background: #0e2747; }
.m-rail a[aria-current="true"]::before { height: 22px; background: #b3202a; border-color: #fff; }
.m-rail a span { position: absolute; right: 30px; white-space: nowrap; padding: 4px 12px; border-radius: 99px; background: #0e2747; color: #fff; font: 500 .8125rem/1.3 "Inter", "IBM Plex Sans Thai", system-ui, sans-serif; opacity: 0; transform: translateX(8px); pointer-events: none; transition: opacity .2s, transform .2s; }
.m-rail a:hover span, .m-rail a:focus-visible span { opacity: 1; transform: none; }
.m-rail a:focus-visible { outline: 2px solid #b3202a; outline-offset: 2px; border-radius: 6px; }

.m-totop { position: fixed; z-index: 85; right: 20px; bottom: 20px; display: grid; place-items: center; width: 56px; height: 56px; padding: 0; border: 0; border-radius: 50%; background: #fff; color: #0e2747; cursor: pointer; box-shadow: 0 10px 28px rgba(14, 39, 71, .3); opacity: 0; visibility: hidden; transform: translateY(14px) scale(.9); transition: opacity .25s, transform .25s, visibility 0s linear .25s, box-shadow .2s; }
.m-totop.show { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
.m-totop:hover { box-shadow: 0 14px 34px rgba(14, 39, 71, .42); }
.m-totop:focus-visible { outline: 3px solid #b3202a; outline-offset: 3px; }
.m-totop svg { width: 56px; height: 56px; overflow: visible; }
.m-totop .tr { fill: none; stroke: rgba(14, 39, 71, .14); stroke-width: 3; }
.m-totop .pg { fill: none; stroke: #b3202a; stroke-width: 3; stroke-linecap: round; transform: rotate(-90deg); transform-origin: 28px 28px; }
.m-totop .ar { fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
body.lb-open .m-totop, body.lb-open .m-rail { display: none; }
@media (max-width: 640px) { .m-totop { right: 12px; bottom: 12px; width: 48px; height: 48px; } .m-totop svg { width: 48px; height: 48px; } }
@media (prefers-reduced-motion: reduce) { .m-totop, .m-rail a::before, .m-rail a span { transition: none; } }

/* จุดบอกส่วน: มีพื้นขาวโปร่งรองรับ อ่านชัดทับการ์ด/ภาพ */
.m-rail ul { padding: 8px 3px; border-radius: 99px; background: rgba(255, 255, 255, .88); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); box-shadow: 0 4px 14px rgba(14, 39, 71, .18); }
