/* ================= Why 자동 슬라이드 ================= */
.ws { display: grid; grid-template-columns: 1.05fr 1fr; gap: 44px; align-items: stretch; background: #fff; border-radius: 28px; padding: 26px; box-shadow: var(--shadow-lg); }
.ws-stage { position: relative; border-radius: 20px; overflow: hidden; background: #EEF1F8; min-height: 480px; touch-action: pan-y; }
.ws-stage img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center top; opacity: 0; transform: scale(1.08); transition: opacity .8s ease, transform 4.6s ease-out; }
.ws-stage img.on { opacity: 1; transform: scale(1); }
.ws-stage img.contain { object-fit: contain; }
.ws-num { position: absolute; left: 16px; bottom: 16px; background: rgba(16,32,74,.85); color: #fff; font-weight: 800; font-size: 13px; letter-spacing: .08em; padding: 7px 12px; border-radius: 999px; backdrop-filter: blur(4px); }
.ws-side { display: flex; flex-direction: column; padding: 8px 8px 4px 0; }
.ws-bars { display: flex; gap: 6px; margin-bottom: 26px; }
.ws-bars span { flex: 1; height: 4px; border-radius: 99px; background: var(--line); overflow: hidden; }
.ws-bars i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--gold), var(--gold-2)); border-radius: 99px; }
.ws-bars .done i { width: 100%; }
.ws-bars .run i { animation: wsFill var(--dur) linear forwards; }
.ws-bars .hold i { width: 35%; opacity: .6; }
@keyframes wsFill { from { width: 0; } to { width: 100%; } }
.ws-text { min-height: 230px; }
.ws-text > * { opacity: 0; transform: translateY(14px); }
.ws-text.in > * { animation: wsIn .6s cubic-bezier(.2,.8,.2,1) forwards; }
.ws-text.in > :nth-child(2) { animation-delay: .08s; }
.ws-text.in > :nth-child(3) { animation-delay: .16s; }
.ws-text.in > :nth-child(4) { animation-delay: .24s; }
@keyframes wsIn { to { opacity: 1; transform: none; } }
.ws-ic { width: 54px; height: 54px; border-radius: 16px; background: var(--gold-soft); color: var(--gold); display: grid; place-items: center; margin-bottom: 16px; }
.ws-ic svg { width: 28px; height: 28px; }
.ws-text h3 { font-family: var(--serif); font-size: clamp(24px, 2.6vw, 30px); font-weight: 700; }
.ws-text p { color: var(--ink-2); font-size: 16.5px; margin-top: 12px; line-height: 1.75; }
.ws-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.ws-chips span { font-size: 13px; font-weight: 700; padding: 6px 12px; border-radius: 999px; background: var(--navy-soft); color: var(--navy); }
.ws-list { margin-top: auto; padding-top: 18px; border-top: 1px solid var(--line); display: grid; grid-template-columns: 1fr 1fr; gap: 2px 14px; }
.ws-list button { width: 100%; text-align: left; border: 0; background: none; padding: 8px 6px; border-radius: 8px; font-size: 14px; font-weight: 600; color: var(--ink-3); display: flex; gap: 8px; transition: color .2s, background .2s; }
.ws-list button span { font-weight: 800; color: var(--line); transition: color .2s; }
.ws-list button:hover { background: var(--cream); color: var(--ink); }
.ws-list button.on { color: var(--navy); }
.ws-list button.on span { color: var(--gold); }
.ws-nav { display: flex; gap: 8px; margin-top: 14px; }
.ws-nav button { width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--line); background: #fff; font-size: 22px; color: var(--navy); display: grid; place-items: center; transition: background .2s, transform .15s; }
.ws-nav .ws-play { font-size: 12px; }
.ws-nav button:hover { background: var(--cream); transform: scale(1.06); }
@media (max-width: 900px) {
  .ws { grid-template-columns: 1fr; padding: 14px; gap: 18px; border-radius: 22px; }
  .ws-stage { min-height: 0; aspect-ratio: 1 / 1; }
  .ws-side { padding: 0 6px 6px; }
  .ws-bars { order: -1; margin-bottom: 18px; }
  .ws-text { min-height: 250px; }
  .ws-list { display: none; }
  .ws-nav { justify-content: center; margin-top: 18px; }
}

/* ================= 원료 발견 게임 ================= */
.fg-bar { display: grid; grid-template-columns: auto 1fr auto; gap: 18px; align-items: center; max-width: 880px; margin: -18px auto 34px; padding: 16px 20px; border-radius: 18px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.16); backdrop-filter: blur(6px); }
.bg-cream .fg-bar { background: #fff; border-color: var(--line); }
.fg-info { display: flex; gap: 12px; align-items: center; }
.fg-ico { font-size: 28px; animation: wiggle 2.4s ease-in-out infinite; display: inline-block; }
.fg-info b { display: block; font-size: 15px; }
.fg-count { font-size: 13px; opacity: .8; }
.fg-count em { font-style: normal; font-weight: 900; color: var(--gold-2); font-size: 16px; display: inline-block; }
.bg-cream .fg-count em { color: var(--gold); }
.fg-count em.pop { animation: pop .5s cubic-bezier(.3,1.8,.5,1); }
.fg-prog { height: 10px; border-radius: 99px; background: rgba(255,255,255,.15); overflow: hidden; }
.bg-cream .fg-prog { background: var(--cream); }
.fg-prog span { display: block; height: 100%; width: 0; border-radius: 99px; background: linear-gradient(90deg, var(--gold), var(--gold-2), #FFE6A6); background-size: 200% 100%; animation: shimmer 2s linear infinite; transition: width .6s cubic-bezier(.2,.8,.2,1); }
.fg-rand { border: 0; border-radius: 999px; padding: 11px 18px; font-weight: 800; font-size: 14px; background: var(--gold-2); color: var(--navy); transition: transform .15s; }
.fg-rand:hover { transform: scale(1.05) rotate(-2deg); }
.fg-rand:active { transform: scale(.95); }
.fg-bar.complete { border-color: var(--gold-2); box-shadow: 0 0 0 3px rgba(217,184,115,.35); }
.fg-bar.complete .fg-ico { animation: none; }
@keyframes wiggle { 0%, 100% { transform: rotate(0); } 15% { transform: rotate(-14deg); } 30% { transform: rotate(10deg); } 45% { transform: rotate(0); } }
@keyframes pop { 0% { transform: scale(1); } 40% { transform: scale(1.8); } 100% { transform: scale(1); } }
@keyframes shimmer { to { background-position: -200% 0; } }
@media (max-width: 760px) {
  .fg-bar { grid-template-columns: 1fr auto; gap: 12px; margin-top: -10px; }
  .fg-prog { grid-column: 1 / -1; grid-row: 2; }
}

/* 카드 상태 */
.fc.roll .fc-front { box-shadow: 0 0 0 4px var(--gold-2), 0 20px 50px rgba(0,0,0,.25); }
.fc.roll { transform: translateY(-10px) scale(1.03) !important; transition: transform .12s ease !important; }
.fc.found .fc-front::after { content: "✓ 발견"; position: absolute; right: 16px; bottom: 16px; background: var(--gold); color: #fff; font-size: 12px; font-weight: 800; padding: 4px 10px; border-radius: 999px; animation: pop .5s cubic-bezier(.3,1.8,.5,1); }
.fc:not(.flipped):not(.found) .fc-hint { animation: nudge 1.8s ease-in-out infinite; }
@keyframes nudge { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
.fg-p { position: fixed; z-index: 90; font-size: 24px; pointer-events: none; }
.fg-c { position: fixed; top: 0; z-index: 90; width: 9px; height: 14px; border-radius: 2px; pointer-events: none; }

.fg-done { max-width: 880px; margin: 30px auto 0; display: grid; grid-template-columns: auto 1fr auto; gap: 18px; align-items: center; padding: 22px 26px; border-radius: 20px;
  background: linear-gradient(120deg, #FFF8E8, #fff); color: var(--ink); box-shadow: 0 20px 50px rgba(0,0,0,.25); animation: doneIn .7s cubic-bezier(.3,1.5,.5,1); }
.fg-done b { font-size: 19px; }
.fg-done p { color: var(--ink-2); font-size: 14.5px; }
.fg-trophy { font-size: 44px; animation: bob 2s ease-in-out infinite; }
.fg-cta { display: flex; gap: 8px; flex-wrap: wrap; }
@keyframes doneIn { from { opacity: 0; transform: translateY(20px) scale(.9); } to { opacity: 1; transform: none; } }
@media (max-width: 760px) { .fg-done { grid-template-columns: 1fr; text-align: center; justify-items: center; } .fg-cta { justify-content: center; } }
@media (prefers-reduced-motion: reduce) { .ws-stage img, .ws-text > *, .fg-ico, .fc-hint, .fg-trophy, .fg-prog span { animation: none !important; transition: none !important; opacity: 1; transform: none; } }

@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
