/* =========================================================
   안아 올리기 실습 오버레이 (js/practice.js)
   대사창(z 40)보다 아래, HUD(z 30)보다 위에 둔다. 상호작용 요소만 pointer-events를 켠다.
   ========================================================= */
.practice { position: fixed; inset: 0; z-index: 38; pointer-events: none; font-family: var(--font-body); }
.practice[hidden] { display: none; }
.practice [hidden] { display: none !important; }
.practice button { pointer-events: auto; touch-action: none; font-family: var(--font-display); }

/* 단계 칩 + 그만두기 */
.pr-top { position: absolute; left: 0; right: 0; top: calc(env(safe-area-inset-top, 0px) + 62px); display: flex; justify-content: center; align-items: center; gap: 10px; flex-wrap: wrap; padding: 0 12px; }
.pr-steps { display: flex; gap: 6px; margin: 0; padding: 0; list-style: none; flex-wrap: wrap; justify-content: center; }
.pr-steps li { padding: 4px 12px; border-radius: 999px; background: rgba(255, 253, 246, 0.82); color: var(--ink-soft); font-family: var(--font-display); font-size: 13px; box-shadow: 0 0 0 2px #fff; }
.pr-steps li.on { background: var(--honey); color: #4a2a08; transform: scale(1.06); }
.pr-steps li.done { background: var(--mint); color: #12482a; }
.pr-exit { min-height: 32px; padding: 2px 12px; border: 0; border-radius: 999px; background: rgba(60, 40, 28, 0.7); color: #fff; cursor: pointer; font-size: 13px; }
.pr-exit:hover, .pr-exit:focus-visible { background: rgba(60, 40, 28, 0.95); outline: 2px solid var(--honey); }

.pr-prompt {
  position: absolute; left: 50%; top: calc(env(safe-area-inset-top, 0px) + 104px); translate: -50% 0; width: min(640px, calc(100% - 24px));
  padding: 10px 18px; border-radius: 18px; text-align: center; background: rgba(255, 253, 246, 0.96); color: var(--ink);
  box-shadow: 0 0 0 3px #fff, 0 0 0 6px #6b4b33, 0 12px 26px rgba(0, 0, 0, 0.25); font-size: clamp(14px, 2.4vw, 17px); line-height: 1.45;
}
.pr-prompt b { color: var(--rose-deep); }
.pr-prompt small { display: block; margin-top: 2px; color: var(--ink-soft); font-size: 12px; }

/* 3D 지지점에 붙는 타깃 원 */
.pr-target { position: absolute; width: 78px; height: 78px; translate: -50% -50%; border-radius: 50%; display: grid; place-items: center; border: 4px dashed #42d6c8; background: rgba(66, 214, 200, 0.18); animation: prPulse 1.2s ease-in-out infinite; }
.pr-target[data-t="hip"] { border-color: #ff8fb1; background: rgba(255, 143, 177, 0.18); }
.pr-target span { position: absolute; top: 100%; margin-top: 4px; padding: 1px 10px; border-radius: 999px; background: rgba(30, 24, 20, 0.75); color: #fff; font-family: var(--font-display); font-size: 13px; white-space: nowrap; }
.pr-target.ok { border-style: solid; background: rgba(63, 191, 98, 0.35); border-color: #3fbf62; animation: none; }
.pr-target.ok::after { content: '✔'; color: #fff; font-size: 30px; text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5); }
@keyframes prPulse { 50% { scale: 1.14; } }

/* 손 아이콘 트레이 */
.pr-hands { position: absolute; left: 50%; bottom: calc(var(--dlg-h, 150px) + 40px); translate: -50% 0; display: flex; align-items: center; gap: 12px; padding: 8px 16px; border-radius: 999px; background: rgba(255, 253, 246, 0.92); box-shadow: 0 0 0 3px #fff, 0 8px 20px rgba(0, 0, 0, 0.25); }
.pr-hands span { font-size: 13px; color: var(--ink-soft); }
.pr-hand { width: 64px; height: 64px; border: 0; border-radius: 50%; background: var(--butter); font-size: 34px; cursor: grab; box-shadow: 0 4px 0 var(--honey-deep); transition: transform 0.25s cubic-bezier(0.3, 1.4, 0.5, 1); }
.pr-hand.drag { cursor: grabbing; transition: none; z-index: 5; box-shadow: 0 10px 18px rgba(0, 0, 0, 0.35); scale: 1.12; }

/* 자세 낮추기 게이지 (세로) */
.pr-gauge { position: absolute; right: max(14px, 4%); top: 50%; translate: 0 -46%; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.pr-bar { position: relative; width: 38px; height: min(46vh, 280px); border-radius: 19px; background: rgba(255, 253, 246, 0.92); box-shadow: 0 0 0 3px #fff, 0 8px 20px rgba(0, 0, 0, 0.25); overflow: hidden; }
.pr-band { position: absolute; left: 0; right: 0; bottom: 62%; height: 28%; background: rgba(63, 191, 98, 0.32); border-block: 2px solid #3fbf62; }
.pr-fill { position: absolute; left: 4px; right: 4px; bottom: 4px; height: 0; max-height: calc(100% - 8px); border-radius: 15px; background: var(--sky); transition: background 0.15s; }
.pr-fill.ok { background: #3fbf62; }
.pr-gl { max-width: 150px; padding: 3px 10px; border-radius: 12px; background: rgba(30, 24, 20, 0.78); color: #fff; font-size: 12px; text-align: center; }

/* 들어올리기 진행 막대 */
.pr-lift { position: absolute; left: 50%; bottom: calc(var(--dlg-h, 150px) + 96px); translate: -50% 0; width: min(360px, 70%); }
.pr-lbar { height: 16px; border-radius: 8px; background: rgba(255, 253, 246, 0.9); box-shadow: 0 0 0 3px #fff, 0 6px 14px rgba(0, 0, 0, 0.25); overflow: hidden; }
.pr-lbar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--honey), var(--rose)); }

/* 조작 버튼 (터치·마우스) */
.pr-btns { position: absolute; left: 50%; bottom: calc(var(--dlg-h, 150px) - 6px); translate: -50% 0; display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; padding: 0 12px; }
.pr-b { min-height: 48px; padding: 6px 18px; border: 0; border-radius: 999px; background: var(--honey); color: #4a2a08; font-size: 16px; cursor: pointer; box-shadow: 0 4px 0 var(--honey-deep); user-select: none; -webkit-user-select: none; }
.pr-b:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--honey-deep); }
.pr-b kbd { margin-left: 4px; padding: 0 6px; border-radius: 6px; background: rgba(255, 255, 255, 0.55); font-size: 12px; }
.pr-swipe { position: absolute; inset: 0; pointer-events: auto; touch-action: none; cursor: n-resize; }

/* 코칭 팝업 */
.pr-coach { position: absolute; left: max(12px, env(safe-area-inset-left, 0px)); top: 34%; width: min(330px, 42vw); padding: 10px 16px; border-radius: 16px; background: rgba(120, 28, 24, 0.94); color: #fff; box-shadow: 0 0 0 3px #ffc94a, 0 12px 26px rgba(0, 0, 0, 0.4); display: flex; flex-direction: column; gap: 2px; font-size: clamp(13px, 2.3vw, 16px); line-height: 1.45; }
.pr-coach b { color: #ffc94a; font-family: var(--font-display); font-weight: normal; }
.pr-coach.pop { animation: prCoach 0.4s cubic-bezier(0.3, 1.4, 0.5, 1); }
@keyframes prCoach { from { opacity: 0; transform: translateY(-12px) scale(0.94); } to { opacity: 1; transform: none; } }

/* 평가 카드 */
.pr-result { position: absolute; inset: 0; display: grid; place-items: center; padding: 16px; pointer-events: auto; background: rgba(40, 24, 12, 0.35); animation: fadeIn 0.3s; z-index: 6; }
.pr-card { width: min(460px, 100%); padding: 20px 22px; border-radius: 26px; text-align: center; background: var(--paper); box-shadow: 0 0 0 4px #fff, 0 0 0 9px var(--honey-deep), 0 22px 46px rgba(0, 0, 0, 0.4); animation: popIn 0.4s cubic-bezier(0.3, 1.4, 0.5, 1); }
.pr-stars { font-size: 38px; letter-spacing: 4px; }
.pr-card h3 { margin: 6px 0 4px; font-family: var(--font-display); font-weight: normal; font-size: 24px; color: var(--honey-deep); }
.pr-card ul { margin: 6px 0; padding: 0; list-style: none; color: var(--ink-soft); font-size: 14px; }
.pr-card li::before { content: '▸ '; color: var(--rose-deep); }
.pr-actions { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
.pr-actions .btn { pointer-events: auto; }

@media (max-width: 640px) {
  .pr-top { top: calc(env(safe-area-inset-top, 0px) + 96px); }
  .pr-prompt { top: calc(env(safe-area-inset-top, 0px) + 138px); font-size: 13px; }
  .pr-coach { top: 40%; width: min(300px, 56vw); font-size: 12.5px; }
  .pr-gauge { right: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  .pr-target { animation: none; }
}
