/* 원한 풀기 (2026-10-12) — js/grudge.js */
/* 카드 창 「원한」 칸 */
.grBox{margin:12px 0 4px;padding:12px 12px 10px;border-radius:12px;background:#E8DFD0;box-shadow:inset 0 0 0 1.5px rgba(138,43,34,.25)}
.grBox.gr-done{background:#F3E6C8;box-shadow:inset 0 0 0 2px var(--gold)}
.grT{font:15px 'Black Han Sans',sans-serif;color:#8A2B22}
.grT small{margin-left:6px;font:13px inherit;font-family:inherit;color:#7A6F60}
.grP{margin:8px 0;font-size:14px;line-height:1.6;color:#2B2620}
.grP.grH,.grH{font-style:italic;color:#5A3A20}
.grBtn{width:100%;min-height:50px;margin-top:6px}
.grBtn[aria-disabled=true],#grudge .btn[aria-disabled=true]{opacity:.45}
/* 도감 격자 — 해원한 카드 도장(필터 없이) */
.gc.res::after{content:"해원";position:absolute;right:4px;bottom:22px;z-index:2;padding:1px 5px;border-radius:4px;border:1.5px solid #E8B64C;background:rgba(138,43,34,.9);color:#F7E3B0;font:13px 'Black Han Sans',sans-serif;transform:rotate(-8deg)}
/* 사연 보기 */
#grudge{position:fixed;inset:0;z-index:9400;display:flex;align-items:center;justify-content:center;padding:16px;background:rgba(7,6,10,.82);opacity:0;transition:opacity .3s}
#grudge.on{opacity:1}
#grudge .grPanel{position:relative;width:min(380px,100%);max-height:calc(100% - 8px);overflow:auto;padding:18px 16px 14px;border-radius:16px;background:#F2EADB;color:#2B2620;box-shadow:0 20px 50px rgba(0,0,0,.6);text-align:center}
#grudge .grX{position:absolute;right:6px;top:6px;width:44px;height:44px;border:0;background:none;font-size:20px;color:#5A5048}
#grudge .grCard{position:relative;width:132px;margin:4px auto 8px;aspect-ratio:3/4;border-radius:10px;overflow:hidden;box-shadow:0 8px 22px rgba(0,0,0,.35)}
#grudge .grCard i{position:absolute;inset:0;background:#222 center/cover}
#grudge .grGray{filter:grayscale(1) brightness(.85)}
#grudge .grColor{clip-path:inset(100% 0 0 0);transition:clip-path 1.2s cubic-bezier(.4,0,.2,1)}
#grudge.isDone .grColor,#grudge.fill .grColor{clip-path:inset(0 0 0 0)}
#grudge .grSeal{position:absolute;right:6px;bottom:8px;padding:2px 8px;border-radius:5px;border:2px solid #E8B64C;background:rgba(138,43,34,.92);color:#F7E3B0;font:16px 'Black Han Sans',sans-serif;opacity:0;transform:scale(2.4) rotate(-14deg)}
#grudge.isDone .grSeal{opacity:1;transform:rotate(-8deg)}
#grudge.stamp .grSeal{animation:grStamp .45s cubic-bezier(.2,1.6,.4,1)}
@keyframes grStamp{from{opacity:0;transform:scale(2.4) rotate(-14deg)}to{opacity:1;transform:rotate(-8deg)}}
#grudge .grName{font:18px 'Black Han Sans',sans-serif}
#grudge .grName small{font:13px inherit;font-family:inherit;color:#7A6F60}
#grudge .grText{min-height:4.8em;margin:10px 2px 6px;font-size:15.5px;line-height:1.7;text-align:left;white-space:normal}
#grudge .grOut p{margin:6px 0}
#grudge .grShort{color:#B2291F;font-size:14px}
#grudge .grReward{display:flex;flex-wrap:wrap;justify-content:center;gap:6px;margin:8px 0 2px}
#grudge .grReward span{padding:6px 10px;border-radius:10px;background:#2B2620;color:#F2EADB;font:14px 'Black Han Sans',sans-serif;animation:grPop .4s cubic-bezier(.2,1.6,.4,1) both}
#grudge .grReward span:nth-child(2){animation-delay:.12s}#grudge .grReward span:nth-child(3){animation-delay:.24s}
@keyframes grPop{from{opacity:0;transform:scale(.6)}}
#grudge .grBtns{display:flex;flex-direction:column;gap:8px;margin-top:10px}
#grudge .grBtns .btn{width:100%;min-height:48px}
.prog .grCnt{margin-left:4px;font-size:13px;color:var(--gold);white-space:nowrap}
.prog .grCnt b{font:15px 'Black Han Sans',sans-serif}
