/* 판 위 표시: 도·개·걸·윷·모 스탬프, 안도 말풍선 (자리는 js/labels.js 가 겹치지 않게 계산) */
.stamp{
  position:absolute;z-index:60;pointer-events:none;width:17cqw;aspect-ratio:1;border-radius:50%;
  display:grid;place-content:center;text-align:center;
  background:radial-gradient(circle at 35% 28%,var(--th),var(--tc) 55%,var(--tl) 100%);color:#FFF3DC;
  text-shadow:0 .2cqw 0 rgba(0,0,0,.35);
  box-shadow:inset 0 0 0 .5cqw var(--tc),inset 0 0 0 .85cqw #FFF3DC,0 1cqw 2cqw rgba(0,0,0,.45);
  transform:translate(-50%,-50%) rotate(-10deg);
  animation:stampIn 2s cubic-bezier(.2,.9,.3,1.2) forwards;
}
.stamp[data-n="4"],.stamp[data-n="5"]{box-shadow:inset 0 0 0 .5cqw var(--tc),inset 0 0 0 .85cqw #FFF3DC,0 0 0 .7cqw #F4C24A,0 0 0 1cqw #9C7A36,0 0 3cqw rgba(255,210,110,.7),0 1cqw 2cqw rgba(0,0,0,.45)}
.stamp[data-team="3"]{color:#3A2406;text-shadow:0 .2cqw 0 rgba(255,255,255,.45)}
.stamp b{font-family:"Black Han Sans","Apple SD Gothic Neo",sans-serif;font-weight:400;font-size:8.5cqw;line-height:1}
.stamp small{font-size:2.3cqw;font-weight:700;margin-top:.3cqw;line-height:1.15}
.stamp[data-n="4"] b,.stamp[data-n="5"] b{font-size:7.4cqw}
@keyframes stampIn{
  0%{opacity:0;transform:translate(-50%,-50%) rotate(-28deg) scale(2.6)}
  10%{opacity:1;transform:translate(-50%,-50%) rotate(-10deg) scale(.88)}
  17%{transform:translate(-50%,-50%) rotate(-10deg) scale(1.06)}
  24%{transform:translate(-50%,-50%) rotate(-10deg) scale(1)}
  82%{opacity:1;transform:translate(-50%,-50%) rotate(-10deg) scale(1)}
  100%{opacity:0;transform:translate(-50%,-60%) rotate(-10deg) scale(.95)}
}
/* 윷·모: 한 번 더 스탬프 */
.stamp.special{
  width:30cqw;background:none;box-shadow:none;text-shadow:none;border-radius:0;
  transform:translate(-50%,-50%);
  animation:specialIn 3.4s cubic-bezier(.2,.9,.3,1.2) forwards;z-index:65;
}
@keyframes specialIn{
  0%{opacity:0;transform:translate(-50%,-50%) scale(2.4) rotate(-20deg)}
  9%{opacity:1;transform:translate(-50%,-50%) scale(.9) rotate(0)}
  15%{transform:translate(-50%,-50%) scale(1.06)}
  21%{transform:translate(-50%,-50%) scale(1)}
  86%{opacity:1;transform:translate(-50%,-50%) scale(1)}
  100%{opacity:0;transform:translate(-50%,-50%) scale(1.12)}
}
.stamp.special .st-rays{
  position:absolute;inset:-8%;border-radius:50%;
  background:repeating-conic-gradient(from 0deg,rgba(255,221,120,.9) 0 7deg,transparent 7deg 18deg);
  -webkit-mask:radial-gradient(circle,#000 30%,transparent 68%);mask:radial-gradient(circle,#000 30%,transparent 68%);
  animation:spin 7s linear infinite;
}
.stamp.special .st-orbit{position:absolute;inset:0;width:100%;height:100%;overflow:visible;animation:spin 6s linear infinite reverse}
.stamp.special .st-orbit text{
  font-family:"Black Han Sans","Apple SD Gothic Neo",sans-serif;font-size:9.4px;letter-spacing:.5px;
  fill:#FFF3DC;
}
.stamp.special .st-orbit .track{fill:none;stroke:var(--tl);stroke-width:12;opacity:.92}
.stamp.special .st-orbit .rim{fill:none;stroke:#F4C24A;stroke-width:.9}
.stamp.special .st-core{
  position:absolute;inset:21%;border-radius:50%;display:grid;place-content:center;text-align:center;
  background:radial-gradient(circle at 35% 28%,var(--th),var(--tc) 55%,var(--tl) 100%);color:#FFF3DC;
  text-shadow:0 .2cqw 0 rgba(0,0,0,.35);
  box-shadow:inset 0 0 0 .45cqw var(--tc),inset 0 0 0 .8cqw #FFF3DC,0 0 0 .6cqw #F4C24A,0 0 0 .9cqw #9C7A36,0 0 3cqw rgba(255,210,110,.8),0 1cqw 2cqw rgba(0,0,0,.45);
}
.stamp.special[data-team="3"] .st-core{color:#3A2406;text-shadow:0 .2cqw 0 rgba(255,255,255,.45)}
.stamp.special .st-core b{font-size:8.4cqw}
.stamp.special .st-core small{font-size:2.3cqw;margin-top:.2cqw}
.stamp.special .st-ribbon{
  position:absolute;left:50%;top:95%;transform:translateX(-50%);white-space:nowrap;
  display:flex;align-items:center;gap:.8cqw;
  font-family:"Black Han Sans","Apple SD Gothic Neo",sans-serif;font-size:3.1cqw;line-height:1;
  color:#2B150C;background:linear-gradient(180deg,#FFE29A,#F4C24A 55%,#D59A1E);
  padding:1.1cqw 4.2cqw 1.2cqw 4.6cqw;
  clip-path:polygon(0 0,100% 0,96% 50%,100% 100%,0 100%,4% 50%);
  filter:drop-shadow(0 .6cqw .6cqw rgba(0,0,0,.45));
  animation:ribbonBob 1s ease-in-out .5s infinite;
}
.stamp.special .st-ribbon svg{width:3.2cqw;height:3.2cqw;animation:spin 1.4s linear infinite}
@keyframes ribbonBob{0%,100%{transform:translateX(-50%) translateY(0)}50%{transform:translateX(-50%) translateY(-.9cqw)}}
.stamp.special .spark{
  position:absolute;width:3cqw;height:3cqw;margin:-1.5cqw 0 0 -1.5cqw;
  background:#FFF6D0;clip-path:polygon(50% 0,62% 38%,100% 50%,62% 62%,50% 100%,38% 62%,0 50%,38% 38%);
  filter:drop-shadow(0 0 .8cqw #FFD86B);opacity:0;animation:twinkle 1.1s ease-in-out infinite;
}
@keyframes twinkle{0%,100%{opacity:0;transform:scale(.3) rotate(0)}50%{opacity:1;transform:scale(1) rotate(45deg)}}
@keyframes spin{to{transform:rotate(360deg)}}

/* 안도 말풍선 */
.relief{
  position:absolute;z-index:58;pointer-events:none;
  display:flex;align-items:center;gap:1cqw;white-space:nowrap;
  padding:1.1cqw 2.2cqw 1.1cqw 1.3cqw;border-radius:999px;
  background:linear-gradient(180deg,var(--th),var(--tc) 70%);color:#FFF6DE;
  border:.35cqw solid #FFF6DE;
  box-shadow:0 0 0 .3cqw var(--tl),0 1cqw 2cqw rgba(0,0,0,.45);
  transform:translate(-50%,-50%);
  animation:reliefIn 2.9s cubic-bezier(.2,.9,.3,1.3) forwards;
}
.relief.wait,.stamp.wait,.stamp.wait *{animation:none !important;opacity:0}
.relief::after{content:"";position:absolute;background:#FFF6DE}
.relief[data-side="above"]::after{left:var(--tx,50%);top:100%;width:2.4cqw;height:1.6cqw;margin:.1cqw 0 0 -1.2cqw;clip-path:polygon(0 0,100% 0,50% 100%)}
.relief[data-side="below"]::after{left:var(--tx,50%);bottom:100%;width:2.4cqw;height:1.6cqw;margin:0 0 .1cqw -1.2cqw;clip-path:polygon(50% 0,100% 100%,0 100%)}
.relief[data-side="left"]::after{left:100%;top:var(--ty,50%);width:1.6cqw;height:2.4cqw;margin:-1.2cqw 0 0 .1cqw;clip-path:polygon(0 0,100% 50%,0 100%)}
.relief[data-side="right"]::after{right:100%;top:var(--ty,50%);width:1.6cqw;height:2.4cqw;margin:-1.2cqw .1cqw 0 0;clip-path:polygon(100% 0,100% 100%,0 50%)}
.relief .rf-face{font-size:3.6cqw;line-height:1;animation:wipe 1s ease-in-out .3s 2}
.relief .rf-txt{display:flex;flex-direction:column;line-height:1.05;font-family:"Black Han Sans","Apple SD Gothic Neo",sans-serif;font-size:2.9cqw;text-shadow:0 .2cqw 0 rgba(0,0,0,.3)}
.relief .rf-txt small{font-family:"Gowun Dodum",sans-serif;font-weight:700;font-size:1.7cqw;opacity:.9;text-shadow:none}
.relief[data-team="3"]{color:#3A2406}
.relief[data-team="3"] .rf-txt{text-shadow:0 .2cqw 0 rgba(255,255,255,.4)}
@keyframes reliefIn{
  0%{opacity:0;transform:translate(-50%,-50%) scale(.3)}
  12%{opacity:1;transform:translate(-50%,-50%) scale(1.12) rotate(-3deg)}
  20%{transform:translate(-50%,-50%) scale(.96) rotate(2deg)}
  28%{transform:translate(-50%,-50%) scale(1) rotate(0)}
  84%{opacity:1;transform:translate(-50%,-50%) scale(1)}
  100%{opacity:0;transform:translate(-50%,-50%) scale(.85)}
}
@keyframes wipe{0%,100%{transform:rotate(0)}30%{transform:rotate(-14deg)}60%{transform:rotate(10deg)}}
/* 겹침 계산용 측정 상태 */
.measuring,.measuring *{animation:none !important;visibility:hidden !important}

