/* 啟動動畫：照 React src/prototypes/app/app.css 開頭搬過來（設計交付：同梁巳亥_啟動動畫_工程交付，快版 3.0 秒） */
.ap-splash {
  position: fixed; inset: 0; z-index: 1000;
  display: flex; flex-direction: column; background: #fff; color: #0a0a0a;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang TC", "Noto Sans TC", system-ui, sans-serif;
  transition: opacity 300ms cubic-bezier(.4, 0, .2, 1);
}
.ap-splash.out { opacity: 0; pointer-events: none; }
.ap-splash-center { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px; }
.ap-seal { position: relative; height: min(528px, 62dvh); aspect-ratio: 150 / 528; }
.ap-seal > svg { display: block; width: 100%; height: 100%; overflow: visible; }
/* 標誌中心對準「巳」：巳在 352 格高的第 179–254.5 格 */
.ap-mark-pos { position: absolute; left: 50%; top: 61.58%; width: 88%; aspect-ratio: 1; transform: translate(-50%, -50%); }
.ap-mark-pos svg { display: block; width: 100%; height: 100%; overflow: visible; }
.ap-cap { font-size: 22px; letter-spacing: 0.6em; margin-right: -0.6em; color: #6b6b70; }
.ap-tagline {
  display: flex; align-items: center; justify-content: center; height: 44px; margin: 0 0 48px;
  font-size: 15px; letter-spacing: 0.2em; margin-right: -0.2em; color: #6b6b70;
}

.ap-splash :is(.ap-full, .ap-up, .ap-lo, .ap-plug, .ap-mark, .ap-c0, .ap-c1, .ap-c2, .ap-c3) { transform-box: fill-box; transform-origin: center; }
.ap-splash :is(.ap-full, .ap-cut, .ap-up, .ap-lo, .ap-plug, .ap-mark, .ap-c0, .ap-c1, .ap-c2, .ap-c3, .ap-tile, .ap-cap, .ap-tagline) {
  animation-duration: 3000ms; animation-fill-mode: both; animation-timing-function: cubic-bezier(.4, 0, .2, 1);
}
/* 短版：段落 1–4 壓到約 1 秒，灰底和釋文跟著出來，不顯示標語 */
.ap-splash-short :is(.ap-full, .ap-cut, .ap-up, .ap-lo, .ap-plug, .ap-mark, .ap-c0, .ap-c1, .ap-c2, .ap-c3, .ap-tile, .ap-cap) { animation-duration: 1650ms; }
.ap-splash-short .ap-tagline { visibility: hidden; animation: none; }
.ap-splash-still * { animation: none !important; }
.ap-splash-still .ap-mark-pos { display: none; }

.ap-full { animation-name: ap-full; }
.ap-cut { animation-name: ap-cut; }
.ap-up { animation-name: ap-up; }
.ap-lo { animation-name: ap-lo; }
.ap-plug { animation-name: ap-plug; }
.ap-mark { animation-name: ap-mark; }
.ap-c0 { animation-name: ap-c0; }
.ap-c1 { animation-name: ap-c1; }
.ap-c2 { animation-name: ap-c2; }
.ap-c3 { animation-name: ap-c3; }
.ap-tile { animation-name: ap-tile; }
.ap-cap { animation-name: ap-cap; }
.ap-tagline { animation-name: ap-tagline; }
@keyframes ap-full { 0% { opacity: 0; transform: scale(.9); } 13.33% { opacity: 1; transform: scale(1); } 21.6% { opacity: 1; } 21.67%, 100% { opacity: 0; } }
@keyframes ap-cut { 0%, 13.33% { stroke-dashoffset: 1; opacity: 1; } 21.67% { stroke-dashoffset: 0; opacity: 1; } 30%, 100% { stroke-dashoffset: 0; opacity: 0; } }
@keyframes ap-up { 0%, 21.6% { opacity: 0; transform: translate(-3.5px, 3.5px); } 21.67% { opacity: 1; transform: translate(-3.5px, 3.5px); } 30%, 100% { opacity: 1; transform: translate(0, 0); } }
@keyframes ap-lo { 0%, 21.6% { opacity: 0; transform: translate(3.5px, -3.5px); } 21.67% { opacity: 1; transform: translate(3.5px, -3.5px); } 30%, 100% { opacity: 1; transform: translate(0, 0); } }
@keyframes ap-plug { 0%, 21.6% { opacity: 0; } 21.67% { opacity: 1; transform: scale(1); } 30%, 100% { opacity: 1; transform: scale(0); } }
@keyframes ap-mark { 0%, 30% { opacity: 1; transform: scale(1); } 38.7% { opacity: .55; transform: scale(.82); } 43.33%, 100% { opacity: 0; transform: scale(.78); } }
@keyframes ap-c2 { 0%, 31.67% { opacity: 0; } 43.33%, 100% { opacity: 1; } }
@keyframes ap-c1 { 0%, 40% { opacity: 0; transform: translateY(-8px); } 50%, 100% { opacity: 1; transform: translateY(0); } }
@keyframes ap-c3 { 0%, 45% { opacity: 0; transform: translateY(8px); } 55%, 100% { opacity: 1; transform: translateY(0); } }
@keyframes ap-c0 { 0%, 50% { opacity: 0; transform: translateY(-8px); } 60%, 100% { opacity: 1; transform: translateY(0); } }
@keyframes ap-tile { 0%, 60% { opacity: 0; } 70.67%, 100% { opacity: 1; } }
@keyframes ap-cap { 0%, 61.33% { opacity: 0; } 72%, 100% { opacity: 1; } }
@keyframes ap-tagline { 0%, 62.67% { opacity: 0; transform: translateY(8px); } 73.33%, 100% { opacity: 1; transform: translateY(0); } }

/* 登出、刪除帳號清理中（React app.css .ap-leaving） */
.ap-leaving { position: fixed; inset: 0; z-index: 900; display: flex; align-items: center; justify-content: center; background: rgba(242, 242, 247, 0.92); color: #1c1c1e; font-size: 17px; }
