/* Original paper stamps floating over a local camera preview. */
body.hunt-open { overflow: hidden; }
.hunt-overlay { position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; padding: 18px; background: rgb(31 23 42 / 72%); overflow: auto; overscroll-behavior: contain; backdrop-filter: blur(7px); }
.hunt-dialog { width: min(100%, 500px); max-height: calc(100vh - 36px); max-height: calc(100dvh - 36px); overflow: auto; background: var(--paper); border: 1px solid rgb(255 255 255 / 60%); border-radius: 28px; box-shadow: 0 24px 90px rgb(17 9 28 / 30%); animation: hunt-enter .3s ease-out; }
.hunt-header { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 22px 22px 10px; }
.hunt-header h2 { margin-top: 4px; font-size: 27px; }
.hunt-mode { font-size: 11px; font-weight: 800; letter-spacing: 1.15px; text-transform: uppercase; color: var(--accent-ink); }
.hunt-close { display: grid; place-items: center; width: 44px; height: 44px; flex-shrink: 0; border: 1px solid var(--line); border-radius: 50%; background: #fff; font-size: 28px; line-height: 1; }
.hunt-count { padding: 0 22px 15px; color: var(--muted); font-size: 13px; font-weight: 700; }
.hunt-stage { position: relative; height: clamp(285px, 43vh, 405px); height: clamp(285px, 43dvh, 405px); margin: 0 12px; overflow: hidden; isolation: isolate; border-radius: 20px; background: #293439; }
.hunt-video { display: block; width: 100%; height: 100%; object-fit: cover; }
.hunt-stage::after { position: absolute; inset: 0; z-index: 1; pointer-events: none; border: 1px solid rgb(255 255 255 / 20%); border-radius: inherit; box-shadow: inset 0 0 80px rgb(11 17 27 / 28%); content: ''; }
.hunt-stage-label { position: absolute; z-index: 2; top: 12px; left: 50%; transform: translateX(-50%); width: max-content; max-width: calc(100% - 24px); padding: 6px 11px; border: 1px solid rgb(255 255 255 / 25%); border-radius: 30px; background: rgb(27 23 42 / 74%); color: #fff; font-size: 10px; font-weight: 700; text-align: center; }
.hunt-targets { position: absolute; inset: 0; z-index: 3; }
.hunt-target { position: absolute; top: var(--hunt-y); left: var(--hunt-x); width: clamp(72px, 21vw, 94px); height: clamp(82px, 24vw, 108px); margin: 0; padding: 0; border: 0; background: transparent; transform: translate(-50%, -50%) rotate(var(--hunt-turn)); filter: drop-shadow(0 7px 10px rgb(25 18 48 / 32%)); animation: hunt-float 3s ease-in-out infinite; animation-delay: var(--hunt-delay); touch-action: manipulation; }
.hunt-target img { display: block; width: 100%; height: 100%; object-fit: contain; pointer-events: none; }
.hunt-target span { position: absolute; right: -2px; bottom: 0; display: grid; place-items: center; width: 29px; height: 29px; border: 2px solid #fff; border-radius: 50%; background: #7456c9; color: #fff; font-size: 21px; font-weight: 800; box-shadow: 0 2px 7px rgb(31 18 40 / 22%); }
.hunt-target:focus-visible { outline-color: #fff; border-radius: 8px; }
.hunt-target:active { filter: drop-shadow(0 0 14px #fde99b); }
.hunt-target:disabled:not(.is-caught) { opacity: .8; }
.hunt-target.is-caught { opacity: .5; animation: hunt-caught .5s ease-out both; }
.hunt-target.is-caught span { background: #356d54; font-size: 17px; }
.hunt-demo-scene { display: none; }
.is-demo .hunt-video { display: none; }
.is-demo .hunt-demo-scene { display: block; position: absolute; inset: 0; background: radial-gradient(ellipse at 8% 95%, #c1d8bd 0 25%, transparent 25.5%), radial-gradient(ellipse at 110% 99%, #99baa8 0 30%, transparent 30.5%), linear-gradient(155deg, #ddd3f5, #fbe7cb); }
.hunt-demo-scene span { position: absolute; color: #8467aa; font-size: 31px; opacity: .5; }
.hunt-demo-scene span:nth-child(1) { top: 17%; left: 49%; }
.hunt-demo-scene span:nth-child(2) { top: 57%; left: 13%; font-size: 24px; }
.hunt-demo-scene span:nth-child(3) { top: 76%; right: 13%; font-size: 43px; color: #fff; }
.hunt-content { padding: 8px 24px 22px; text-align: center; }
.hunt-content h3 { font-size: 23px; letter-spacing: -.4px; }
.hunt-content p { margin: 10px 0 0; color: #6b6171; font-size: 14px; line-height: 1.55; }
.hunt-content .hunt-reward-note { margin: 15px 0 0; padding: 12px 14px; border: 1px solid #e4d6ed; border-radius: 14px; background: #f4edf9; color: #63467d; font-size: 13px; }
.hunt-content .hunt-permission-note { font-size: 12px; }
.hunt-stamp-fan { display: flex; justify-content: center; align-items: center; height: 148px; margin: 12px 0 20px; position: relative; }
.hunt-stamp-fan::before { content: ''; position: absolute; width: 220px; height: 130px; background: radial-gradient(ellipse, #efdfae, #f6efcb 50%, transparent 70%); }
.hunt-stamp-fan img { position: relative; width: 100px; height: 122px; object-fit: contain; filter: drop-shadow(0 7px 7px rgb(59 40 79 / 11%)); }
.hunt-stamp-fan img:nth-child(1) { transform: rotate(-18deg) translate(14px, 3px); }
.hunt-stamp-fan img:nth-child(2) { z-index: 1; transform: translateY(-13px); }
.hunt-stamp-fan img:nth-child(3) { transform: rotate(16deg) translate(-14px, 3px); }
.hunt-celebrate { animation: hunt-award .65s cubic-bezier(.2, .8, .3, 1.25); }
.hunt-actions { display: flex; flex-direction: column; gap: 10px; margin-top: 20px; }
.hunt-primary, .hunt-secondary { display: inline-flex; gap: 9px; align-items: center; justify-content: center; min-height: 48px; padding: 12px 17px; border-radius: 14px; font-size: 14px; font-weight: 800; }
.hunt-primary { background: var(--accent); border: 1px solid var(--accent); box-shadow: 0 4px 0 color-mix(in srgb, var(--accent) 75%, #251c35); color: #fff; }
.hunt-primary:hover { background: var(--accent-hover); }
.hunt-primary:active { transform: translateY(2px); box-shadow: 0 2px 0 var(--accent-hover); }
.hunt-primary svg { width: 21px; height: 21px; }
.hunt-secondary { background: #fff; border: 1px solid var(--line); color: var(--ink); }
.hunt-progress { display: flex; align-items: center; justify-content: center; gap: 9px; margin: 14px 0; }
.hunt-progress span { width: 29px; height: 29px; display: grid; place-items: center; background: #eee7e0; color: #877983; border-radius: 50%; font-weight: 800; }
.hunt-progress span.is-found { background: #d7eadb; color: #305e47; }
.hunt-progress strong { margin-left: 3px; color: var(--muted); font-size: 13px; }
.hunt-scanner { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
.hunt-colour-frame { position: absolute; width: 132px; height: 132px; left: 50%; top: 47%; transform: translate(-50%, -50%); border: 5px solid var(--hunt-colour); border-radius: 50%; box-shadow: 0 0 0 3px #fff, 0 0 0 999px rgb(19 18 28 / 12%); }
.hunt-colour-guidance { position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%); width: min(90%, 250px); padding: 10px 15px; border-radius: 14px; background: rgb(29 24 42 / 84%); color: #fff; text-align: center; font-size: 13px; }
.hunt-scan-meter { display: block; width: 100%; height: 9px; margin-top: 9px; appearance: none; border: 0; border-radius: 8px; overflow: hidden; background: #675e71; accent-color: var(--hunt-colour); }
.hunt-scan-meter::-webkit-progress-bar { background: #675e71; }
.hunt-scan-meter::-webkit-progress-value { background: var(--hunt-colour); border-radius: 8px; }
.hunt-scan-meter::-moz-progress-bar { background: var(--hunt-colour); border-radius: 8px; }
.hunt-content .hunt-light-hint { margin: 0 0 13px; font-size: 11px; }
.hunt-announcement { margin: 8px 18px 0; text-align: center; color: #356349; font-size: 13px; font-weight: 800; }
.hunt-announcement:empty { display: none; }
.hunt-error { margin: 10px 20px; padding: 12px; border: 1px solid #e4bbc1; border-radius: 12px; background: #fff1f2; color: #853746; font-size: 13px; }
.hunt-privacy { margin: 0 22px; padding: 15px 2px 20px; border-top: 1px dashed var(--line); color: #74697b; text-align: center; font-size: 11px; line-height: 1.6; }
@keyframes hunt-enter { from { opacity: 0; transform: translateY(16px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes hunt-float { 0%, 100% { transform: translate(-50%, -50%) rotate(var(--hunt-turn)); } 50% { transform: translate(-50%, calc(-50% - 9px)) rotate(calc(var(--hunt-turn) + 5deg)); } }
@keyframes hunt-caught { 0% { opacity: 1; filter: drop-shadow(0 0 20px #ffe59d); } 40% { opacity: 1; transform: translate(-50%, -50%) scale(1.16); } 100% { opacity: .5; transform: translate(-50%, -50%) scale(.82); } }
@keyframes hunt-award { from { opacity: .3; transform: scale(.6) rotate(-6deg); } to { opacity: 1; transform: none; } }
@media (max-width: 540px) { .hunt-overlay { padding: 8px; } .hunt-dialog { max-height: calc(100vh - 16px); max-height: calc(100dvh - 16px); border-radius: 24px; } .hunt-header { padding: 18px 18px 8px; } .hunt-count { padding-left: 18px; } .hunt-content { padding: 8px 19px 18px; } .hunt-stage { margin: 0 8px; } }
@media (prefers-reduced-motion: reduce) { .hunt-dialog, .hunt-target, .hunt-target.is-caught, .hunt-celebrate { animation: none; } .hunt-primary:active { transform: none; } }
