:root { color: #312d2a; background: #fbf7f2; font: 18px/1.5 system-ui, sans-serif; }
body { margin: 0; }
[hidden] { display: none !important; }
main { box-sizing: border-box; margin: auto; max-width: 48rem; min-height: 100vh; padding: 4rem 1.5rem; }
header { text-align: center; }
h1 { font-size: clamp(2.5rem, 8vw, 5rem); margin: 0; }
h2 { margin-top: 3rem; }
form { display: grid; gap: .75rem; max-width: 22rem; margin: 2rem auto; }
input, button, .button { border: 1px solid #312d2a; border-radius: .25rem; font: inherit; padding: .65rem .9rem; }
button, .button { background: #312d2a; color: #fff; cursor: pointer; text-align: center; text-decoration: none; }
.link { background: none; border: 0; color: inherit; padding: 0; text-decoration: underline; }
.error { color: #9d2020; }
iframe { border: 0; height: 28rem; width: 100%; }
.start { display: flex; flex-wrap: wrap; gap: .75rem; justify-content: center; margin: 3rem 0; }
.minigame { background: #fff; border: 1px solid #d9cec4; border-radius: 1rem; padding: 1rem; position: relative; }
.minigame h2 { margin: 0; padding-right: 3rem; }
.mobile-device-notice { margin: auto; max-width: 32rem; text-align: center; }
.mobile-device-notice h2 { padding-right: 0; }
.mobile-device-notice a { overflow-wrap: anywhere; }
.memory-board { display: grid; gap: .5rem; grid-template-columns: repeat(4, 1fr); }
.memory-card { aspect-ratio: 1; background: #fff; overflow: hidden; padding: 0; position: relative; }
.memory-card::after { align-items: center; backface-visibility: hidden; background: #312d2a; content: "?"; display: flex; font-size: 2rem; inset: 0; justify-content: center; position: absolute; }
.memory-card img { background: #fff; display: block; height: 100%; object-fit: contain; width: 100%; }
.memory-card.revealed, .memory-card.matched { animation: card-flip .35s ease; }
.memory-card.revealed::after, .memory-card.matched::after { visibility: hidden; }
.memory-card.matched { border: 3px solid #2e7d32; cursor: default; }
.memory-status { min-height: 1.5em; text-align: center; }
.memory-continue { display: block; margin: 0 auto; }
.quiz-progress { color: #6b625b; }
.quiz-question { font-size: 1.25rem; }
.quiz-description { background: #f3eee8; border-left: .25rem solid #6b625b; padding: .75rem 1rem; }
.quiz-options { display: grid; gap: .75rem; }
.quiz-options button { text-align: left; }
.quiz-options button.correct { background: #2e7d32; }
.quiz-options button.wrong { background: #9d2020; }
.quiz-status { min-height: 1.5em; }
.quiz-navigation { display: flex; justify-content: space-between; }
.geoguesser-view, .geoguesser-map { height: 24rem; margin-top: 1rem; }
.geoguesser-streetview { height: 100%; width: 100%; }
.geoguesser-submit { display: block; margin: 1rem auto 0; }
.geoguesser-status { min-height: 1.5em; text-align: center; }
.quest { align-items: center; display: grid; max-width: 64rem; }
.quest > * { grid-area: 1 / 1; width: 100%; }
.quest-scene { align-content: center; display: grid; gap: 2rem; justify-items: center; min-height: calc(100vh - 8rem); width: 100%; }
.quest-chest { background: none; border: 0; margin: auto; max-width: 32rem; padding: 0; width: 100%; }
.quest-scene.with-chest .quest-chest { grid-row: 1; }
.quest-scene.with-chest .quest-chat { grid-row: 2; }
.quest-chest img { display: block; width: 100%; }
.quest-chest.rattle { animation: chest-rattle .45s; }
.quest-chest img.unlocking { animation: chest-unlock 3s; }
.quest-chest.openable:is(:hover, :focus-visible) img { animation: chest-pop .25s ease-out forwards; }
.quest-chest.openable:active img { animation: chest-press .12s ease-out forwards; }
.quest-chat { align-items: center; column-gap: 2.5rem; display: grid; filter: drop-shadow(0 .25rem .25rem #0003); grid-template-columns: 9rem minmax(12rem, 28rem); height: 16rem; justify-content: center; max-width: 42rem; width: 100%; }
.quest-chat.empty { visibility: hidden; }
.quest-speaker { image-rendering: pixelated; justify-self: center; max-height: 12rem; max-width: 100%; }
.quest-bubble { align-self: center; background: #fff; border: 3px solid #312d2a; border-radius: 1rem; min-height: 3rem; padding: 1rem; position: relative; }
.quest-bubble::before { border: .75rem solid transparent; border-right-color: #312d2a; content: ""; left: -1.5rem; position: absolute; top: 50%; transform: translateY(-50%); }
.quest-chat.awaiting-advance .quest-bubble::after { animation: dialogue-prompt 1s infinite alternate; bottom: .2rem; content: "▼"; font-size: .65rem; position: absolute; right: .5rem; }
.quest-game { margin: auto; max-width: 48rem; }
.quest-overlay { background: transparent; border: 0; max-height: 90vh; max-width: min(90vw, 36rem); overflow: visible; padding: 0; }
.quest-overlay::backdrop { background: #000a; }
.quest-overlay img { display: block; max-height: 90vh; max-width: 100%; }
.quest-overlay-close { border-radius: 50%; font-size: 2rem; height: 3rem; line-height: 1; padding: 0; position: absolute; right: -1.5rem; top: -1.5rem; width: 3rem; }
.quest-choices { background: #fbf7f2; box-shadow: 0 -.25rem 1rem #0003; box-sizing: border-box; display: grid; gap: .75rem; left: 0; padding: 1.5rem max(1.5rem, calc((100vw - 61rem) / 2)); position: fixed; right: 0; bottom: 0; z-index: 10; }
.quest-gold button { aspect-ratio: 1; background: transparent; border: 0; display: grid; padding: 0; place-items: center; width: min(80vw, 32rem); }
.quest-gold { width: auto; }
.quest-gold::backdrop { background: rgb(0 0 0 / 55%); }
.quest-gold img { grid-area: 1 / 1; }
.quest-gold-glow { pointer-events: none; }
.quest-gold-glow-one { animation: gold-glow-spin 18s linear infinite; width: 100%; }
.quest-gold-pouch { position: relative; transform: translateX(30px); width: 55%; z-index: 1; }
.quest-gold button:is(:hover, :focus-visible) .quest-gold-pouch { animation: gold-pouch-pop .25s ease-out forwards; }
.captcha { margin: auto; max-width: 28rem; padding: 0; overflow: hidden; }
.captcha-prompt { background: #2879d0; color: #fff; padding: 1.25rem; }
.captcha-prompt h2, h3, h4 { margin: 0; }
.captcha-prompt p { margin: 0; }
.captcha-prompt strong { color: #81c784; }
.captcha-board { display: grid; gap: .35rem; grid-template-columns: repeat(4, 1fr); padding: 1rem; }
.captcha-tile { aspect-ratio: 1; background: #fff; border-color: #bbb; border-radius: 0; padding: 0; position: relative; }
.captcha-tile.lit { background: var(--tile-color); }
.captcha-tile.selected { border: .55rem solid #fff; }
.captcha-tile.selected::after { background: #2879d0 url("checkmark-white.svg") center / 65% no-repeat; border-radius: 50%; content: ""; height: 1.6rem; position: absolute; right: -.45rem; top: -.45rem; width: 1.6rem; }
.captcha.waldo { margin-top: 1rem; max-width: 44rem; }
.captcha-board.waldo { aspect-ratio: 1400 / 760; background: url("waldo.png") center / 100% 100%; gap: 1px; grid-template-columns: repeat(var(--columns), 1fr); grid-template-rows: repeat(var(--rows), 1fr); padding: 0; }
.captcha-board.waldo .captcha-tile { aspect-ratio: auto; background: transparent; border: 1px solid #fff9; }
.captcha-board.waldo .captcha-tile.selected { border: .55rem solid #fff; }
.captcha-footer { align-items: center; background: #f3f3f3; border-top: 1px solid #ddd; display: flex; justify-content: space-between; padding: .75rem 1rem; }
.captcha-footer small { color: #777; }
.captcha-verify { background: #2879d0; border: 0; border-radius: .15rem; box-shadow: 0 1px 2px #0004; font-size: .8rem; font-weight: 600; text-transform: uppercase; }
.captcha-verify:disabled { background: #aaa; cursor: default; }
.captcha-verify.wiggle { animation: captcha-wiggle .4s; }
.no-robot-captcha { background: none; border: 0; margin: auto; max-width: 20rem; overflow: hidden; padding: 0; width: 100%; }
.no-robot-challenge { align-items: center; background: #fafafa; border: 2px solid #d5d5d5; border-radius: 1rem; color: #111; display: grid; gap: .75rem; grid-template-columns: 1.75rem 1fr 3rem; padding: 1rem .75rem; text-align: left; width: 100%; }
.no-robot-state { border: 2px solid #bbb; box-sizing: border-box; height: 1.65rem; position: relative; width: 1.65rem; }
.no-robot-brand { line-height: .7; text-align: center; }
.no-robot-brand img { height: 2rem; width: 2rem; }
.no-robot-brand small { color: #777; display: block; font-size: .5rem; line-height: 1.5; }
.no-robot-captcha.loading .no-robot-challenge { color: #999; cursor: wait; }
.no-robot-captcha.loading .no-robot-state { animation: captcha-spin .8s linear infinite; border-color: #b5d3ff transparent transparent; border-radius: 50%; }
.no-robot-captcha.failed .no-robot-state { border: 0; }
.no-robot-captcha.failed .no-robot-state::before, .no-robot-captcha.failed .no-robot-state::after { animation: captcha-draw-x .2s forwards; background: #e22; content: ""; height: 3px; left: 0; position: absolute; top: .75rem; transform: rotate(45deg) scaleX(0); width: 1.75rem; }
.no-robot-captcha.failed .no-robot-state::after { animation-delay: .15s; transform: rotate(-45deg) scaleX(0); }
.no-robot-captcha.passed .no-robot-state { background: #35a853 url("checkmark-white.svg") center / 70% no-repeat; border: 0; }
.popup-ad { cursor: move; max-width: min(250px, 85vw); position: fixed; touch-action: none; user-select: none; z-index: 1000; }
.popup-ad > a, .popup-ad-media { display: block; max-width: 100%; }
.popup-ad-media { max-height: calc(100vh - 24px); object-fit: contain; }
.popup-ad > button { background: #fff; border-radius: 50%; color: #312d2a; font-size: .8rem; height: 1.4rem; opacity: 0; padding: 0; position: absolute; right: .25rem; top: .25rem; transition: opacity .15s; width: 1.4rem; }
.popup-ad:hover > button, .popup-ad:focus-within > button { opacity: 1; }
.popup-ad-comment { align-items: start; display: flex; filter: drop-shadow(0 .2rem .2rem #0004); left: 50%; position: absolute; top: calc(100% + .5rem); transform: translateX(-50%); width: max-content; }
.popup-ad-comment img { image-rendering: pixelated; max-height: 3rem; }
.popup-ad-comment p { background: #fff; border: 3px solid #312d2a; border-radius: .75rem; box-sizing: border-box; margin: 0 0 3rem .5rem; max-width: 15rem; min-height: 1.5em; padding: .6rem .8rem; }
@keyframes card-flip { 50% { transform: rotateY(90deg); } }
@keyframes chest-rattle { 25% { transform: rotate(-2deg) translateX(-.35rem); } 75% { transform: rotate(2deg) translateX(.35rem); } }
@keyframes chest-unlock { 50% { filter: brightness(1.5); transform: scale(1.04); } }
@keyframes chest-pop { 65% { transform: scale(1.035) translateY(-.2rem); } 100% { transform: scale(1.02) translateY(-.1rem); } }
@keyframes chest-press { to { transform: scale(.98); } }
@keyframes dialogue-prompt { to { transform: translateY(.15rem); } }
@keyframes gold-glow-spin { to { transform: rotate(360deg); } }
@keyframes gold-pouch-pop { 65% { transform: translateX(30px) scale(1.07) translateY(-.25rem); } 100% { transform: translateX(30px) scale(1.04) translateY(-.12rem); } }
@keyframes captcha-wiggle { 25% { transform: translateX(-.4rem); } 50% { transform: translateX(.4rem); } 75% { transform: translateX(-.2rem); } }
@keyframes captcha-spin { to { transform: rotate(360deg); } }
@keyframes captcha-draw-x { to { transform: rotate(45deg) scaleX(1); } }
@keyframes captcha-draw-x-reverse { to { transform: rotate(-45deg) scaleX(1); } }
.no-robot-captcha.failed .no-robot-state::after { animation-name: captcha-draw-x-reverse; }
@media (max-width: 40rem) {
  .quest-chat { column-gap: 1.75rem; grid-template-columns: minmax(5rem, 7rem) minmax(10rem, 1fr); height: 18rem; }
}
@media (prefers-reduced-motion: reduce) { .memory-card.revealed, .memory-card.matched, .captcha-verify.wiggle, .no-robot-captcha.loading .no-robot-state, .quest-chest.rattle, .quest-chest img.unlocking, .quest-chest.openable:is(:hover, :focus-visible, :active) img, .quest-bubble::after, .quest-gold-glow, .quest-gold button:is(:hover, :focus-visible) .quest-gold-pouch { animation: none; } }
@media (hover: none) { .popup-ad > button { opacity: 1; } }
