/* 만만재 만두 빚기: 기존 색과 글꼴을 사용하는 체험용 게임 */
.game-invite [hidden], .mandu-game [hidden] { display: none !important; }
.game-invite { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px 16px; align-items: center; padding: 32px 24px; margin-top: 16px; background: var(--color-card); border: 1px solid var(--color-wood); border-top: 4px solid var(--color-wood-dark); border-radius: var(--radius); }
.game-invite-art { display: block; min-width: 0; width: 160px; justify-self: center; }
.game-invite-art .mandu-art { display: block; height: auto; }
.game-invite-copy { display: flex; flex-direction: column; gap: 8px; text-align: center; }
.game-invite-copy h3 { font-family: var(--font-serif); font-size: 28px; font-weight: 600; line-height: 1.5; letter-spacing: -.03em; }
.game-invite-actions { grid-column: 1 / -1; display: flex; flex-direction: column; align-items: stretch; gap: 8px; }
.game-entry { height: auto; min-height: 80px; padding: 16px 24px; line-height: 1.6; white-space: normal; text-align: left; position: relative; justify-content: flex-start; }
.game-entry > span { position: absolute; right: 16px; top: 16px; }
@media (min-width: 700px) { .game-invite { grid-template-columns: 180px minmax(0, 1fr); padding: 40px; gap: 32px; } .game-invite-art { width: 100%; } .game-invite-copy { text-align: left; } .game-invite-copy h3 { font-size: 32px; } .game-invite-actions { max-width: 440px; width: 100%; justify-self: center; } }
@media (min-width: 1120px) { .game-invite { grid-template-columns: 160px minmax(0, 1fr) 320px; gap: 32px; } .game-invite-actions { grid-column: auto; } }

@media (max-width: 359.98px) { .game-invite-art { width: 128px; } }

.mandu-game { padding: 0; border: 1px solid var(--color-wood); border-radius: 4px; width: min(620px, calc(100% - 32px)); max-width: none; max-height: calc(100dvh - 32px); margin: auto; background: var(--color-bg); color: var(--color-ink); overflow: hidden; }
.game-shell { display: flex; flex-direction: column; max-height: calc(100dvh - 34px); }
.mandu-game::backdrop { background: var(--color-line); }
.game-dialog-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 24px; border-bottom: 1px solid var(--color-line); background: var(--color-bg); position: relative; flex: none; z-index: 2; }
.game-dialog-brand { display: flex; align-items: center; gap: 8px; }
.game-dialog-brand h2 { font-family: var(--font-serif); font-size: 20px; font-weight: 600; }
.game-dialog-brand img { width: 32px; height: auto; }
.game-close { width: 40px; height: 40px; padding: 8px; display: grid; place-items: center; border: 1px solid var(--color-line); border-radius: 4px; background: transparent; cursor: pointer; }
.game-close:hover { background: var(--color-line); }
.game-close svg { width: 24px; height: 24px; fill: none; stroke: var(--color-ink); stroke-width: 1.5; }
.game-body { padding: 16px 32px 24px; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
.game-demo-label { color: var(--color-ink-sub); font-size: 12px; text-align: center; }
.game-scene { position: relative; isolation: isolate; height: 192px; display: flex; align-items: center; justify-content: center; }
.mandu-art { width: 100%; max-width: 400px; height: 100%; overflow: visible; }
.art-crease { fill: none; stroke: #C5985F; stroke-width: 1.7; stroke-linecap: round; }
.art-steam { fill: none; stroke: #C2A780; stroke-width: 3; stroke-linecap: round; opacity: .65; }
.art-hands, .art-flour, .art-spark { opacity: 0; }
.art-food { transform-origin: 240px 192px; }
.art-food-shadow { transform-origin: 240px 194px; }
[data-folds="0"] .art-filling, [data-folds="0"] .art-fold, [data-folds="1"] .art-fold, [data-folds="0"] .art-steam, [data-folds="1"] .art-steam, [data-folds="2"] .art-steam, [data-folds="3"] .art-steam, [data-folds="4"] .art-steam { display: none; }
[data-folds="2"] .art-dough, [data-folds="3"] .art-dough, [data-folds="4"] .art-dough, [data-folds="5"] .art-dough, [data-folds="2"] .art-filling, [data-folds="3"] .art-filling, [data-folds="4"] .art-filling, [data-folds="5"] .art-filling { display: none; }
[data-folds="2"] .art-pleat, [data-folds="3"] .art-pleat-two, [data-folds="3"] .art-pleat-three, [data-folds="4"] .art-pleat-three { display: none; }
.game-intro, .game-result { display: flex; flex-direction: column; align-items: stretch; text-align: center; gap: 16px; }
.game-intro h3, .game-result h3 { font-family: var(--font-serif); font-size: 32px; font-weight: 600; line-height: 1.4; letter-spacing: -.04em; }
.game-intro > .label { margin-top: -8px; }
.game-rules { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px 16px; padding: 16px 0; border-top: 1px solid var(--color-line); border-bottom: 1px solid var(--color-line); font-size: 14px; }
.game-wide { width: 100%; gap: 16px; min-height: 48px; height: auto; padding: 12px 16px; white-space: normal; }
.game-help { font-size: 12px; color: var(--color-ink-sub); line-height: 1.6; }
.game-steps { display: flex; gap: 8px; margin-bottom: 24px; font-size: 14px; }
.game-steps li { flex: 1; padding-bottom: 8px; border-bottom: 2px solid var(--color-line); color: var(--color-ink-sub); }
.game-steps .is-active { border-color: var(--color-wood-dark); color: var(--color-wood-dark); font-weight: 600; }
.game-steps .is-done { border-color: var(--color-wood); }
.game-round-heading { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; }
.game-round-heading h3 { font-family: var(--font-serif); font-size: 28px; font-weight: 600; letter-spacing: -.04em; }
.game-round-heading > span { font-size: 14px; color: var(--color-ink-sub); }
.game-round-meta { display: flex; justify-content: space-between; gap: 16px; margin: 8px 0 24px; color: var(--color-ink-sub); font-size: 14px; font-variant-numeric: tabular-nums; }
.timing-meter { height: 64px; position: relative; }
.timing-track { position: absolute; inset: 12px 0; border: 1px solid var(--color-line); border-radius: 4px; background: var(--color-card); }
.timing-target { position: absolute; width: 30%; left: 35%; top: 12px; height: 40px; border-left: 2px solid var(--color-wood-dark); border-right: 2px solid var(--color-wood-dark); background: var(--color-wood); }
.timing-perfect { position: absolute; inset: 0 36%; background: var(--color-wood-dark); }
.timing-cursor { position: absolute; left: 6%; top: -8px; width: 20px; height: 80px; margin-left: -10px; will-change: left; pointer-events: none; }
.timing-cursor svg { width: 100%; height: 100%; fill: var(--color-ink); }
.timing-cursor path:nth-child(2) { stroke: var(--color-ink); stroke-width: 3; }
.timing-labels { display: flex; justify-content: space-between; margin-top: 8px; color: var(--color-ink-sub); font-size: 12px; }
.timing-labels span:nth-child(2) { color: var(--color-wood-dark); font-weight: 600; }
.game-feedback { min-height: 56px; display: flex; align-items: center; justify-content: center; text-align: center; font-size: 16px; font-weight: 600; color: var(--color-wood-dark); }
.game-hit { min-height: 64px; font-size: 20px; touch-action: manipulation; user-select: none; }
.game-hit:disabled { cursor: default; color: var(--color-card); }
.game-hit kbd { border: 1px solid var(--color-card); border-radius: 4px; padding: 4px 8px; font-family: var(--font-sans); font-size: 12px; font-weight: 400; }
.game-play-footer { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-top: 16px; }
.game-play-footer .btn-text { flex: none; min-height: 40px; font-size: 14px; }
.game-coupon { text-align: left; background: var(--color-card); border: 1px solid var(--color-wood); border-radius: 4px; padding: 32px; display: flex; flex-direction: column; gap: 16px; }
.coupon-top { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.coupon-top img { width: 40px; height: auto; }
.game-coupon h3 { font-family: var(--font-sans); font-size: 56px; line-height: 1.1; margin: 8px 0; }
.game-coupon h3 > span { font-size: 24px; margin-left: 8px; white-space: nowrap; }
.game-coupon > p:not(.label) { color: var(--color-ink-sub); }
.coupon-tear { border-top: 1px dashed var(--color-wood); margin: 8px 0; }
.game-coupon > strong { font-size: 14px; font-weight: 600; }
.coupon-sample-code { font-size: 14px; letter-spacing: .12em; }
.game-body:has([data-game-view="coupon"]:not([hidden])) .game-scene { display: none; }
.game-body:has([data-game-view="coupon"]:not([hidden])) .game-demo-label { margin-bottom: 24px; }
@media (max-width: 599.98px) {
  .mandu-game { width: calc(100% - 16px); max-height: calc(100dvh - 16px); }
  .game-shell { max-height: calc(100dvh - 18px); }
  .game-dialog-header { padding: 8px 16px; }
  .game-body { padding: 16px 20px 24px; }
  .game-scene { height: 160px; }
  .game-intro h3, .game-result h3 { font-size: 28px; }
  .game-steps { font-size: 12px; margin-bottom: 16px; }
  .game-round-heading h3 { font-size: 24px; }
  .game-coupon { padding: 24px; }
  .game-coupon h3 { font-size: 48px; }
  .game-coupon h3 > span { font-size: 20px; }
  .game-hit kbd { display: none; }
}
/* The food illustration and press feedback use a richer, localized palette. */
.game-header-actions { display: flex; align-items: center; gap: 8px; }
.game-sound { display: flex; align-items: center; gap: 6px; min-height: 40px; padding: 6px 8px; border: 1px solid var(--color-line); border-radius: 4px; background: transparent; color: var(--color-ink-sub); font: inherit; font-size: 12px; cursor: pointer; }
.game-sound svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.game-sound[aria-pressed="true"] .sound-muted, .game-sound[aria-pressed="false"] .sound-waves { display: none; }
.game-sound:focus-visible { outline: 2px solid var(--color-wood-dark); outline-offset: 3px; }
.game-impact-word { position: absolute; left: 50%; top: 5%; transform: translateX(-50%); padding: 4px 12px; border: 1px solid #D8B781; border-radius: 20px; background: #FFFDF2; color: var(--color-wood-dark); font-family: var(--font-serif); font-weight: 600; font-size: 18px; white-space: nowrap; opacity: 0; pointer-events: none; z-index: 1; }
.game-scene[data-reaction="good"] .game-impact-word, .game-scene[data-reaction="perfect"] .game-impact-word, .game-scene[data-reaction="miss"] .game-impact-word { opacity: 1; }
.game-scene[data-reaction="perfect"] .game-impact-word { color: #70421D; border-color: #C5985F; background: #FFF2CF; }
.game-scene[data-reaction="miss"] .game-impact-word { font-size: 16px; color: var(--color-ink-sub); }
.game-hit { position: relative; box-shadow: 0 4px 0 #49321D, inset 0 1px 0 #BC956B; transition: background-color .12s; }
.game-hit:active { transform: translateY(3px); box-shadow: 0 1px 0 #49321D; }
.timing-impact { position: absolute; left: var(--hit-position, 50%); top: 32px; width: 42px; height: 42px; margin: -21px 0 0 -21px; border: 2px solid #C5985F; border-radius: 50%; opacity: 0; pointer-events: none; z-index: 2; }
.mandu-game[data-feedback="perfect"] .timing-target { background: #C79853; box-shadow: 0 0 0 3px #EBD3A8; }
.mandu-game[data-feedback="perfect"] .game-feedback { color: #70421D; }
@media (max-width: 359.98px) { .game-sound { padding: 6px; } .game-sound span { display: none; } .game-dialog-header { gap: 8px; } }
@media (prefers-reduced-motion: no-preference) {
  .game-scene[data-reaction="good"] .art-food { animation: mandu-knead .62s both; }
  .game-scene[data-reaction="perfect"] .art-food { animation: mandu-perfect .66s both; }
  .game-scene[data-reaction="miss"] .art-food { animation: mandu-miss .36s ease-out; }
  .game-scene:is([data-reaction="good"], [data-reaction="perfect"]) .art-food-shadow { animation: shadow-press .62s ease-out; }
  .game-scene:is([data-reaction="good"], [data-reaction="perfect"]) .art-hands { opacity: 1; }
  .game-scene:is([data-reaction="good"], [data-reaction="perfect"]) .art-hand-left { animation: pinch-left .5s both; }
  .game-scene:is([data-reaction="good"], [data-reaction="perfect"]) .art-hand-right { animation: pinch-right .5s both; }
  .game-scene:is([data-reaction="good"], [data-reaction="perfect"]) .art-flour { opacity: 1; }
  .game-scene:is([data-reaction="good"], [data-reaction="perfect"]) .art-flour circle { animation: flour-puff .55s .08s both; }
  .game-scene[data-reaction="perfect"] .art-spark { animation: sparkle .65s ease-out both; }
  .game-scene:is([data-reaction="good"], [data-reaction="perfect"], [data-reaction="miss"]) .game-impact-word { animation: word-pop .65s both; }
  .game-scene[data-folds="5"] .art-steam path { animation: steam-rise 2.8s ease-in-out infinite; }
  .game-scene[data-folds="5"] .art-steam path:nth-child(2) { animation-delay: -.9s; }
  .game-scene[data-folds="5"] .art-steam path:nth-child(3) { animation-delay: -1.8s; }
  .mandu-game:is([data-feedback="good"], [data-feedback="perfect"]) .timing-impact { animation: impact-ring .5s ease-out both; }
  .mandu-game:is([data-feedback="good"], [data-feedback="perfect"], [data-feedback="miss"]) .game-hit { animation: button-press .2s ease-out; }
  .mandu-game[data-feedback="perfect"] .game-feedback { animation: text-settle .28s ease-out; }
  @keyframes mandu-knead { 0% { transform: scale(1); } 18% { transform: scale(1.11, .82) translateY(3px); } 43% { transform: scale(.96, 1.09) translateY(-5px); } 67% { transform: scale(1.025, .97); } 100% { transform: scale(1); } }
  @keyframes mandu-perfect { 0% { transform: scale(1); } 16% { transform: scale(1.15, .77) translateY(4px); } 40% { transform: scale(.94, 1.12) translateY(-12px) rotate(-2deg); } 62% { transform: scale(1.04, .95) rotate(1deg); } 83% { transform: scale(.99, 1.02); } 100% { transform: scale(1); } }
  @keyframes mandu-miss { 20% { transform: rotate(-3deg) translateX(-3px); } 50% { transform: rotate(2deg) translateX(3px); } 100% { transform: none; } }
  @keyframes shadow-press { 18% { transform: scaleX(1.12); opacity: .8; } 43% { transform: scaleX(.91); opacity: .5; } 100% { transform: scaleX(1); opacity: 1; } }
  @keyframes pinch-left { 0% { opacity: 0; transform: translate(-22px, -28px); } 18%, 36% { opacity: 1; transform: translate(18px, 32px); } 100% { opacity: 0; transform: translate(-22px, -28px); } }
  @keyframes pinch-right { 0% { opacity: 0; transform: translate(22px, -28px); } 18%, 36% { opacity: 1; transform: translate(-18px, 32px); } 100% { opacity: 0; transform: translate(22px, -28px); } }
  @keyframes flour-puff { 0% { opacity: 0; transform: translate(0, 8px) scale(.7); } 22% { opacity: 1; } 100% { opacity: 0; transform: translate(var(--dx), var(--dy)) scale(.4); } }
  @keyframes sparkle { 0%, 18% { opacity: 0; } 35% { opacity: 1; } 100% { opacity: 0; } }
  @keyframes word-pop { 0% { opacity: 0; transform: translate(-50%, 8px) scale(.8); } 26% { opacity: 1; transform: translate(-50%, -2px) scale(1.08); } 45%, 85% { opacity: 1; transform: translate(-50%, 0) scale(1); } 100% { opacity: 0; transform: translate(-50%, -4px); } }
  @keyframes steam-rise { 0%, 100% { opacity: .2; transform: translateY(2px); } 50% { opacity: .75; transform: translateY(-7px); } }
  @keyframes impact-ring { 0% { opacity: .9; transform: scale(.3); } 100% { opacity: 0; transform: scale(2.6); } }
  @keyframes button-press { 30% { transform: translateY(4px); box-shadow: 0 0 0 #49321D; } 100% { transform: translateY(0); } }
  @keyframes text-settle { 0% { transform: translateY(4px); } 100% { transform: translateY(0); } }
}
