/* ログインページ専用: 左面の「メール → 注文カード → 科目 → カード一致」アニメーション（8秒で繰り返し）と背景の光 */
.login-hero__brand, .login-hero__body, .login-hero__foot { position: relative; z-index: 1; }
.login-hero__orb { position: absolute; border-radius: 50%; filter: blur(40px); opacity: .45; animation: orb 18s ease-in-out infinite alternate; }
.login-hero__orb.o1 { width: 320px; height: 320px; background: #6d8cff; top: -80px; right: -60px; }
.login-hero__orb.o2 { width: 260px; height: 260px; background: #3fd0c9; bottom: -90px; left: -60px; animation-duration: 22s; opacity: .3; }
.login-hero__orb.o3 { width: 180px; height: 180px; background: #b58cff; top: 45%; left: 55%; animation-duration: 26s; opacity: .25; }
@keyframes orb { to { transform: translate(-60px, 50px) scale(1.15); } }
.login-hero__body h1 { font-size: 38px; margin-bottom: 36px; }

.flow { --t: 8s; display: flex; align-items: center; margin-bottom: 30px; }
.flow__mail, .flow__order { background: #fff; color: #1b2130; border-radius: 14px; box-shadow: 0 18px 40px rgba(8, 20, 60, .35); }
.flow__mail { width: 170px; padding: 14px; animation: mail-in var(--t) ease-in-out infinite; }
.flow__mail-head { display: flex; align-items: center; gap: 6px; font-size: 13px; color: #2f5bd3; margin-bottom: 10px; }
.flow__mail i { display: block; height: 7px; border-radius: 4px; background: #e6e9f0; margin-top: 7px; }
.flow__mail i.short { width: 60%; }
.flow__track { position: relative; width: 90px; height: 2px; margin: 0 6px;
               background: repeating-linear-gradient(90deg, rgba(255, 255, 255, .55) 0 6px, transparent 6px 12px); }
.flow__dot { position: absolute; top: -3px; left: 0; width: 8px; height: 8px; border-radius: 50%; background: #fff; box-shadow: 0 0 12px #fff;
             animation: dot var(--t) linear infinite; }
.flow__flyer { position: absolute; top: -13px; left: -8px; width: 28px; height: 28px; border-radius: 8px; background: #fff; color: #2f5bd3;
               display: grid; place-items: center; opacity: 0; animation: flyer var(--t) ease-in-out infinite; }
.flow__order { width: 210px; padding: 16px; position: relative; min-height: 164px; animation: order-in var(--t) ease-in-out infinite; }
.flow__row { opacity: 0; transform: translateY(6px); margin-bottom: 8px; font-size: 13px; }
.flow__r1 { display: flex; align-items: center; gap: 8px; animation: row1 var(--t) ease-out infinite; }
.flow__r2 { color: #4a5263; animation: row2 var(--t) ease-out infinite; }
.flow__r3 { animation: row3 var(--t) ease-out infinite; }
.flow__r4 { animation: row4 var(--t) cubic-bezier(.3, 1.6, .5, 1) infinite; }
.flow__avatar { width: 24px; height: 24px; border-radius: 6px; background: #f0f1f4; display: grid; place-items: center; font-weight: bold; font-size: 12px; }
.flow__amount { font-size: 22px; font-weight: bold; font-variant-numeric: tabular-nums; }
.flow__chip { display: inline-flex; align-items: center; gap: 4px; background: #2f5bd3; color: #fff; border-radius: 999px; padding: 3px 10px; font-size: 12px; }
.flow__ok { position: absolute; right: -14px; top: -14px; display: inline-flex; align-items: center; gap: 4px; background: #0ca30c; color: #fff;
            border-radius: 999px; padding: 5px 11px; font-size: 12px; font-weight: bold; box-shadow: 0 8px 20px rgba(12, 163, 12, .45);
            opacity: 0; transform: scale(.4); animation: ok var(--t) cubic-bezier(.3, 1.8, .5, 1) infinite; }
.flow__steps { list-style: none; display: flex; gap: 8px; padding: 0; margin: 0; counter-reset: step; font-size: 13px;
               color: rgba(255, 255, 255, .9); flex-wrap: wrap; }
.flow__steps li { counter-increment: step; display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px 5px 6px; border-radius: 999px;
                  background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .18); animation: step1 var(--t) ease-in-out infinite; }
.flow__steps li::before { content: counter(step); width: 20px; height: 20px; border-radius: 50%; background: rgba(255, 255, 255, .22);
                          display: grid; place-items: center; font-size: 11px; font-weight: bold; }
.flow__steps li:nth-child(2) { animation-name: step2; }
.flow__steps li:nth-child(3) { animation-name: step3; }

/* タイムライン: 0-12% メール到着 / 12-30% 飛ぶ / 30-50% 書き込み / 55% 科目 / 65% 一致 / 88-100% 消えて次へ */
@keyframes mail-in { 0% { opacity: 0; transform: translateX(-30px) rotate(-4deg); } 10%, 88% { opacity: 1; transform: none; }
                     14% { transform: scale(.96); } 100% { opacity: 0; transform: translateY(8px); } }
@keyframes flyer { 0%, 12% { opacity: 0; left: -8px; } 15% { opacity: 1; left: -8px; transform: scale(1); }
                   28% { opacity: 1; left: calc(100% - 20px); transform: scale(.7); } 31%, 100% { opacity: 0; left: calc(100% - 20px); } }
@keyframes dot { 0%, 14% { left: 0; opacity: 0; } 16% { opacity: 1; } 28% { left: calc(100% - 8px); opacity: 1; }
                 30%, 100% { opacity: 0; left: calc(100% - 8px); } }
@keyframes order-in { 0%, 26% { transform: scale(.97); }
                      30% { transform: scale(1.03); box-shadow: 0 0 0 4px rgba(255, 255, 255, .5), 0 18px 40px rgba(8, 20, 60, .35); }
                      34%, 88% { transform: none; opacity: 1; } 100% { transform: translateY(8px); opacity: 0; } }
@keyframes row1 { 0%, 31% { opacity: 0; transform: translateY(6px); } 35%, 88% { opacity: 1; transform: none; } 100% { opacity: 0; } }
@keyframes row2 { 0%, 36% { opacity: 0; transform: translateY(6px); } 40%, 88% { opacity: 1; transform: none; } 100% { opacity: 0; } }
@keyframes row3 { 0%, 41% { opacity: 0; transform: translateY(6px); } 45%, 88% { opacity: 1; transform: none; } 100% { opacity: 0; } }
@keyframes row4 { 0%, 50% { opacity: 0; transform: scale(.5); } 55%, 88% { opacity: 1; transform: none; } 100% { opacity: 0; } }
@keyframes ok { 0%, 60% { opacity: 0; transform: scale(.4); } 65%, 88% { opacity: 1; transform: none; } 100% { opacity: 0; } }
@keyframes step1 { 0%, 28% { background: rgba(255, 255, 255, .3); } 32%, 100% { background: rgba(255, 255, 255, .1); } }
@keyframes step2 { 0%, 30% { background: rgba(255, 255, 255, .1); } 34%, 55% { background: rgba(255, 255, 255, .3); } 60%, 100% { background: rgba(255, 255, 255, .1); } }
@keyframes step3 { 0%, 58% { background: rgba(255, 255, 255, .1); } 63%, 90% { background: rgba(12, 163, 12, .6); } 100% { background: rgba(255, 255, 255, .1); } }

/* 動きを減らす設定の人には完成形を静止表示 */
@media (prefers-reduced-motion: reduce) {
  .login-hero__orb, .flow__mail, .flow__order, .flow__row, .flow__ok, .flow__dot, .flow__flyer, .flow__steps li { animation: none !important; }
  .flow__row, .flow__ok { opacity: 1; transform: none; }
  .flow__flyer { display: none; }
}
@media (max-width: 860px) {
  .login-hero__body h1 { font-size: 22px; margin-bottom: 16px; }
  .flow { transform: scale(.72); transform-origin: left top; margin-bottom: -44px; }
  .flow__steps { display: none; }
}
