/* =====================================================
   새 카드 틀 + 받는 연출 (2026-11-15 확정안, 원본: scratchpad/frame/reveal_frames.html)
   - 크기는 em 기준 (글자 10px ≈ 카드 폭 120px). 자리마다 font-size 로 크기 맞춤
   - 무거운 효과(빛줄기·입자·숨쉬기·홀로)는 .big(결과·크게 보기·받는 연출)에서만
     작은 칸(도감·보관함·보상표)은 S 광택 · A 은은한 숨쉬기만 (transform/opacity 만 → 저사양 폰도 가벼움)
   - forwards 금지 (앱 안 브라우저 버그) → 끝 상태는 class 기본 style 로
   ===================================================== */
.card.fcard { --gold: #ffd25a; position: relative; aspect-ratio: auto; padding: 0; border-radius: 0; background: none; box-shadow: none; overflow: visible;
  font-family: 'Galmuri11', 'Black Han Sans', sans-serif; color: #f4e9d8; font-size: 10px; isolation: isolate; }
.fcard .frame { position: relative; z-index: 1; background: var(--c); padding: .5em;
  clip-path: polygon(0 .4em, .4em .4em, .4em 0, calc(100% - .4em) 0, calc(100% - .4em) .4em, 100% .4em, 100% calc(100% - .4em), calc(100% - .4em) calc(100% - .4em), calc(100% - .4em) 100%, .4em 100%, .4em calc(100% - .4em), 0 calc(100% - .4em));
  box-shadow: inset .3em .3em 0 #ffffff40, inset -.3em -.3em 0 #00000055; }
.fcard .art { position: relative; aspect-ratio: 300 / 438; background: #000; border: .2em solid #000; overflow: hidden; }
.fcard .art img { display: block; width: 100%; height: 100%; object-fit: cover; }
.fcard .name { margin-top: .4em; background: #14111d; border: .2em solid #000; padding: .35em .3em .3em; text-align: center; font-size: 1em; font-weight: 700; line-height: 1.2; color: #f4e9d8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fcard .foot { display: flex; justify-content: space-between; gap: .3em; font-size: .8em; line-height: 1.2; color: #000a; padding: .3em .2em 0; font-weight: 700; white-space: nowrap; overflow: hidden; }
.fcard .foot span:first-child { overflow: hidden; text-overflow: ellipsis; }
.fcard .emb { position: absolute; left: -.5em; top: -.5em; width: 2.8em; height: 2.8em; z-index: 3; image-rendering: pixelated; filter: drop-shadow(.15em .15em 0 #000); }
.fcard .seti { position: absolute; right: .6em; top: .6em; z-index: 3; width: 1.6em; height: 1.6em; background: var(--gold); border: .2em solid #000; display: grid; place-items: center; font-size: .9em; font-weight: 700; color: #2a1600; line-height: 1; }
.fcard .fx { position: absolute; inset: .5em .5em auto .5em; aspect-ratio: 300 / 438; pointer-events: none; overflow: hidden; z-index: 2; }
/* S: 금빛 틀 + 왕관 장식 (작은 칸도), 큰 카드는 뒤 빛줄기·LEGEND 띠·금빛 입자 */
.fcard.fg-S .frame { background: linear-gradient(135deg, #fff1a8, #ffc93b 30%, #c8870f 60%, #ffe27a); }
.fcard .crownbits { position: absolute; top: -.4em; left: 50%; transform: translateX(-50%); width: 4.4em; height: 1em; z-index: 4;
  background: linear-gradient(90deg, #000 0 .2em, #ffe27a .2em .8em, #000 .8em 1em, transparent 1em 1.7em, #000 1.7em 1.9em, #ff4f6a 1.9em 2.5em, #000 2.5em 2.7em, transparent 2.7em 3.4em, #000 3.4em 3.6em, #ffe27a 3.6em 4.2em, #000 4.2em 4.4em); }
.fcard.fg-S .fx::before { content: ""; position: absolute; inset: -30%; background: linear-gradient(115deg, transparent 42%, #fff6 50%, transparent 58%); animation: fcSheen 6s linear infinite; }
.fcard .rays { position: absolute; left: 50%; top: 42%; width: 30em; height: 30em; margin: -15em 0 0 -15em; border-radius: 50%; z-index: 0; pointer-events: none;
  background: repeating-conic-gradient(#ffd25a55 0 8deg, transparent 8deg 22deg); animation: fcSpin 9s linear infinite;
  -webkit-mask: radial-gradient(circle, #000 30%, transparent 70%); mask: radial-gradient(circle, #000 30%, transparent 70%); }
.fcard .lgd { position: absolute; left: 50%; bottom: -1em; transform: translateX(-50%); background: #2a1600; color: #ffe27a; border: .2em solid #000; font-size: .9em; font-weight: 700; padding: .2em .8em; letter-spacing: .2em; z-index: 4; white-space: nowrap; }
.fcard .gem { position: absolute; width: .5em; height: .5em; background: #bff3ff; box-shadow: 0 0 .6em #6fd8ff; animation: fcFloat 3s linear infinite; z-index: 3; opacity: 0; pointer-events: none; }
.fcard.fg-S .gem { background: #fff6c0; box-shadow: 0 0 .6em #ffcf4a; }
/* A: 숨쉬는 파란 틀(작은 칸은 은은하게) + 큰 카드는 무지개 홀로 */
.fcard.fg-A .fx::after { content: ""; position: absolute; inset: 0; background: #8fe3ff; opacity: 0; animation: fcBreatheA 2.4s ease-in-out infinite; }
.fcard.fg-A.big .frame { animation: fcBreathe 2.4s ease-in-out infinite; }
.fcard.fg-A.big .fx::before { content: ""; position: absolute; inset: -40%; background: linear-gradient(120deg, #ff4f9a33, #ffe05033, #4dffb033, #4fb2ff33, #c06bff33); mix-blend-mode: color-dodge; animation: fcHolo 5s ease-in-out infinite alternate; }
/* B: 큰 카드만 모서리 반짝 + 광택 */
.fcard.fg-B.big .fx::before { content: ""; position: absolute; inset: -30%; background: linear-gradient(115deg, transparent 40%, #ffffff30 50%, transparent 60%); animation: fcSheenB 4.5s linear infinite; }
.fcard .tw { position: absolute; width: .6em; height: .6em; background: #fff; z-index: 4; box-shadow: 0 0 0 .2em var(--c); animation: fcTw 1.4s steps(2) infinite; }
.fcard .tw.t2 { left: auto; top: auto; right: 1px; bottom: 3.4em; animation-delay: .7s; }
/* C: 큰 카드만 3초마다 빛줄기 */
.fcard.fg-C.big .fx::before { content: ""; position: absolute; top: -20%; bottom: -20%; width: 35%; left: -60%; background: linear-gradient(100deg, transparent, #fff8, transparent); transform: skewX(-15deg); animation: fcSweep 3.2s ease-in-out infinite; }
@keyframes fcSheen { from { transform: translateX(-40%); } to { transform: translateX(40%); } }
@keyframes fcSheenB { from { transform: translateX(-40%); } to { transform: translateX(40%); } }
@keyframes fcSpin { to { transform: rotate(1turn); } }
@keyframes fcFloat { 0% { transform: translateY(0); opacity: 0; } 20% { opacity: 1; } 100% { transform: translateY(-12em); opacity: 0; } }
@keyframes fcBreatheA { 50% { opacity: .18; } }
@keyframes fcBreathe { 50% { filter: brightness(1.35) drop-shadow(0 0 .6em #6fd8ff); } }
@keyframes fcHolo { from { transform: translate(-15%, -10%) rotate(0); } to { transform: translate(15%, 10%) rotate(10deg); } }
@keyframes fcTw { 0% { opacity: 1; } 50% { opacity: 0; } }
@keyframes fcSweep { 0%, 55% { left: -60%; } 85%, 100% { left: 130%; } }
/* 자리별 크기 */
.dexcard .card.fcard { font-size: 5px; padding: 0; }
.bagitem .card.fcard, .pcard .card.fcard { font-size: 8.5px; }
.card.fcard.big { font-size: 17px; padding: 0; }
.result .card.fcard.big { width: 190px; font-size: 15.8px; }
.zoom .card.fcard.big { width: min(64vw, 260px); font-size: min(8.8vw, 21.6px); }
.result { overflow: hidden; padding-top: 6px; }
.zoom { overflow: hidden; }
@media (prefers-reduced-motion: reduce) { .fcard *, .fcard .fx::before, .fcard .fx::after { animation: none !important; } }

/* ---------- 받는 연출 무대 (230×360 논리 크기를 transform 으로 키움) ---------- */
.rv-wrap { position: relative; margin: 0 auto; cursor: pointer; }
.fin2.rv { overflow: hidden; }
.rv-stage { position: absolute; left: 0; top: 0; width: 230px; height: 360px; transform-origin: 0 0; overflow: visible; }
.rv-stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; image-rendering: pixelated; image-rendering: crisp-edges; pointer-events: none; }
.rv-cb { z-index: 1; } .rv-cf { z-index: 3; }
.rv-dim { position: absolute; inset: -150% -200%; z-index: 0; background: #000; opacity: 0; transition: opacity .3s steps(3); pointer-events: none; }
.rv-dim.on { opacity: .55; }
.rv-holder { position: absolute; z-index: 2; left: 50%; top: 44%; width: 120px; margin-left: -60px; transform: translateY(-50%) scale(.2); opacity: 0; transition: transform .32s steps(5), opacity .08s; }
.rv-holder .card.fcard.big { width: 120px; font-size: 10px; }
.rv-holder.show { opacity: 1; transform: translateY(-50%) scale(1); }
.rv-holder.show.in-C { animation: rvInC .45s steps(6); }
.rv-holder.show.in-D { animation: rvInD .4s steps(6); }
.rv-holder.show.in-E { animation: rvInE .35s steps(5); }
.rv-holder.show.in-F { animation: rvInF .35s steps(5); }
.rv-holder.show.in-G { animation: rvInG .4s steps(4); }
@keyframes rvInC { 0% { transform: translateY(10%) scale(.6); } 60% { transform: translateY(-62%) scale(1.08); } 100% { transform: translateY(-50%) scale(1); } }
@keyframes rvInD { 0% { transform: translateY(-50%) rotateY(90deg); } 100% { transform: translateY(-50%) rotateY(0); } }
@keyframes rvInE { 0% { transform: translateY(-140%); } 70% { transform: translateY(-46%); } 100% { transform: translateY(-50%); } }
@keyframes rvInF { 0% { transform: translate(120%, -50%); } 100% { transform: translate(0, -50%); } }
@keyframes rvInG { 0% { opacity: 0; filter: blur(3px); } 100% { opacity: 1; filter: none; } }
.rv-ore { position: absolute; z-index: 2; left: 50%; top: 44%; width: 96px; height: 96px; margin: -48px 0 0 -48px; filter: drop-shadow(0 0 14px var(--gc, #fff)); }
.rv-ore img { width: 100%; height: 100%; display: block; image-rendering: pixelated; }
.rv-ore.h1 { animation: f2Hit1 .3s ease-out; } .rv-ore.h2 { animation: f2Hit2 .3s ease-out; }
.rv-flash { position: absolute; inset: -150% -200%; z-index: 5; opacity: 0; pointer-events: none; }
.rv-flash.warm { background: #fff0c0; animation: rvFl .4s steps(3); }
.rv-flash.cold { background: #e6f9ff; animation: rvFl .3s steps(3); }
@keyframes rvFl { 0% { opacity: .85; } 50% { opacity: .35; } 100% { opacity: 0; } }
.rv-stage.quake { animation: rvQk .45s steps(6); }
.rv-stage.quake1 { animation: rvQk1 .3s steps(4); }
@keyframes rvQk { 0%, 100% { translate: 0 0; } 20% { translate: -7px 4px; } 40% { translate: 6px -5px; } 60% { translate: -4px -3px; } 80% { translate: 4px 4px; } }
@keyframes rvQk1 { 0%, 100% { translate: 0 0; } 33% { translate: -3px 2px; } 66% { translate: 3px -2px; } }
.rv-legend { position: absolute; z-index: 6; left: 50%; top: 9%; transform: translateX(-50%); opacity: 0; white-space: nowrap; pointer-events: none;
  font: 700 22px 'Galmuri11', sans-serif; color: #f1d8ff; text-shadow: 3px 0 0 #3a1460, -3px 0 0 #3a1460, 0 3px 0 #3a1460, 0 -3px 0 #3a1460, 3px 3px 0 #1a0830; transition: opacity .2s steps(2); }
.rv-legend.on { opacity: 1; }
/* S 고유 이름 (2026-11-16): 고유 이름 크게 + 설명 이름 작게 */
.fcard .name.nick { padding: .25em .3em .25em; }
.fcard .name.nick b { display: block; font-size: 1.25em; line-height: 1.1; color: #ffe27a; overflow: hidden; text-overflow: ellipsis; }
.fcard .name.nick small { display: block; font-size: .72em; font-weight: 400; line-height: 1.2; color: #cfc3b0; overflow: hidden; text-overflow: ellipsis; }
.result .rname.nick { display: flex; flex-direction: column; align-items: center; line-height: 1.15; color: #ffe27a; font-size: 22px; }
.result .rname.nick small { font-size: 12px; font-weight: 400; color: var(--p-muted, #cfc3b0); }
