/* ⚔️ 황소 영웅전 */
.rp-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 12px 0; }
.rp-tabs button { border: 0; border-radius: 999px; padding: 8px 14px; background: rgba(0,0,0,.06); cursor: pointer; font-weight: bold; }
.rp-tabs button.on { background: #7e57c2; color: #fff; }
.rp-panel { background: rgba(0,0,0,.035); border-radius: 14px; padding: 12px; margin: 10px 0; }
.rp-panel h3 { margin: 0 0 8px; }
.rp-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 6px 0; }
.rp-stages { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; }
.rp-stage { border: 0; border-radius: 12px; padding: 8px 4px; background: #fff; box-shadow: 0 2px 6px rgba(0,0,0,.12); cursor: pointer; font-weight: bold; font-size: 13px; }
.rp-stage.boss { background: linear-gradient(#fff3e0, #ffcc80); }
.rp-stage.done { opacity: .75; } .rp-stage.lock { filter: grayscale(1); opacity: .45; cursor: not-allowed; }
.rp-stage small { display: block; font-weight: normal; font-size: 11px; opacity: .7; }
.rp-heroes { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 10px; }
.rp-hcard { position: relative; border-radius: 14px; overflow: hidden; background: #222; aspect-ratio: 3/4; cursor: pointer; box-shadow: 0 3px 10px rgba(0,0,0,.25); border: 3px solid #9e9e9e; }
.rp-hcard.s4 { border-color: #a259ff; } .rp-hcard.s5 { border-color: #f5b301; box-shadow: 0 0 12px rgba(245,179,1,.6); }
.rp-hcard.in { outline: 4px solid #4cff6a; outline-offset: -2px; }
.rp-hcard.none { filter: grayscale(1) brightness(.5); cursor: default; }
.rp-hcard img, .rp-hcard .emo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 20%; }
.rp-hcard .emo { display: flex; align-items: center; justify-content: center; font-size: 42px; background: #445; }
.rp-hcard .info { position: absolute; left: 0; right: 0; bottom: 0; padding: 4px 6px; background: linear-gradient(transparent, rgba(0,0,0,.85)); color: #fff; font-size: 12px; }
.rp-hcard .info b { display: block; font-size: 13px; }
.rp-hcard .tag { position: absolute; left: 5px; top: 5px; background: rgba(0,0,0,.6); color: #ffe082; font-size: 11px; border-radius: 6px; padding: 1px 5px; }
.rp-hcard .pos { position: absolute; right: 5px; top: 5px; background: #4cff6a; color: #123; font-weight: 900; border-radius: 50%; width: 22px; height: 22px; display: flex; align-items: center; justify-content: center; font-size: 13px; }

/* ---- 전투 ---- */
.rp-battle { position: fixed; inset: 0; z-index: 9000; color: #fff; display: flex; flex-direction: column; overflow: hidden; touch-action: manipulation; background: #223; }
.rp-battle[hidden] { display: none; }
.rp-battle.forest { background: radial-gradient(ellipse at 50% 30%, #3d7a4a, #183824 70%, #0d1f14); }
.rp-battle.mountain { background: radial-gradient(ellipse at 50% 30%, #8a6a4a, #3b2c1f 70%, #1d150f); }
.rp-battle.sea { background: radial-gradient(ellipse at 50% 30%, #2f6fa8, #123a5c 70%, #081c2e); }
.rp-top { display: flex; justify-content: space-between; align-items: center; padding: 8px 12px; gap: 8px; }
.rp-top b { font-size: 15px; }
.rp-field { flex: 1; display: flex; flex-direction: column; justify-content: space-around; padding: 6px; }
.rp-side { display: flex; justify-content: center; gap: 10px; flex-wrap: nowrap; }
.rp-unit { position: relative; width: 124px; flex: none; transition: transform .2s, filter .3s, opacity .4s; cursor: pointer; }
.rp-unit .frame { position: relative; width: 124px; height: 150px; border-radius: 14px; overflow: hidden; border: 3px solid rgba(255,255,255,.35); background: #334; box-shadow: 0 6px 16px rgba(0,0,0,.4); }
.rp-unit.boss { width: 160px; } .rp-unit.boss .frame { width: 160px; height: 190px; border-color: #ff7043; }
.rp-unit .frame img, .rp-unit .frame .emo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 18%; }
.rp-unit .frame .emo { display: flex; align-items: center; justify-content: center; font-size: 54px; }
.rp-unit .live { position: absolute; inset: -6%; animation: rpBreathe 3.2s ease-in-out infinite; transform-origin: 50% 100%; }
@keyframes rpBreathe { 0%, 100% { transform: translateY(0) scale(1) skewX(0); } 50% { transform: translateY(-3px) scale(1.025) skewX(-.6deg); } }
.rp-unit .rp-bars { margin-top: 4px; }
.rp-unit .rp-hp { height: 9px; border-radius: 5px; background: rgba(0,0,0,.55); overflow: hidden; position: relative; }
.rp-unit .rp-hp i { position: absolute; left: 0; top: 0; bottom: 0; background: linear-gradient(#7dff8a, #2ecc71); transition: width .35s; }
.rp-unit.foe .rp-hp i { background: linear-gradient(#ff8a80, #e53935); }
.rp-unit .rp-hp u { position: absolute; left: 0; top: 0; bottom: 0; background: rgba(160,220,255,.85); transition: width .35s; }
.rp-unit .rp-nm { font-size: 11.5px; font-weight: bold; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-shadow: 0 1px 2px #000; }
.rp-unit .st { position: absolute; top: 4px; left: 4px; font-size: 13px; text-shadow: 0 1px 2px #000; z-index: 2; }
.rp-unit .elem { position: absolute; top: 4px; right: 4px; font-size: 15px; z-index: 2; filter: drop-shadow(0 1px 2px #000); }
.rp-unit .fx { position: absolute; bottom: 30px; left: 0; right: 0; text-align: center; font-size: 13px; z-index: 2; }
.rp-unit.cur .frame { border-color: #ffd54f; box-shadow: 0 0 0 3px #ffd54f, 0 0 24px #ffd54f; }
.rp-unit.cur { transform: translateY(-8px); }
.rp-unit.tgt .frame { box-shadow: 0 0 0 3px #ff5252, 0 0 20px #ff5252; animation: rpPulse .8s infinite; }
.rp-unit.ally-tgt .frame { box-shadow: 0 0 0 3px #69f0ae, 0 0 20px #69f0ae; animation: rpPulse .8s infinite; }
@keyframes rpPulse { 50% { filter: brightness(1.3); } }
.rp-unit.dead { filter: grayscale(1) brightness(.5); opacity: .55; transform: translateY(14px) rotate(-4deg); }
.rp-unit.hit .frame { animation: rpHit .35s; }
@keyframes rpHit { 0% { filter: brightness(3) saturate(0); } 30% { transform: translateX(-7px); } 60% { transform: translateX(7px); } 100% { filter: none; transform: none; } }
.rp-skills { display: flex; justify-content: center; gap: 10px; padding: 8px 10px 14px; flex-wrap: wrap; }
.rp-sk { position: relative; min-width: 130px; max-width: 200px; border: 0; border-radius: 14px; padding: 9px 12px; text-align: left; cursor: pointer; color: #fff; background: linear-gradient(#5c6bc0, #3949ab); box-shadow: 0 4px 0 #1a237e; }
.rp-sk.big { background: linear-gradient(#ffb74d, #f57c00); box-shadow: 0 4px 0 #a14d00; }
.rp-sk.sel { outline: 3px solid #fff; }
.rp-sk:disabled { filter: grayscale(1); opacity: .55; cursor: default; }
.rp-sk b { display: block; font-size: 14px; } .rp-sk small { font-size: 11px; opacity: .9; }
.rp-ctrl { display: flex; gap: 6px; }
.rp-btn { border: 0; border-radius: 10px; padding: 7px 12px; font-weight: bold; cursor: pointer; background: rgba(255,255,255,.18); color: #fff; }
.rp-btn.on { background: #4caf50; }
.rp-msg { text-align: center; font-size: 13px; min-height: 18px; color: #ffe9b0; text-shadow: 0 1px 2px #000; }
.rp-num { position: fixed; z-index: 9500; font-weight: 900; font-size: 28px; pointer-events: none; text-shadow: 0 2px 4px #000, 0 0 8px rgba(0,0,0,.6); animation: rpNum 1.1s forwards; }
.rp-num.crit { font-size: 36px; color: #ffeb3b !important; }
@keyframes rpNum { 0% { transform: translate(-50%, 0) scale(.6); opacity: 0; } 15% { transform: translate(-50%, -10px) scale(1.15); opacity: 1; } 100% { transform: translate(-50%, -54px) scale(1); opacity: 0; } }
.rp-cut { position: fixed; inset: 0; z-index: 9400; pointer-events: none; display: flex; align-items: center; overflow: hidden; }
.rp-cut .band { position: relative; width: 100%; height: 46%; background-size: cover; background-position: center; animation: rpBand .95s ease-out forwards; box-shadow: 0 0 40px rgba(0,0,0,.6); }
.rp-cut .band::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(0,0,0,.75), rgba(0,0,0,.2) 60%, rgba(0,0,0,.6)); }
.rp-cut .who { position: absolute; left: 4%; bottom: 0; height: 125%; aspect-ratio: 1; object-fit: cover; object-position: 50% 15%; border-radius: 50% 50% 0 0; animation: rpWho .95s ease-out forwards; -webkit-mask-image: linear-gradient(#000 75%, transparent); mask-image: linear-gradient(#000 75%, transparent); }
.rp-cut .sk { position: absolute; right: 6%; top: 50%; transform: translateY(-50%); font-size: 38px; font-weight: 900; color: #fff; text-shadow: 0 3px 8px #000, 0 0 18px rgba(255,200,80,.9); animation: rpSk .95s ease-out forwards; }
@keyframes rpBand { 0% { transform: scaleY(0); } 15% { transform: scaleY(1); } 85% { transform: scaleY(1); opacity: 1; } 100% { transform: scaleY(1); opacity: 0; } }
@keyframes rpWho { 0% { transform: translateX(-60%); opacity: 0; } 20% { transform: translateX(0); opacity: 1; } 85% { transform: translateX(4%); opacity: 1; } 100% { opacity: 0; } }
@keyframes rpSk { 0% { transform: translate(40%, -50%); opacity: 0; } 25% { transform: translate(0, -50%); opacity: 1; } 85% { opacity: 1; } 100% { opacity: 0; } }
.rp-boom { position: fixed; z-index: 9450; pointer-events: none; width: 150px; height: 150px; margin: -75px 0 0 -75px; border-radius: 50%; animation: rpBoom .55s ease-out forwards; }
.rp-boom.fire { background: radial-gradient(circle, rgba(255,240,150,.95), rgba(255,120,30,.8) 40%, transparent 70%); }
.rp-boom.water { background: radial-gradient(circle, rgba(220,250,255,.95), rgba(60,160,255,.8) 40%, transparent 70%); }
.rp-boom.wood { background: radial-gradient(circle, rgba(230,255,200,.95), rgba(80,190,80,.8) 40%, transparent 70%); }
.rp-boom.light { background: radial-gradient(circle, rgba(255,255,255,1), rgba(255,230,120,.8) 40%, transparent 70%); }
.rp-boom.dark { background: radial-gradient(circle, rgba(220,180,255,.9), rgba(100,40,160,.85) 40%, transparent 70%); }
.rp-boom.heal { background: radial-gradient(circle, rgba(220,255,220,.9), rgba(100,230,140,.6) 40%, transparent 70%); }
.rp-boom.hit { background: radial-gradient(circle, rgba(255,255,255,.95), rgba(255,255,255,.3) 35%, transparent 60%); width: 90px; height: 90px; margin: -45px 0 0 -45px; }
@keyframes rpBoom { from { transform: scale(.2); opacity: 1; } to { transform: scale(1.4); opacity: 0; } }
.rp-modal { position: fixed; inset: 0; z-index: 9700; background: rgba(0,0,0,.6); display: flex; align-items: center; justify-content: center; padding: 16px; }
.rp-modal[hidden] { display: none; }
.rp-modal .box { background: #fffaf0; color: #2b2116; border-radius: 18px; padding: 18px; max-width: 560px; width: 100%; max-height: 90vh; overflow: auto; text-align: center; }
.rp-reveal { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; margin: 12px 0; }
.rp-reveal .rp-hcard { animation: rpFlip .55s backwards; }
@keyframes rpFlip { from { transform: rotateY(90deg) scale(.6); opacity: 0; } to { transform: none; opacity: 1; } }
@media (max-width: 700px) {
  .rp-unit, .rp-unit .frame { width: 80px; } .rp-unit .frame { height: 100px; }
  .rp-unit.boss, .rp-unit.boss .frame { width: 104px; } .rp-unit.boss .frame { height: 128px; }
  .rp-side { gap: 5px; } .rp-sk { min-width: 0; flex: 1; padding: 8px; } .rp-sk small { display: none; }
}
