/* 章の端の斜めの帯（見本 deco-b.html から採用 2026-11-29）。js/deco.js が各章に .deco を差し込み、画面に入ると右上→左下へ流れ込む */
/* ② まっすぐな斜めの角丸帯（meo-dash と同じ考え方） */
.deco { position: absolute; z-index: -1; pointer-events: none; display: block; height: 34px; border-radius: 999px; transform: rotate(-45deg); }
.deco::before, .deco::after { content: ""; position: absolute; height: 100%; border-radius: inherit; }
.deco--r { right: -160px; top: 120px; width: 460px; background: linear-gradient(90deg, #1565d8, #2b8ef0); }
.deco--r::before { left: 110px; top: 58px; width: 340px; background: #29b6e3; }
.deco--r::after { left: 30px; top: -58px; width: 240px; background: #8fdcf2; }
.deco--l { left: -170px; top: 140px; width: 440px; background: linear-gradient(90deg, #0f2a6b, #1565d8); }
.deco--l::before { left: 70px; top: 58px; width: 320px; background: #2b8ef0; }
.deco--l::after { left: 150px; top: -58px; width: 200px; background: #8fdcf2; }
.hero .deco--r { z-index: 1; top: auto; bottom: 160px; }
.deco--n1 { top: 42%; } .deco--n2 { top: auto; bottom: 120px; }
@media (max-width: 767px) { .deco { height: 20px; } .deco--r, .deco--l { width: 240px; } .deco--r { right: -150px; } .deco--l { left: -150px; } .deco::before, .deco::after { top: 34px !important; width: 160px !important; } .hero .deco--r { display: none; } }
/* 置き方（共通）：右＝章の上の見出しの右側（空いている所）、左＝章の下の余白 */
.deco--r { top: 34px !important; bottom: auto !important; }
.deco--l { top: auto !important; bottom: 8px !important; }
.deco--r { top: 150px !important; right: -120px; }
.deco--l { bottom: 70px !important; }
@media (max-width: 767px) { .deco--r { top: 70px !important; right: -170px; } }

/* ===== 流れ込む動き：章に入ると、帯が右上から左下へ流れて止まる =====
   帯は -45度に回しているので、帯の向きの「+X」が右上。そこから 0 へ戻すと左下へ流れて見える */
.deco { opacity: 0; transform: rotate(-45deg) translateX(520px); transition: transform 1.1s cubic-bezier(.16, .84, .3, 1), opacity .5s ease; }
.deco::before, .deco::after { transform: translateX(380px); opacity: 0; transition: transform 1.2s cubic-bezier(.16, .84, .3, 1) .18s, opacity .5s ease .18s; }
.deco::after { transition-delay: .34s; }
.deco.is-in { opacity: 1; transform: rotate(-45deg) translateX(0); }
.deco.is-in::before, .deco.is-in::after { opacity: 1; transform: translateX(0); }
@media (prefers-reduced-motion: reduce) { .deco, .deco::before, .deco::after { opacity: 1 !important; transform: rotate(-45deg) !important; transition: none !important; } .deco::before, .deco::after { transform: none !important; } }
/* ゆっくり流れ込む（約1.6秒、なめらかに減速） */
.deco { transform: rotate(-45deg) translateX(760px); transition: transform 1.6s cubic-bezier(.25, .7, .3, 1), opacity .7s ease; }
.deco::before, .deco::after { transform: translateX(520px); transition: transform 1.7s cubic-bezier(.25, .7, .3, 1) .22s, opacity .7s ease .22s; }
.deco::after { transition-delay: .42s; }
