/* 手機螢幕示意（主頁第 03 步）：.phone-screen 以 matrix3d 貼合插圖手機螢幕，與第 02 步平板同步 */
.phone-ui { position: absolute; inset: 0; pointer-events: none; transition: transform .8s var(--ease); }
.phone-screen {
    position: absolute; left: 0; top: 0; width: 300px; height: 588px; transform-origin: 0 0; visibility: hidden;
    overflow: hidden; border-radius: 22px; background: #fff8f2; line-height: 1.3;
}
.phone-screen.ready { visibility: visible; }
.ps-notch { position: absolute; left: 25%; width: 50%; top: 0; height: 26px; border-radius: 0 0 14px 14px; background: #4b4f4d; }
.ps-page {
    position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center;
    opacity: 0; visibility: hidden; transition: opacity .3s, visibility .3s;
}
.phone-screen[data-state="scan"] .ps-cam,
.phone-screen[data-state="confirm"] .ps-confirm,
.phone-screen[data-state="waiting"] .ps-waiting,
.phone-screen[data-state="success"] .ps-success { opacity: 1; visibility: visible; }
.ps-page p { margin: 0; }

/* 掃描結帳碼（LINE 相機） */
.ps-cam { justify-content: center; gap: 34px; background: linear-gradient(170deg, #4d5c55, #2c3833); }
.ps-frame { position: relative; width: 190px; height: 190px; }
.ps-frame i { position: absolute; width: 46px; height: 46px; border: 0 solid #fff; }
.ps-frame i:nth-child(1) { left: 0; top: 0; border-width: 8px 0 0 8px; border-radius: 12px 0 0 0; }
.ps-frame i:nth-child(2) { right: 0; top: 0; border-width: 8px 8px 0 0; border-radius: 0 12px 0 0; }
.ps-frame i:nth-child(3) { left: 0; bottom: 0; border-width: 0 0 8px 8px; border-radius: 0 0 0 12px; }
.ps-frame i:nth-child(4) { right: 0; bottom: 0; border-width: 0 8px 8px 0; border-radius: 0 0 12px 0; }
.ps-frame b { position: absolute; left: 10px; right: 10px; top: 12px; height: 8px; border-radius: 4px; background: #7fd3a0; box-shadow: 0 0 18px 6px rgba(127, 211, 160, .45); animation: ps-scan 2.2s ease-in-out infinite alternate; }
.phone-screen.scanning .ps-frame b { animation-duration: .45s; }
@keyframes ps-scan { to { top: 170px; } }
.ps-cam p { font-size: 28px; font-weight: 900; color: #fff; letter-spacing: .06em; }

/* 確認打卡 */
.ps-head {
    width: 100%; padding: 38px 16px 16px; text-align: center; color: #fff;
    background: linear-gradient(135deg, #dc6c45, #ec8a62); display: grid; justify-items: center; gap: 4px;
}
.ps-ico { font-size: 38px; line-height: 1; }
.ps-head b { font-size: 34px; font-weight: 900; }
.ps-head small { font-size: 16px; opacity: .9; }
.ps-card { margin: 16px 18px 0; width: calc(100% - 36px); padding: 12px; border-radius: 16px; background: #fff; text-align: center; box-shadow: 0 3px 12px rgba(0, 0, 0, .08); display: grid; }
.ps-card small { font-size: 17px; color: #777; }
.ps-card b { font-size: 48px; font-weight: 900; line-height: 1.15; color: #dc6c45; }
.phone-screen.coupon .ps-card { padding: 8px; }
.phone-screen.coupon .ps-card b { font-size: 38px; }
.ps-coupon { display: none; margin: 12px 18px 0; width: calc(100% - 36px); padding: 12px 14px; border-radius: 16px; background: #fff; box-shadow: 0 3px 12px rgba(0, 0, 0, .08); }
.phone-screen.coupon .ps-coupon { display: grid; gap: 6px; }
.ps-coupon p { font-size: 19px; font-weight: 900; color: #2d1a12; }
.ps-opt { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 10px; font-size: 24px; font-weight: 700; color: #3f4a42; transition: background .3s; }
.ps-opt i { width: 24px; height: 24px; flex: none; border-radius: 50%; border: 3px solid #b9b1a8; position: relative; transition: border-color .3s; }
.ps-opt i::after { content: ''; position: absolute; inset: 3px; border-radius: 50%; background: #dc6c45; transform: scale(0); transition: transform .3s var(--ease); }
.phone-screen:not(.picked) .ps-opt--none i { border-color: #dc6c45; }
.phone-screen:not(.picked) .ps-opt--none i::after,
.phone-screen.picked .ps-opt--item i::after { transform: scale(1); }
.phone-screen.picked .ps-opt--item { background: #fdebe2; color: #c4593a; }
.phone-screen.picked .ps-opt--item i { border-color: #dc6c45; }
.ps-btn {
    position: absolute; left: 50%; bottom: 26px; translate: -50% 0; white-space: nowrap;
    padding: 16px 34px; border-radius: 18px; background: linear-gradient(135deg, #dc6c45, #ec8a62);
    color: #fff; font-size: 28px; font-weight: 900; box-shadow: 0 6px 16px rgba(220, 108, 69, .4); transition: transform .2s;
}
.phone-screen.press .ps-btn { transform: scale(.9); }

/* 打卡確認中 */
.ps-waiting { justify-content: center; gap: 22px; }
.ps-spin { width: 76px; height: 76px; border-radius: 50%; border: 9px solid #dc6c45; border-top-color: transparent; animation: ts-spin .8s linear infinite; }
.ps-waiting p { font-size: 24px; color: #888; }

/* 打卡成功 */
.ps-success { justify-content: center; gap: 12px; padding: 30px 18px 0; }
.ps-party { font-size: 70px; line-height: 1; animation: ts-pop .5s var(--ease); }
.ps-title { font-size: 38px; font-weight: 900; color: #dc6c45; }
.ps-points { display: grid; justify-items: center; padding: 10px 46px; border-radius: 16px; background: #fff; box-shadow: 0 3px 12px rgba(0, 0, 0, .08); }
.ps-points small { font-size: 17px; color: #888; }
.ps-points b { font-size: 64px; font-weight: 900; line-height: 1.1; color: #dc6c45; }
.ps-used { display: none; padding: 12px 14px; border-radius: 12px; background: #e8f5e9; color: #2e7d32; font-size: 21px; font-weight: 700; line-height: 1.45; text-align: center; }
.phone-screen.coupon .ps-used { display: block; }
