/* 캐릭터 선물 상자(v4.1, gift.js) */
.gift-dlg { width: min(340px, calc(100vw - 32px)); max-height: calc(100dvh - 24px); overflow-y: auto; padding-top: 14px; }
.gift-kicker { margin: 0; font: 0.85rem var(--display); color: var(--peach); letter-spacing: 0.04em; }
.gift-dlg h2 { margin: 2px 0 4px; }
.gift-dlg:focus { outline: none; }
.gift-stage { position: relative; display: flex; align-items: flex-end; justify-content: center; gap: 0; height: 140px;
  background: radial-gradient(ellipse 70% 22% at 50% 92%, var(--meadow) 0 60%, transparent 62%); }
.gift-chara { width: 120px; height: 120px; flex: none; margin-right: -10px; }
.gift-box { position: relative; z-index: 1; border: 0; background: none; padding: 0; width: 120px; height: 120px; cursor: pointer;
  -webkit-tap-highlight-color: transparent; touch-action: manipulation; margin-bottom: 4px; }
.gift-box img { width: 100%; height: 100%; object-fit: contain; display: block; pointer-events: none; }
.gift-box:not(:disabled) { animation: gift-bob 1.6s ease-in-out infinite; }
.gift-box.wiggle { animation: gift-wiggle 0.36s ease-in-out; }
.gift-box.open { animation: gift-pop 0.45s cubic-bezier(.3, 1.6, .5, 1); cursor: default; }
.gift-box:focus-visible { outline: 3px dashed var(--peach); outline-offset: 2px; border-radius: 16px; }
.gift-burst { position: absolute; left: calc(50% + 55px); bottom: 70px; width: 0; height: 0; pointer-events: none; z-index: 2; }
.gift-burst i { position: absolute; left: -9px; top: -9px; width: 18px; height: 18px; border-radius: 50%; background: var(--gold);
  border: 2px solid var(--ink); box-shadow: inset -3px -3px 0 rgba(0, 0, 0, 0.12); opacity: 0;
  animation: gift-coin 0.9s cubic-bezier(.2, .7, .4, 1) forwards; }
.gift-say { display: flex; flex-direction: column; gap: 2px; margin: 6px 0 0; background: var(--chip); border-radius: 12px; padding: 8px 12px; text-align: left; }
.gift-say b { font: 0.95rem var(--display); font-weight: 400; color: var(--ink); }
.gift-say span { font-size: 0.82rem; color: var(--muted); line-height: 1.45; }
.gift-hint { margin: 10px 0 0; font-size: 0.85rem; color: var(--muted); }
.gift-dots { color: var(--peach); letter-spacing: 0.15em; }
.gift-got { margin: 8px 0 10px; font: 1.7rem var(--display); color: #c98a00; text-shadow: 0 2px 0 #fff3c4; }
.gift-dlg .btn { width: 100%; }

@keyframes gift-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
@keyframes gift-wiggle { 0%, 100% { transform: rotate(0) scale(1); } 25% { transform: rotate(-9deg) scale(1.06); } 60% { transform: rotate(8deg) scale(1.04); } }
@keyframes gift-pop { 0% { transform: scale(0.85); } 100% { transform: scale(1); } }
@keyframes gift-coin { 0% { opacity: 1; transform: translate(0, 0) scale(0.6); } 70% { opacity: 1; } 100% { opacity: 0; transform: translate(var(--x), var(--y)) scale(1); } }

@media (max-height: 640px) { .gift-stage { height: 136px; } .gift-chara, .gift-box { width: 96px; height: 96px; } .gift-burst { left: calc(50% + 44px); bottom: 56px; } }
@media (prefers-reduced-motion: reduce) { .gift-box, .gift-box.wiggle, .gift-box.open { animation: none !important; } }
