/* 재미 효과(v2.7): VS 화면 이야기(vs-story.js) · 하위권 입장(enter.js) · 오늘의 미션 창(missions.js) */
.vs-story { position: absolute; left: 50%; bottom: max(9%, 60px); transform: translateX(-50%); z-index: 2; display: flex; flex-direction: column; align-items: center; gap: 4px;
  width: min(92vw, 520px); text-align: center; color: #fff; animation: vsStoryIn .5s 1.05s both cubic-bezier(.2,1.5,.4,1); }
.vs-story b { font: clamp(1.4rem, 7vw, 2.4rem) var(--display); font-weight: 400; color: #ffe066; -webkit-text-stroke: 3px var(--ink); paint-order: stroke fill; text-shadow: 0 4px 0 var(--ink); }
.vs-story span { font: clamp(0.9rem, 3.6vw, 1.15rem) var(--display); background: rgba(0,0,0,.35); border: 2px solid rgba(255,255,255,.8); border-radius: 999px; padding: 3px 14px; }
.vs-story small { font: 0.85rem var(--display); opacity: .9; }
@keyframes vsStoryIn { from { transform: translate(-50%, 30px) scale(.8); opacity: 0; } to { transform: translateX(-50%); opacity: 1; } }

/* 불타는 쪽(연승·복수·천적의 강한 쪽): 발밑 불꽃 일렁 */
.vs-side.hot::before { content: ""; position: absolute; left: 8%; right: 8%; bottom: 14%; height: 55%; z-index: -1; border-radius: 50% 50% 40% 40%;
  background: radial-gradient(ellipse at 50% 90%, rgba(255,230,90,.95), rgba(255,140,40,.7) 40%, rgba(230,60,30,0) 72%); filter: blur(2px); animation: vsFlame .35s ease-in-out infinite alternate; }
@keyframes vsFlame { from { transform: scale(1, .92); opacity: .8; } to { transform: scale(1.06, 1.08); opacity: 1; } }
/* 떠는 쪽(연승 당하는·천적에게 밀리는 쪽): 덜덜 + 땀 많이 */
.vs-side.cold .vs-fig { animation: vsShiver .09s 1s linear infinite; }
@keyframes vsShiver { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(3px); } }
.vs-side.cold .vs-sweat { animation-duration: .7s; }
/* 첫 대결: 하트가 아래에서 둥실 */
.vs-heart { position: absolute; bottom: -30px; width: 18px; height: 18px; background: #ff8fb1; z-index: 1; pointer-events: none;
  clip-path: path("M9 16 C 2 11 0 7 2.5 4 C 5 1.5 8 2.5 9 5 C 10 2.5 13 1.5 15.5 4 C 18 7 16 11 9 16 Z"); animation: vsHeart 2.6s ease-in infinite both; }
@keyframes vsHeart { 0% { transform: translateY(0) scale(.6); opacity: 0; } 15% { opacity: 1; } 100% { transform: translateY(-75vh) scale(1.2) rotate(20deg); opacity: 0; } }
/* 배경 색으로 분위기: 연승·천적은 붉게, 복수전은 주황, 첫 대결은 분홍, 막상막하는 파랑 */
.vs-ov.vs-streak, .vs-ov.vs-rival { background: radial-gradient(circle at 50% 50%, #e0603f 0, #8a2a3a 45%, #2a1018 100%); }
.vs-ov.vs-revenge { background: radial-gradient(circle at 50% 50%, #f0913a 0, #9a3f1a 45%, #2e140a 100%); }
.vs-ov.vs-first { background: radial-gradient(circle at 50% 50%, #ff9cc0 0, #b04f8a 45%, #3a1430 100%); }
.vs-ov.vs-close { background: radial-gradient(circle at 50% 50%, #5fa8e0 0, #2a5a9a 45%, #101e3a 100%); }
@media (prefers-reduced-motion: reduce) { .vs-story, .vs-side.hot::before, .vs-side.cold .vs-fig, .vs-heart { animation: none; } .vs-heart { display: none; } }

/* 하위권 입장 줄(enter.js lowLine): 비 온 뒤 맑음 — 하늘색 바탕에 빗방울이 그치고 무지개 띠 */
#chatLog li.enter-low { background: linear-gradient(135deg, #e3f1ff, #cfe6fb 60%, #fdf3c8); color: #2a4a6a; flex-wrap: wrap; }
#chatLog li.enter-low::before { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: repeating-linear-gradient(105deg, transparent 0 14px, rgba(120,170,220,.35) 14px 16px); animation: lowRain 1.6s linear 2 forwards; }
@keyframes lowRain { from { background-position: 0 -40px; opacity: 1; } to { background-position: 0 40px; opacity: 0; } }
#chatLog li.enter-low::after { background: linear-gradient(90deg, transparent, rgba(255,120,120,.35), rgba(255,220,90,.35), rgba(120,210,140,.35), rgba(110,170,255,.35), transparent);
  animation: enterShine 2.4s ease-in-out 1.6s 2; }
#chatLog li.enter-low .enter-fig { animation: emShake .6s ease-in-out 4, duelHop .9s 2.4s ease-in-out infinite; }
.cheer-btn { margin-left: auto; background: #fff4c9; border-color: #e9a614; color: #7a5200; font-size: 0.72rem; padding: 2px 9px; position: relative; z-index: 1; }
@media (prefers-reduced-motion: reduce) { #chatLog li.enter-low::before, #chatLog li.enter-low .enter-fig { animation: none; } }

/* 오늘의 미션 버튼·창(missions.js) */
.mission-open { border: 2px solid var(--ink); background: #e6f4dd; color: #2f6a2c; border-radius: 999px; font: 0.9rem var(--display); padding: 5px 12px; cursor: pointer; box-shadow: 0 3px 0 var(--ink); white-space: nowrap; margin-left: 6px; }
.mission-open:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--ink); }
.mission-open.all-done { background: linear-gradient(135deg, #fff2b8, #ffd95a); color: #6b4a12; }
.mission-dlg { width: min(420px, calc(100vw - 24px)); text-align: left; max-height: calc(100dvh - 24px); overflow-y: auto; }
.mission-dlg h2 { text-align: center; }
.mission-tip { font-size: 0.78rem !important; color: var(--muted) !important; text-align: center; margin: 2px 0 10px !important; }
.mission-list { list-style: none; margin: 0 0 12px; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.mission-list li { display: flex; align-items: center; gap: 10px; background: #fff; border: 2px solid #e2d5c7; border-radius: 14px; padding: 8px 10px; }
.mission-list li.done { border-color: var(--leaf); background: #f1f9ea; }
.mi-ic { flex: none; width: 50px; display: flex; justify-content: center; }
.mi-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.mi-top { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.mi-top b { font: 0.95rem var(--display); font-weight: 400; }
.mi-tag { font: 0.68rem var(--display); border: 1.5px solid var(--ink); border-radius: 999px; padding: 0 7px; background: #fff4c9; }
.mission-list li:not(:first-child) .mi-tag { background: #efe2ff; }
.mi-bar { height: 8px; border-radius: 99px; background: #eee6dc; overflow: hidden; border: 1.5px solid var(--ink); }
.mi-bar i { display: block; height: 100%; background: var(--leaf); transform-origin: left; transition: transform .5s ease-out; }
.mi-body small { font-size: 0.72rem; color: var(--muted); }
.mi-ok { font: 0.82rem var(--display); color: var(--leaf); }
.mission-dlg > .btn { width: 100%; }
#chatLog li.enter-low .enter-txt { flex: 1 1 150px; }  /* 캐릭터 옆에 글이 붙어 있게(응원 버튼만 아래 줄로) */
