/* 하찮은 장기자랑 대회 지원 페이지 시제품 (2026-11-17). 겉모습 기준은 카드뉴스 PSD. */
:root { --yellow: #f7ff26; --navy: #104776; --deep: #07223b; --ink: #0a2540; --H: 1350; }
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--deep); color: #fff; font-family: "Pretendard", -apple-system, "Apple SD Gothic Neo", "Noto Sans KR", sans-serif; -webkit-tap-highlight-color: transparent; word-break: keep-all; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
.page { position: relative; max-width: 480px; min-height: 100vh; margin: 0 auto; padding-bottom: 76px; background: var(--navy); overflow: hidden; }

/* 카드 한 장 */
.card { position: relative; container-type: inline-size; }
.card > img.bg { width: 100%; height: auto; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* 대문: 좌표는 PSD 01 아트보드(가로 1080) 기준 */
.stage { position: relative; width: 100%; aspect-ratio: 1080 / var(--H); overflow: hidden; container-type: inline-size; background: #2a7fd2 url("assets/sky.webp") top center / 100% auto no-repeat; }
.at { position: absolute; left: calc(var(--x) / 1080 * 100%); top: calc(var(--y) / var(--H) * 100%); width: calc(var(--w) / 1080 * 100%); height: auto; margin: 0; }
.title img { filter: drop-shadow(0 0.4cqw 1.6cqw rgba(0, 40, 100, 0.25)); }

.subject { position: absolute; left: 0; top: calc(392 / var(--H) * 100%); width: 100%; aspect-ratio: 1080 / 1368; border: 0; padding: 0; background: none; cursor: pointer; touch-action: manipulation; }
.subject > * { position: absolute; }
.inbox { inset: 0; background: linear-gradient(165deg, #5a4028, #1f140b); clip-path: polygon(41.2% 66.2%, 86.5% 78.4%, 91.2% 58.9%, 48.5% 49.4%); }
.box-back { left: calc(113 / 1080 * 100%); top: 0; width: calc(967 / 1080 * 100%); }
.pclip { inset: 0; clip-path: polygon(0 -30%, 100% -30%, 100% 82.7%, 83.1% 77.9%, 41.2% 66.2%, 0 54.7%); }
.person { position: absolute; left: calc(67 / 1080 * 100%); top: calc(3 / 1368 * 100%); width: calc(1013 / 1080 * 100%); transform-origin: 61.5% 66.5%; will-change: transform; }
.box-front { left: calc(34 / 1080 * 100%); top: calc(878 / 1368 * 100%); width: calc(905 / 1080 * 100%); transform-origin: 50% 100%; }

.person.sunk { transform: translateY(24%) scale(0.2); }
.person.pop { animation: pop 0.62s cubic-bezier(0.2, 0.9, 0.3, 1) both; }
.person.duck { animation: duck 0.2s cubic-bezier(0.6, 0, 0.9, 0.4) both; }
.person.jig { animation: jig 0.45s ease both; }
.subject.thump .box-front { animation: thump 0.45s ease; }
@keyframes pop { 0% { transform: translateY(24%) scale(0.2); } 50% { transform: translateY(-3.5%) scale(1.07); } 72% { transform: translateY(1%) scale(0.975); } 100% { transform: none; } }
@keyframes duck { 0% { transform: none; } 100% { transform: translateY(24%) scale(0.2); } }
@keyframes jig { 0% { transform: none; } 30% { transform: translateY(-2.5%) scale(1.05) rotate(-1.5deg); } 60% { transform: translateY(0.8%) scale(0.985) rotate(1deg); } 100% { transform: none; } }
@keyframes thump { 30% { transform: scale(1.03, 0.96); } 60% { transform: scale(0.99, 1.02); } }

.cap { filter: drop-shadow(0 0.3cqw 1.2cqw rgba(0, 30, 70, 0.6)); pointer-events: none; }
.shout { font-size: 5.7cqw; font-weight: 900; line-height: 1.15; letter-spacing: -0.02em; text-shadow: 0 0.3cqw 1.4cqw rgba(0, 30, 70, 0.6); pointer-events: none; }
.shout b { color: var(--yellow); }
.shout.swap { animation: swap 0.35s cubic-bezier(0.2, 0.9, 0.3, 1.3); transform-origin: 0 60%; }
@keyframes swap { 0% { transform: scale(0.6); opacity: 0; } 100% { transform: none; opacity: 1; } }

/* 나 안: 말풍선과 손가락 */
.bubble { padding: 3.6cqw 4.2cqw 4cqw; border-radius: 5cqw; background: #fff; color: var(--ink); box-shadow: 0 1.5cqw 4cqw rgba(0, 40, 90, 0.28); pointer-events: none; transform-origin: 40% 100%; }
.bubble::after { content: ""; position: absolute; left: 34%; bottom: -3.4cqw; border: 2.4cqw solid transparent; border-top-color: #fff; border-bottom: 0; transform: skewX(-18deg); }
.bubble .b-label { display: block; font-size: 3.2cqw; font-weight: 600; line-height: 1.35; opacity: 0.72; }
.bubble .b-main { display: block; margin-top: 0.8cqw; font-size: 5.6cqw; font-weight: 900; line-height: 1.22; letter-spacing: -0.02em; }
.bubble.swap { animation: bswap 0.4s cubic-bezier(0.2, 0.9, 0.3, 1.3); }
@keyframes bswap { 0% { transform: scale(0.5); opacity: 0; } 100% { transform: none; opacity: 1; } }
.hint { font-size: 8cqw; line-height: 1; text-align: center; pointer-events: none; animation: bob 1s ease-in-out infinite; }
.hint.gone { display: none; }
@keyframes bob { 50% { transform: translateY(-1.6cqw); } }

/* 카드 03: 사전 스피커 */
.speak { position: absolute; left: 30%; top: 17.5%; width: 42%; height: 20.5%; border: 0; border-radius: 3cqw; background: none; cursor: pointer; touch-action: manipulation; }
.ring { position: absolute; left: 60.4%; top: 32.9%; width: 5cqw; height: 5cqw; margin: -2.5cqw 0 0 -2.5cqw; border: 0.5cqw solid #1f4fbf; border-radius: 50%; opacity: 0; pointer-events: none; }
.ring.go { animation: ring 0.7s ease-out; }
@keyframes ring { 0% { transform: scale(0.6); opacity: 0.9; } 100% { transform: scale(4.2); opacity: 0; } }
.say { position: absolute; left: 0; right: 0; top: 2.5%; line-height: 1; text-align: center; font-weight: 900; color: #fff; text-shadow: 0 0.4cqw 2cqw rgba(0, 0, 0, 0.55); opacity: 0; pointer-events: none; }
.say.go { animation: say var(--dur, 1.1s) ease-out; }
@keyframes say { 0% { transform: scale(0.5); opacity: 0; } 18% { transform: scale(1.06); opacity: 1; } 70% { opacity: 1; } 100% { transform: scale(1); opacity: 0; } }

/* 카드 02 아래: 고른 대표작 */
.strip { display: flex; gap: 10px; overflow-x: auto; padding: 14px 16px 22px; background: #030304; scroll-snap-type: x mandatory; scrollbar-width: none; }
.strip::-webkit-scrollbar { display: none; }
.strip a { flex: 0 0 62%; scroll-snap-align: center; text-decoration: none; }
.strip img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 10px; }
.strip span { display: block; margin-top: 8px; font-size: 14px; font-weight: 700; line-height: 1.35; }
.strip small { display: block; font-size: 12px; font-weight: 500; opacity: 0.6; }

/* 카드 04: 4컷 */
.fig { position: absolute; top: 13.63%; height: 32.07% !important; width: auto; max-width: none; transform: translateX(-50%); }

/* 카드 07, 08 */
.tap-all { position: absolute; inset: 0; border: 0; background: none; cursor: pointer; touch-action: manipulation; }
.go-btn { position: absolute; left: 31%; top: 46.5%; width: 38%; aspect-ratio: 1; display: grid; place-items: center; border-radius: 9%; background: var(--yellow); color: var(--ink); font-size: 8cqw; font-weight: 900; letter-spacing: -0.03em; text-decoration: none; box-shadow: 0 2cqw 6cqw rgba(0, 40, 90, 0.35); }
.go-btn:active, .big-btn:active, .bar a:active { transform: scale(0.97); }

/* 아래 고정 막대 */
.bar { position: fixed; left: 50%; bottom: 0; z-index: 20; display: flex; align-items: center; gap: 12px; width: min(480px, 100%); padding: 10px 14px calc(10px + env(safe-area-inset-bottom)); background: rgba(7, 34, 59, 0.92); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); transform: translate(-50%, 110%); transition: transform 0.25s ease; }
.bar.on { transform: translate(-50%, 0); }
.bar .due { flex: 1; font-size: 14px; font-weight: 600; line-height: 1.3; }
.bar .due b { color: var(--yellow); }
.bar a { display: inline-flex; align-items: center; min-height: 46px; padding: 0 22px; border-radius: 999px; background: var(--yellow); color: var(--ink); font-size: 16px; font-weight: 900; text-decoration: none; }

/* 나 안: 조용한 안내 */
.q { padding: 44px 24px 8px; }
.q h2 { margin: 0 0 22px; font-size: 34px; font-weight: 200; letter-spacing: -0.03em; }
.q p { margin: 0 0 14px; font-size: 17px; font-weight: 700; line-height: 1.6; }
.q p b, .q dd b { color: var(--yellow); }
.q dl { display: grid; grid-template-columns: 5.4em 1fr; gap: 16px 8px; margin: 0; font-size: 16px; line-height: 1.5; }
.q dt { color: var(--yellow); font-weight: 900; }
.q dd { margin: 0; font-weight: 700; }
.prize { display: grid; gap: 18px; margin: 0; padding: 0; list-style: none; }
.prize li { display: flex; align-items: baseline; justify-content: space-between; padding-bottom: 14px; border-bottom: 1px solid rgba(255, 255, 255, 0.18); }
.prize span { color: var(--yellow); font-size: 15px; font-weight: 900; }
.prize strong { font-size: 30px; font-weight: 900; letter-spacing: -0.02em; }
.prize li:first-child strong { font-size: 42px; }
.faq details { padding: 16px 0; border-bottom: 1px solid rgba(255, 255, 255, 0.18); }
.faq summary { color: var(--yellow); font-size: 16px; font-weight: 900; line-height: 1.45; cursor: pointer; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq details p { margin: 10px 0 0; font-size: 15px; font-weight: 600; line-height: 1.6; }
.q .strip { margin: 6px -24px 0; background: none; }
.big-btn { display: flex; align-items: center; justify-content: center; min-height: 60px; margin: 28px 0 40px; border-radius: 999px; background: var(--yellow); color: var(--ink); font-size: 20px; font-weight: 900; text-decoration: none; }
.under { padding: 18px 24px 0; }
.under .big-btn { margin: 0; }

/* 번호표 */
.ticket-page { background: #2a7fd2 url("assets/sky.webp") top center / 100% auto no-repeat; padding: 0 0 76px; }
.ticket-page .light { position: absolute; left: 50%; top: 150px; width: 170%; max-width: none; transform: translateX(-50%); mix-blend-mode: screen; opacity: 0.9; pointer-events: none; }
.done { position: relative; padding: 44px 24px 18px; text-align: center; }
.done h1 { margin: 0; font-size: 30px; font-weight: 200; letter-spacing: -0.03em; }
.ticket { position: relative; width: 78%; margin: 6px auto 0; padding: 22px 22px 20px; border-radius: 18px; background: #fff; color: var(--ink); box-shadow: 0 18px 40px rgba(0, 40, 90, 0.35); transform: rotate(-2deg); }
.ticket.in { animation: tin 0.7s cubic-bezier(0.2, 0.9, 0.3, 1.2) both; }
@keyframes tin { 0% { transform: translateY(60px) rotate(6deg) scale(0.8); opacity: 0; } 100% { transform: rotate(-2deg); opacity: 1; } }
.ticket .ev { font-size: 13px; font-weight: 800; letter-spacing: -0.01em; }
.ticket .no-l { margin-top: 14px; font-size: 12px; font-weight: 700; opacity: 0.6; }
.ticket .no { font-size: 92px; font-weight: 900; line-height: 0.95; letter-spacing: -0.04em; font-variant-numeric: tabular-nums; }
.ticket hr { margin: 16px -22px; border: 0; border-top: 2px dashed rgba(10, 37, 64, 0.25); }
.ticket .nm { font-size: 22px; font-weight: 900; letter-spacing: -0.02em; overflow-wrap: anywhere; }
.ticket .sk { margin-top: 4px; font-size: 15px; font-weight: 600; line-height: 1.45; overflow-wrap: anywhere; }
.ticket .dt { margin-top: 16px; font-size: 13px; font-weight: 800; }
.ticket .dt b { display: inline-block; padding: 2px 8px; border-radius: 6px; background: var(--ink); color: var(--yellow); }
.after { position: relative; padding: 26px 24px 0; font-size: 15px; font-weight: 700; line-height: 1.6; text-align: center; text-shadow: 0 1px 8px rgba(0, 40, 90, 0.5); }
.try { position: relative; margin: 28px 20px 0; padding: 16px; border-radius: 14px; background: rgba(7, 34, 59, 0.72); font-size: 13px; }
.try label { display: block; margin-top: 10px; font-weight: 700; }
.try input { width: 100%; min-height: 44px; margin-top: 4px; padding: 0 12px; border: 0; border-radius: 8px; font: inherit; font-size: 16px; }

/* 고르기 */
.pick { padding: 36px 22px; }
.pick h1 { margin: 0 0 6px; font-size: 26px; font-weight: 900; letter-spacing: -0.02em; }
.pick p { margin: 0 0 22px; font-size: 14px; line-height: 1.6; opacity: 0.85; }
.pick a.opt { display: block; margin-bottom: 14px; padding: 18px 18px 16px; border-radius: 16px; background: rgba(255, 255, 255, 0.1); text-decoration: none; }
.pick a.opt b { display: block; color: var(--yellow); font-size: 19px; font-weight: 900; }
.pick a.opt span { display: block; margin-top: 4px; font-size: 14px; line-height: 1.55; }
.pick ul { margin: 18px 0 0; padding-left: 18px; font-size: 13px; line-height: 1.7; opacity: 0.8; }

#confetti { position: fixed; inset: 0; z-index: 30; width: 100%; height: 100%; pointer-events: none; }

@media (prefers-reduced-motion: reduce) {
  .person, .shout, .bubble, .hint, .ring, .ticket, .subject .box-front { animation: none !important; }
  .person.sunk { transform: none; }
}
