/* 법정 캐스팅 테스트 · 2026-09-19 전면 개편(옛 «성격유형 간단 테스트»)
   재미 앱 표준 «법정 웹툰» 톤(헌법 §7 · 정본 3.오늘운세 §4) + 스포트라이트 노랑. */
:root {
    --cream: #FFF6E5;
    --paper: #FFFFFF;
    --ink: #1A1A1A;
    --ink-soft: #4A4A4A;
    --mute: #7A7266;
    --red: #E8332A;
    --yellow: #FFD13F;
    --yellow-soft: #FFF1B8;
    --navy: #2E4374;
    --navy-soft: #E4E9F4;
    --gray-soft: #EEEDEA;
    --line: 3px solid var(--ink);
    --shadow: 5px 5px 0 var(--ink);
    --shadow-s: 3px 3px 0 var(--ink);
    --display: 'Black Han Sans', 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif;
    --body: -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo', 'Malgun Gothic', 'Noto Sans KR', sans-serif;
    --head-h: 56px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { font-family: var(--body); color: var(--ink); word-break: keep-all; line-height: 1.55; min-height: 100vh; -webkit-tap-highlight-color: transparent;
       background-color: var(--cream); background-image: repeating-linear-gradient(135deg, rgba(26,26,26,.028) 0 14px, transparent 14px 28px); }
button { font: inherit; color: inherit; cursor: pointer; }
img { display: block; max-width: 100%; }
.wrap { max-width: 560px; margin: 0 auto; padding: 0 16px; }
.label { font-size: .74rem; font-weight: 900; color: var(--mute); letter-spacing: .02em; }

/* 머리 (헌법 §5 · 👤 🔗 가 맨 오른쪽) */
.shin-header { position: sticky; top: 0; z-index: 40; height: var(--head-h); display: flex; align-items: center; background: var(--cream); border-bottom: var(--line); }
.shin-header-inner { width: 100%; max-width: 560px; margin: 0 auto; padding: 0 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand { display: flex; align-items: center; gap: 8px; text-decoration: none; color: var(--ink); min-width: 0; }
.brand-mark { width: 32px; height: 32px; flex: none; display: grid; place-items: center; background: var(--navy); color: #fff; border: 2px solid var(--ink); border-radius: 8px; font-family: serif; font-weight: 700; font-size: 18px; }
.brand-name { font-weight: 800; font-size: .95rem; white-space: nowrap; }
.head-tools { display: flex; gap: 6px; flex: none; }
.tool-btn { width: 38px; height: 38px; display: grid; place-items: center; font-size: 18px; line-height: 1; background: var(--paper); border: 2px solid var(--ink); border-radius: 10px; box-shadow: 2px 2px 0 var(--ink); text-decoration: none; transition: transform .1s, box-shadow .1s; }
.tool-btn:active { transform: translate(2px, 2px); box-shadow: none; }

/* 공통 */
.card { background: var(--paper); border: var(--line); border-radius: 16px; box-shadow: var(--shadow); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 46px; padding: 10px 16px; border: var(--line); border-radius: 14px; background: var(--paper); font-weight: 800; box-shadow: var(--shadow-s); text-decoration: none; color: var(--ink); text-align: center; transition: transform .1s, box-shadow .1s; }
.btn:active { transform: translate(3px, 3px); box-shadow: none; }
.btn.primary { background: var(--navy); color: #fff; }
.btn.yellow { background: var(--yellow); }
.btn.ghost { box-shadow: none; border-width: 2px; }
.btn.big { min-height: 58px; font-family: var(--display); font-weight: 400; font-size: 1.3rem; letter-spacing: .02em; }
.btn.small { min-height: 38px; padding: 6px 12px; font-size: .86rem; }
.btn.wide { width: 100%; }
.btn:focus-visible, .tool-btn:focus-visible, .choice:focus-visible, .pair:focus-visible, .g-item:focus-visible, .linkbtn:focus-visible { outline: 3px solid var(--red); outline-offset: 2px; }
.screen { padding: 16px 0 36px; }
.kicker { display: inline-block; font-size: .78rem; font-weight: 800; background: var(--yellow); border: 2px solid var(--ink); border-radius: 999px; padding: 3px 12px; box-shadow: 2px 2px 0 var(--ink); }
.home-row { display: flex; gap: 8px; margin-top: 10px; }
.home-row .btn { flex: 1; min-height: 42px; font-size: .88rem; padding: 8px 10px; }

/* ① 입장 */
.title-block { text-align: center; }
.logo { font-family: var(--display); font-weight: 400; font-size: clamp(2.4rem, 11.5vw, 3.1rem); line-height: 1.06; margin-top: 10px; letter-spacing: .01em; }
.logo .wob { display: inline-block; }
.logo .wob i { display: inline-block; font-style: normal; }
.logo span { color: var(--yellow); -webkit-text-stroke: 1.6px var(--ink); paint-order: stroke fill; text-shadow: 3px 3px 0 var(--ink); }
.sub { font-size: .92rem; font-weight: 700; color: var(--ink-soft); margin-top: 8px; }
.stage { position: relative; margin: 16px 0 14px; height: 270px; overflow: hidden; background: var(--navy); }
.spot { position: absolute; left: 50%; top: -40px; width: 520px; height: 420px; transform: translateX(-50%);
        background: radial-gradient(ellipse at 50% 30%, rgba(255,241,184,.95) 0 18%, rgba(255,209,63,.35) 38%, transparent 64%); }
.stage-jo { position: absolute; left: 50%; bottom: -30px; height: 96%; padding: 0; background: none; border: 0; transform: translateX(-62%); filter: drop-shadow(4px 4px 0 rgba(0,0,0,.35)); }
.stage-jo img { height: 100%; width: auto; transform-origin: 50% 100%; }
.bubble { position: absolute; right: 10px; top: 12px; max-width: 46%; background: var(--paper); border: var(--line); border-radius: 14px; padding: 8px 11px; box-shadow: var(--shadow-s); font-weight: 800; font-size: .84rem; line-height: 1.38; }
.bubble small { display: block; margin-top: 3px; font-size: .72rem; font-weight: 700; color: var(--mute); }
.stage-roles { position: absolute; right: 6px; bottom: -6px; display: flex; align-items: flex-end; }
.stage-roles button { padding: 0; background: none; border: 0; margin-left: -22px; transform-origin: 50% 100%; }
.stage-roles img { height: 118px; width: auto; filter: drop-shadow(2px 2px 0 rgba(0,0,0,.35)); }
.stage-roles button:nth-child(2) img { height: 132px; }
.friend { display: flex; align-items: center; gap: 12px; padding: 10px 12px; margin-bottom: 14px; background: var(--yellow-soft); overflow: hidden; }
.friend img { width: 54px; height: 64px; object-fit: cover; object-position: top; flex: none; border-radius: 10px; border: 2px solid var(--ink); background: var(--paper); }
.friend b { display: block; font-family: var(--display); font-weight: 400; font-size: 1.2rem; }
.friend small { display: block; font-size: .78rem; font-weight: 700; color: var(--ink-soft); }
.notice-line { display: flex; align-items: flex-start; gap: 8px; margin-top: 16px; background: rgba(0,0,0,.035); border: 1px solid rgba(0,0,0,.09); border-radius: 10px; padding: 9px 12px; font-size: .82rem; line-height: 1.55; }
.notice-line svg { flex: none; margin-top: 3px; opacity: .5; }

/* ② 오디션 */
.film { display: grid; grid-template-columns: repeat(12, 1fr); gap: 3px; padding: 5px; background: var(--ink); border-radius: 8px; }
.film i { display: block; height: 14px; border-radius: 3px; background: #3A3A3A; transition: background .2s; }
.film i.done { background: var(--yellow); }
.film i.now { background: var(--paper); }
.film-txt { display: flex; justify-content: space-between; align-items: center; margin: 8px 2px 12px; font-size: .84rem; font-weight: 800; }
.linkbtn { background: none; border: none; font-size: .84rem; font-weight: 700; color: var(--ink-soft); text-decoration: underline; text-underline-offset: 3px; padding: 4px; }
.qcard { padding: 20px 18px 18px; }
.scene { display: inline-block; font-size: .76rem; font-weight: 800; background: var(--ink); color: var(--yellow); border-radius: 6px; padding: 3px 9px; }
.qtext { font-size: 1.22rem; font-weight: 800; line-height: 1.45; margin: 12px 0 18px; outline: none; }
.choices { display: grid; gap: 10px; }
.choice { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; min-height: 62px; padding: 12px 14px; background: var(--paper); border: var(--line); border-radius: 14px; box-shadow: var(--shadow-s); font-weight: 700; font-size: 1rem; line-height: 1.45; transition: transform .1s, box-shadow .1s, background .15s; }
.choice b { flex: none; width: 30px; height: 30px; display: grid; place-items: center; border: 2px solid var(--ink); border-radius: 50%; font-family: var(--display); font-weight: 400; background: var(--yellow-soft); }
.choice:hover { background: var(--yellow-soft); }
.choice.picked, .choice:active { transform: translate(3px, 3px); box-shadow: none; background: var(--yellow); }
.director { display: flex; align-items: flex-end; gap: 10px; margin-top: 18px; }
.director img { width: 70px; height: auto; flex: none; }
.director p { position: relative; margin-bottom: 26px; background: var(--paper); border: 2px solid var(--ink); border-radius: 12px; padding: 7px 11px; font-weight: 800; font-size: .86rem; box-shadow: 2px 2px 0 var(--ink); }
.director p::before { content: ''; position: absolute; left: -8px; bottom: 10px; width: 12px; height: 12px; background: var(--paper); border-left: 2px solid var(--ink); border-bottom: 2px solid var(--ink); transform: rotate(45deg); }
.hint { text-align: center; font-size: .74rem; color: var(--mute); margin-top: 14px; }
@media (hover: none) { .hint { display: none; } }

/* ③ 캐스팅 회의 */
.meeting { text-align: center; padding: 20px 18px 26px; margin-top: 18px; }
.roulette { position: relative; width: 210px; height: 240px; margin: 12px auto 14px; overflow: hidden; border: var(--line); border-radius: 18px; background: var(--navy); }
.roulette .r-sun { position: absolute; left: 50%; bottom: -90px; width: 250px; height: 250px; transform: translateX(-50%); border-radius: 50%; background: var(--yellow); border: var(--line); }
.roulette img { position: absolute; left: 50%; bottom: 0; height: 92%; width: auto; transform: translateX(-50%); filter: brightness(0); opacity: 1; }
.roulette.lit img { filter: none; opacity: 1; animation: litPop .45s cubic-bezier(.3,1.6,.5,1); }
.roulette.lit { animation: litGlow .6s ease-out; }
@keyframes litPop { 0% { transform: translateX(-50%) scale(.8); } 100% { transform: translateX(-50%) scale(1); } }
@keyframes litGlow { 0% { box-shadow: 0 0 0 0 rgba(255,209,63,.9); } 100% { box-shadow: 0 0 0 26px rgba(255,209,63,0); } }
.meeting-txt { font-family: var(--display); font-size: 1.5rem; }
.meeting small { display: block; margin-top: 6px; font-weight: 700; color: var(--ink-soft); font-size: .86rem; }

/* ④ 결과 */
.rcard { position: relative; text-align: center; padding: 18px 16px 16px; overflow: hidden; }
.stamp { position: absolute; top: 14px; right: 10px; z-index: 2; transform: rotate(12deg); font-family: var(--display); font-size: 1.02rem; color: var(--red); border: 3px solid var(--red); border-radius: 8px; padding: 2px 8px; background: rgba(255,255,255,.85); }
.r-kicker { font-weight: 800; color: var(--mute); font-size: .86rem; }
.r-portrait { position: relative; height: 250px; margin: 6px -16px 0; overflow: hidden; border-bottom: var(--line); }
.r-sun { position: absolute; left: 50%; bottom: -120px; width: 330px; height: 330px; transform: translateX(-50%); border-radius: 50%; background: var(--yellow); border: var(--line); }
.r-pic { position: absolute; inset: 0; padding: 0; background: none; border: 0; }
.r-portrait img { position: absolute; left: 50%; bottom: 0; height: 100%; width: auto; transform: translateX(-50%); filter: drop-shadow(4px 3px 0 rgba(26,26,26,.25)); }
.r-name { font-family: var(--display); font-weight: 400; font-size: clamp(2.2rem, 10vw, 2.7rem); line-height: 1.1; margin-top: 14px; outline: none; }
.r-nick { font-weight: 800; color: var(--navy); margin-top: 4px; }
.r-code { display: inline-block; margin-top: 8px; font-size: .78rem; font-weight: 800; color: var(--mute); border: 2px solid var(--ink); border-radius: 999px; padding: 2px 10px; background: var(--gray-soft); }
.r-code b { color: var(--ink); letter-spacing: .08em; }
.r-tag { font-weight: 800; margin-top: 12px; font-size: 1.02rem; }
.r-line { position: relative; display: inline-block; margin: 14px auto 4px; padding: 10px 16px; background: var(--yellow-soft); border: var(--line); border-radius: 16px; font-family: var(--display); font-weight: 400; font-size: 1.14rem; line-height: 1.35; }
.r-line::after { content: ''; position: absolute; left: 28px; top: -12px; width: 18px; height: 18px; background: var(--yellow-soft); border-left: var(--line); border-top: var(--line); transform: rotate(45deg); }
.r-desc { margin-top: 12px; font-size: .95rem; color: var(--ink-soft); text-align: left; }
.r-easter { margin-top: 10px; font-size: .86rem; font-weight: 700; background: var(--navy-soft); border: 2px dashed var(--navy); border-radius: 10px; padding: 7px 10px; }
.r-credit { margin-top: 12px; font-size: .72rem; color: var(--mute); }

.sec { font-family: var(--display); font-weight: 400; font-size: 1.12rem; margin: 22px 0 8px; }
.axes { padding: 12px 14px; display: grid; gap: 10px; }
.axis { display: grid; grid-template-columns: 92px 1fr 92px; white-space: nowrap; align-items: center; gap: 8px; font-size: .8rem; font-weight: 700; color: var(--mute); }
.axis .l { text-align: right; }
.axis .on { color: var(--ink); font-weight: 900; }
.axis .on em { background: var(--yellow); }
.axis em { font-style: normal; display: inline-block; min-width: 20px; text-align: center; border: 2px solid var(--ink); border-radius: 5px; margin: 0 3px; font-family: var(--display); font-weight: 400; background: var(--paper); }
.pips { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3px; }
.pips i { height: 12px; border: 2px solid var(--ink); border-radius: 4px; background: var(--paper); }
.pips i.l { background: var(--navy); }
.pips i.r { background: var(--red); }
.axis-note { font-size: .74rem; color: var(--mute); text-align: center; margin-top: 2px; }

.scenes { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 16px; }
.scene-box { padding: 11px 12px; }
.scene-box p { font-weight: 700; font-size: .9rem; margin-top: 4px; line-height: 1.45; }
.scene-box.best { background: var(--yellow-soft); }
.scene-box.ng { background: var(--gray-soft); }
.pairs { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.pair { display: flex; flex-direction: column; align-items: stretch; text-align: left; padding: 0; overflow: hidden; transition: transform .1s, box-shadow .1s; }
.pair:active { transform: translate(3px, 3px); box-shadow: none; }
.pair .ph { position: relative; height: 104px; background: var(--navy-soft); border-bottom: var(--line); overflow: hidden; }
.pair.rival .ph { background: #FBE3E1; }
.pair .ph img { position: absolute; left: 50%; bottom: 0; height: 100%; width: auto; transform: translateX(-50%); }
.pair .pt { padding: 8px 10px 10px; }
.pair .pt span { display: block; font-size: .72rem; font-weight: 900; color: var(--mute); }
.pair .pt b { display: block; font-family: var(--display); font-weight: 400; font-size: 1.1rem; margin-top: 1px; }
.pair .pt small { display: block; font-size: .78rem; font-weight: 600; color: var(--ink-soft); margin-top: 3px; line-height: 1.4; }
.versus { margin-top: 16px; padding: 14px; background: var(--yellow-soft); }
.vs-label { text-align: center; font-size: .76rem; font-weight: 900; color: var(--mute); }
.vs-row { display: flex; align-items: center; justify-content: center; gap: 6px; }
.vs-row figure { width: 40%; text-align: center; }
.vs-row figure div { height: 110px; position: relative; overflow: hidden; }
.vs-row figure img { position: absolute; left: 50%; bottom: 0; height: 100%; width: auto; transform: translateX(-50%); }
.vs-row figcaption { font-weight: 800; font-size: .82rem; margin-top: 4px; }
.vs-row figcaption b { display: block; font-family: var(--display); font-weight: 400; font-size: 1.05rem; }
.vs-row .x { font-family: var(--display); font-size: 1.6rem; color: var(--red); }
.vs-title { text-align: center; font-family: var(--display); font-weight: 400; font-size: 1.15rem; margin-bottom: 8px; }
.vs-line { text-align: center; font-weight: 700; margin-top: 10px; font-size: .92rem; }
.actions { display: grid; gap: 10px; margin-top: 20px; }
.actions .home-row { margin-top: 0; }
.disclaimer { margin-top: 18px; font-size: .8rem; color: var(--ink-soft); background: rgba(0,0,0,.035); border: 1px solid rgba(0,0,0,.09); border-radius: 10px; padding: 10px 12px; }
.jo-cta { display: flex; gap: 12px; align-items: flex-end; margin-top: 18px; padding: 14px 14px 14px 6px; overflow: hidden; background: var(--navy-soft); }
.jo-cta img { width: 96px; height: auto; flex: none; margin-bottom: -14px; }
.jo-cta b { display: block; font-family: var(--display); font-weight: 400; font-size: 1.08rem; line-height: 1.3; }
.jo-cta p { font-size: .86rem; color: var(--ink-soft); margin: 5px 0 10px; }
.foot { text-align: center; font-size: .76rem; color: var(--mute); padding: 6px 0 30px; }
.foot a { color: var(--mute); }

/* 도감 · 배역 보기 */
.sheet { position: fixed; inset: 0; z-index: 60; display: flex; align-items: flex-end; justify-content: center; }
.sheet-dim { position: absolute; inset: 0; background: rgba(26,26,26,.55); }
.sheet-card { position: relative; width: 100%; max-width: 560px; max-height: 88vh; overflow-y: auto; border-radius: 18px 18px 0 0; padding: 18px 16px calc(20px + env(safe-area-inset-bottom)); box-shadow: none; border-bottom: none; overscroll-behavior: contain; }
@media (min-width: 600px) { .sheet { align-items: center; } .sheet-card { border-radius: 18px; border-bottom: var(--line); box-shadow: var(--shadow); } }
.sheet-x { position: absolute; top: 10px; right: 10px; width: 36px; height: 36px; border: 2px solid var(--ink); border-radius: 10px; background: var(--paper); font-weight: 900; }
.sheet h3 { font-family: var(--display); font-weight: 400; font-size: 1.3rem; padding-right: 44px; }
.sheet .small { font-size: .84rem; color: var(--ink-soft); margin-top: 4px; }
.gallery { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 12px; }
.g-item { display: flex; flex-direction: column; padding: 0; background: var(--paper); border: 2px solid var(--ink); border-radius: 12px; overflow: hidden; text-align: center; }
.g-item .ph { position: relative; height: 82px; background: var(--navy-soft); overflow: hidden; border-bottom: 2px solid var(--ink); }
.g-item.mine .ph { background: var(--yellow); }
.g-item .ph img { position: absolute; left: 50%; bottom: 0; height: 100%; width: auto; transform: translateX(-50%); }
.g-item b { font-size: .76rem; font-weight: 800; padding: 5px 2px 1px; line-height: 1.25; }
.g-item small { font-size: .66rem; color: var(--mute); font-weight: 800; letter-spacing: .06em; padding-bottom: 5px; }
.g-detail { text-align: center; }
.g-detail .ph { position: relative; height: 230px; margin: 10px -16px 0; overflow: hidden; border-bottom: var(--line); }
.g-detail .ph .r-sun { width: 300px; height: 300px; bottom: -110px; }
.g-detail .ph img { position: absolute; left: 50%; bottom: 0; height: 100%; width: auto; transform: translateX(-50%); }
.g-detail .d-name { font-family: var(--display); font-weight: 400; font-size: 2rem; margin-top: 10px; }
.g-detail .d-meta { font-size: .8rem; font-weight: 800; color: var(--mute); }
.g-detail .d-tag { font-weight: 800; margin-top: 8px; }
.g-detail .r-desc { font-size: .9rem; }
.g-detail .d-pairs { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-top: 12px; }
.g-detail .d-pairs button { font-size: .8rem; font-weight: 800; border: 2px solid var(--ink); border-radius: 999px; padding: 4px 10px; background: var(--paper); }
.g-detail .sheet-row { display: flex; gap: 8px; margin-top: 16px; }
.g-detail .sheet-row .btn { flex: 1; min-height: 42px; font-size: .88rem; }

.toast { position: fixed; left: 50%; bottom: 24px; z-index: 80; transform: translate(-50%, 12px); max-width: min(88vw, 420px); background: var(--ink); color: #fff; font-weight: 700; font-size: .86rem; text-align: center; padding: 10px 18px; border-radius: 999px; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* 좁은 폰(폴드 접힘 등) */
@media (max-width: 360px) {
    .bubble { font-size: .78rem; max-width: 50%; }
    .stage-roles img { height: 96px; }
    .stage-roles button:nth-child(2) img { height: 108px; }
    .axis { grid-template-columns: 82px 1fr 82px; font-size: .72rem; gap: 6px; }
    .axis em { min-width: 18px; margin: 0 2px; }
    .scenes, .pairs { gap: 10px; }
    .gallery { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 520px) {
    .stage { height: 300px; }
    .r-portrait { height: 280px; }
}


/* ════════ 연출 (2026-09-19 조변 «재미 앱은 효과음·진동·움직임이 다 들어가야 한다») ════════
   움직임 줄이기 설정(조변 PC 가 켜져 있다)에서는 반복 움직임·화면 흔들림·번쩍임만 끄고,
   결과 공개처럼 앱의 재미 자체인 한 번짜리 연출은 짧게 남긴다(맨 아래 블록). */
.tool-btn.off { background: #EDE6D8; opacity: .75; }

/* 첫 화면 */
.logo .wob i { animation: wob .7s cubic-bezier(.3,1.7,.5,1) both; }
.logo .wob i:nth-child(2) { animation-delay: .08s; }
.logo .wob i:nth-child(3) { animation-delay: .16s; }
@keyframes wob { 0% { transform: translateY(-60%) scale(.4); opacity: 0; } 100% { transform: none; opacity: 1; } }
.spot { transform-origin: 50% 0; animation: sway 6s ease-in-out infinite; }
@keyframes sway { 0%, 100% { transform: translateX(-50%) rotate(-7deg); } 50% { transform: translateX(-50%) rotate(7deg); } }
.stage-jo img { animation: bob 3.2s ease-in-out infinite; }
.stage-roles button { animation: bob 2.6s ease-in-out infinite; }
.stage-roles button:nth-child(2) { animation-delay: -.8s; }
.stage-roles button:nth-child(3) { animation-delay: -1.6s; }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
.jump { animation: jump .5s cubic-bezier(.3,1.6,.5,1) !important; }
@keyframes jump { 0% { transform: translateY(0) scale(1); } 30% { transform: translateY(-16px) scale(1.05, .95); } 60% { transform: translateY(0) scale(.96, 1.04); } 100% { transform: none; } }
.stage-jo.jump { animation: none !important; }
.stage-jo.jump img { animation: jump .5s cubic-bezier(.3,1.6,.5,1); }
.bubble.pop, .director p.pop, .r-say.pop { animation: pop .35s cubic-bezier(.3,1.7,.5,1); }
@keyframes pop { 0% { transform: scale(.6); opacity: 0; } 100% { transform: none; opacity: 1; } }
.tap-hint { position: absolute; left: 10px; bottom: 8px; font-size: .72rem; font-weight: 800; color: #fff; background: rgba(26,26,26,.55); border-radius: 999px; padding: 2px 9px; animation: blink 2.4s ease-in-out infinite; pointer-events: none; }
@keyframes blink { 0%, 100% { opacity: .95; } 50% { opacity: .45; } }
.pulse { animation: pulse 1.8s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { box-shadow: var(--shadow-s), 0 0 0 0 rgba(46,67,116,.45); } 50% { box-shadow: var(--shadow-s), 0 0 0 9px rgba(46,67,116,0); } }
.pulse:active { animation: none; }

/* 오디션 */
.qcard.enter { animation: cutIn .32s cubic-bezier(.2,.9,.3,1.2); }
@keyframes cutIn { 0% { transform: translateX(46px) rotate(2deg); opacity: 0; } 100% { transform: none; opacity: 1; } }
.qcard.leave { animation: cutOut .17s ease-in forwards; }
@keyframes cutOut { to { transform: translateX(-40px) rotate(-2deg); opacity: 0; } }
.qcard.back { animation: cutBack .3s cubic-bezier(.2,.9,.3,1.2); }
@keyframes cutBack { 0% { transform: translateX(-46px) rotate(-2deg); opacity: 0; } 100% { transform: none; opacity: 1; } }
.scene { animation: pop .35s .1s cubic-bezier(.3,1.7,.5,1) both; }
.qcard:not(.enter):not(.back) .scene { animation: none; }
.choice { position: relative; }
.choice.picked::after { content: '컷! OK'; position: absolute; right: 12px; top: 50%; font-family: var(--display); font-size: .92rem; color: var(--red); border: 2px solid var(--red); border-radius: 6px; padding: 0 6px; background: #fff; transform: translateY(-50%) rotate(-10deg); animation: okStamp .22s cubic-bezier(.3,1.8,.5,1); }
@keyframes okStamp { 0% { transform: translateY(-50%) rotate(-10deg) scale(2.2); opacity: 0; } 100% { transform: translateY(-50%) rotate(-10deg) scale(1); opacity: 1; } }
.film i.fresh { animation: frame .35s cubic-bezier(.3,1.8,.5,1); }
@keyframes frame { 0% { transform: scaleY(1.9); background: var(--red); } 100% { transform: none; } }
.director img { transform-origin: 50% 100%; }
.director img.hop { animation: jump .45s cubic-bezier(.3,1.6,.5,1); }
.director p { transform-origin: 0 100%; }

/* 캐스팅 회의 */
.meeting-txt.dots::after { content: ''; animation: dots 1.2s steps(4) infinite; }
@keyframes dots { 0% { content: ''; } 25% { content: '.'; } 50% { content: '..'; } 75% { content: '...'; } }

/* 결과 공개 */
.rcard.reveal .r-sun { animation: sunUp .5s cubic-bezier(.2,.9,.3,1.15) both; }
@keyframes sunUp { 0% { transform: translateX(-50%) scale(0); } 100% { transform: translateX(-50%) scale(1); } }
.rcard.reveal .r-portrait img { animation: rise .6s .08s cubic-bezier(.2,.9,.3,1.1) both; }
@keyframes rise { 0% { transform: translate(-50%, 75%); } 100% { transform: translate(-50%, 0); } }
.rcard .stamp { opacity: 0; }
.rcard.stamped .stamp { opacity: 1; animation: slam .38s cubic-bezier(.2,1.4,.4,1) both; }
@keyframes slam { 0% { transform: rotate(12deg) scale(3.2); opacity: 0; } 70% { transform: rotate(12deg) scale(.92); opacity: 1; } 100% { transform: rotate(12deg) scale(1); opacity: 1; } }
.rcard.shake { animation: shake .32s linear; }
@keyframes shake { 0%, 100% { transform: none; } 20% { transform: translate(-4px, 2px); } 40% { transform: translate(4px, -2px); } 60% { transform: translate(-3px, -1px); } 80% { transform: translate(2px, 1px); } }
.rcard .r-name { opacity: 0; }
.rcard.named .r-name { opacity: 1; animation: namePop .5s cubic-bezier(.3,1.7,.5,1) both; }
@keyframes namePop { 0% { transform: scale(.3); opacity: 0; } 100% { transform: none; opacity: 1; } }
.rcard .fade { opacity: 0; }
.rcard.named .fade { animation: fadeUp .45s ease-out both; }
.rcard.named .r-code { animation-delay: .08s; }
.rcard.named .r-tag { animation-delay: .16s; }
.rcard.named .r-desc { animation-delay: .3s; }
.rcard.named .r-easter { animation-delay: .4s; }
@keyframes fadeUp { 0% { transform: translateY(12px); opacity: 0; } 100% { transform: none; opacity: 1; } }
.r-line:empty { visibility: hidden; }
.r-line .cur { display: inline-block; width: 2px; height: 1em; margin-left: 2px; background: var(--ink); vertical-align: -2px; animation: blink .7s steps(2) infinite; }
.r-pic img { transform-origin: 50% 100%; }
.r-pic.jump { animation: none !important; }
.r-pic.jump img { animation: jumpX .5s cubic-bezier(.3,1.6,.5,1); }
@keyframes jumpX { 0% { transform: translateX(-50%); } 30% { transform: translate(-50%, -14px) scale(1.05, .95); } 60% { transform: translateX(-50%) scale(.96, 1.04); } 100% { transform: translateX(-50%); } }
.r-say { position: absolute; right: 12px; top: 12px; max-width: 46%; z-index: 3; background: var(--paper); border: var(--line); border-radius: 14px; padding: 6px 10px; box-shadow: var(--shadow-s); font-weight: 800; font-size: .84rem; line-height: 1.35; text-align: left; }
.r-say:empty { display: none; }

/* 성향 칸 채우기 */
.axes .pips i { transform: scaleX(0); transform-origin: 0 50%; }
.axes.play .pips i { animation: pipIn .28s cubic-bezier(.3,1.5,.5,1) both; animation-delay: calc(var(--k) * 70ms); }
@keyframes pipIn { 0% { transform: scaleX(0); } 100% { transform: scaleX(1); } }

/* 친구와 나 */
.versus { position: relative; overflow: hidden; }
.versus .vs-row figure { opacity: 0; }
.versus.go .vs-row figure:first-child { animation: fromL .45s cubic-bezier(.2,.9,.3,1.2) both; }
.versus.go .vs-row figure:last-child { animation: fromR .45s cubic-bezier(.2,.9,.3,1.2) both; }
@keyframes fromL { 0% { transform: translateX(-80px); opacity: 0; } 100% { transform: none; opacity: 1; } }
@keyframes fromR { 0% { transform: translateX(80px); opacity: 0; } 100% { transform: none; opacity: 1; } }
.versus .x { display: inline-block; }
.versus.go .x { animation: pop .4s .35s cubic-bezier(.3,1.9,.5,1) both; }
.versus.rival.go { animation: shake .35s .4s linear; }
.floaty { position: absolute; bottom: 20px; font-size: 1.4rem; pointer-events: none; animation: floatUp 1.6s ease-out forwards; }
@keyframes floatUp { 0% { transform: translateY(0) scale(.6); opacity: 0; } 15% { opacity: 1; } 100% { transform: translateY(-150px) scale(1.2); opacity: 0; } }

/* 도감 */
.sheet:not([hidden]) .sheet-dim { animation: dimIn .2s ease-out; }
.sheet:not([hidden]) .sheet-card { animation: sheetUp .3s cubic-bezier(.2,.9,.3,1.05); }
@keyframes dimIn { from { opacity: 0; } }
@keyframes sheetUp { from { transform: translateY(60%); opacity: 0; } }
.gallery .g-item { animation: pop .3s cubic-bezier(.3,1.7,.5,1) both; animation-delay: calc(var(--i) * 25ms); }
.g-item:active { transform: scale(.94); }
.g-detail .ph img { animation: rise .5s cubic-bezier(.2,.9,.3,1.1) both; }

/* 슬레이트(장면 전환) */
.slate-fx { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; background: rgba(26,26,26,.35); pointer-events: none; }
.slate { width: min(78vw, 330px); animation: slateIn .9s cubic-bezier(.2,.9,.3,1.1) both; }
.slate-top { height: 42px; border: 4px solid var(--ink); border-radius: 8px 8px 0 0; background: repeating-linear-gradient(115deg, var(--ink) 0 22px, #fff 22px 44px); transform-origin: 6px 100%; animation: slateClap .9s ease-in both; }
.slate-body { background: var(--ink); color: #fff; border-radius: 0 0 10px 10px; padding: 16px 18px 20px; text-align: center; box-shadow: 6px 6px 0 rgba(0,0,0,.3); }
.slate-body small { display: block; font-weight: 800; letter-spacing: .12em; color: var(--yellow); font-size: .8rem; }
.slate-body b { display: block; font-family: var(--display); font-weight: 400; font-size: 2.2rem; margin-top: 4px; line-height: 1.15; }
.slate-fx.ng .slate-body b { color: var(--red); font-size: 2.8rem; }
.slate-fx.ng .slate-body small { color: #fff; letter-spacing: 0; font-size: .95rem; margin-top: 8px; order: 2; }
.slate-fx.ng .slate-body { display: flex; flex-direction: column; }
@keyframes slateIn { 0% { transform: translateY(-40px) scale(.85); opacity: 0; } 18% { transform: none; opacity: 1; } 82% { transform: none; opacity: 1; } 100% { transform: scale(1.06); opacity: 0; } }
@keyframes slateClap { 0%, 20% { transform: rotate(-30deg); } 42% { transform: rotate(0deg); } 100% { transform: rotate(0deg); } }
.slate-fx.long .slate, .slate-fx.long .slate-top { animation-duration: 1.6s; }

/* 꽃가루 · 사진 번쩍 */
.confetti { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 85; pointer-events: none; }
.flash { position: fixed; inset: 0; z-index: 95; background: #fff; opacity: 0; pointer-events: none; }
.flash.on { animation: flash .32s ease-out; }
@keyframes flash { 0% { opacity: .9; } 100% { opacity: 0; } }

/* 움직임 줄이기: 반복·흔들림·번쩍임만 끄고, 결과 공개 연출은 짧게 남긴다 */
@media (prefers-reduced-motion: reduce) {
    .spot, .stage-jo img, .stage-roles button, .tap-hint, .pulse, .r-line .cur, .meeting-txt.dots::after { animation: none !important; }
    .rcard.shake, .versus.rival.go, .flash.on { animation: none !important; }
    .qcard.enter, .qcard.back { animation: fadeIn .18s ease-out; }
    .qcard.leave { animation: none; }
    @keyframes fadeIn { from { opacity: 0; } }
    .rcard.reveal .r-portrait img { animation-duration: .35s; }
    .rcard.stamped .stamp { animation-duration: .22s; }
    .floaty { animation-duration: 1s; }
}
