/* Treasure Hunt UAT 1.0. Entirely scoped. No styles affect standard museum UI. */
#mtn-quest-entry{display:flex;gap:.6rem;align-items:center;flex-wrap:wrap;justify-content:flex-end;margin:0 0 .75rem}
#mtn-quest-entry button,.mtn-quest-primary{font:inherit;cursor:pointer;background:#e9c78e;color:#162839;border:1px solid #f2d9ae;border-radius:.65rem;padding:.65rem 1rem;text-decoration:none;font-weight:700;display:inline-flex;align-items:center;justify-content:center;text-align:center}
#mtn-quest-entry .mtn-quest-new-btn{background:transparent;color:inherit;border:1px solid currentColor}
#mtn-quest-intro{color:#e9f0f3;background:#102535;border:1px solid #d4b480;border-radius:1.2rem;width:min(90vw,615px);max-height:88dvh;overflow:auto;padding:0;box-shadow:0 20px 75px #0009}
#mtn-quest-intro::backdrop{background:#020c15c9;backdrop-filter:blur(3px)}
#mtn-quest-intro .mtn-quest-intro-inner{padding:clamp(1.2rem,3vw,2rem);position:relative}
#mtn-quest-intro .mtn-quest-cross{position:absolute;right:.75rem;top:.75rem;background:transparent;border:1px solid #c6d9e1;color:#f5fbfc;border-radius:.4rem;font-size:1.5rem;padding:0 .5rem;cursor:pointer}
#mtn-quest-intro .mtn-quest-kicker{font-size:.73rem;letter-spacing:.17em;color:#f4cf90;font-weight:700}
#mtn-quest-intro h2{font-size:clamp(1.5rem,4vw,2.3rem);line-height:1.15;margin:.6rem 1rem 1rem 0;color:#fff}
#mtn-quest-intro p{line-height:1.6}
#mtn-quest-intro fieldset{border:1px solid #637987;border-radius:.7rem;margin:1.05rem 0;padding:1rem}
#mtn-quest-intro legend{font-weight:700;padding:0 .35rem;color:#f2cd87}
#mtn-quest-intro fieldset>label{display:block;padding:.28rem 0;cursor:pointer}
#mtn-quest-intro input{accent-color:#ddba77}
#mtn-quest-intro .mtn-quest-avatars{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:.5rem}
#mtn-quest-intro .mtn-avatar-option{display:flex;flex-direction:column;align-items:center;gap:.45rem;border:1px solid #637987;border-radius:.65rem;padding:.55rem;text-align:center;cursor:pointer;font-size:.9rem}
#mtn-quest-intro .mtn-avatar-symbol{font-size:2.2rem;color:#efcc8c}
#mtn-quest-intro .mtn-avatar-option:has(input:checked){border-color:#f3cf8d;background:#354b5d}
#mtn-quest-intro .mtn-quest-privacy{font-size:.83rem;color:#b6c7d0}
#mtn-quest-intro .mtn-quest-modal-actions{display:flex;align-items:center;gap:1rem;flex-wrap:wrap}
#mtn-quest-intro .mtn-quest-modal-actions button:not(.mtn-quest-primary){color:#fff;border:1px solid #90a6b4;background:transparent;border-radius:.6rem;padding:.65rem 1rem;cursor:pointer}
#mtn-quest-hud{--q-color:#edcb92;color:#eaf3f7;background:#112a3bef;border:1px solid #c3a678;border-radius:.8rem;position:fixed;right:max(12px,env(safe-area-inset-right));top:clamp(80px,11dvh,125px);z-index:8500;width:min(350px,calc(100vw - 24px));box-shadow:0 14px 50px #0008;font-size:.92rem;line-height:1.5;max-height:calc(100dvh - 100px);display:flex;flex-direction:column;overflow:hidden}
#mtn-quest-hud button,#mtn-quest-hud a{font:inherit;cursor:pointer}
#mtn-quest-hud .mtn-quest-hud-head{display:flex;gap:.6rem;align-items:center;justify-content:space-between;background:#18384a;color:#fff;border:none;width:100%;padding:.7rem .85rem;font-weight:700;text-align:start}
#mtn-quest-hud .mtn-quest-progress-n{white-space:nowrap;color:#f9d395}
#mtn-quest-hud .mtn-quest-hud-body{padding:.85rem 1rem 1rem;overflow-y:auto;overscroll-behavior:contain}
#mtn-quest-hud .mtn-quest-hud-body[hidden]{display:none}
#mtn-quest-hud .mtn-quest-progress-track{background:#435c66;height:5px;border-radius:6px;overflow:hidden;margin-bottom:.8rem}
#mtn-quest-hud .mtn-quest-progress-track span{display:block;background:#edca87;height:100%}
#mtn-quest-hud .mtn-quest-step-label{display:block;color:#f3d5a3;font-size:.8rem}
#mtn-quest-hud h3{font-size:1.15rem;color:#fff;line-height:1.2;margin:.55rem 0}
#mtn-quest-hud h4{font-size:1rem;line-height:1.4;color:#fff;margin:.85rem 0 .55rem}
#mtn-quest-hud p{line-height:1.55;margin:.65rem 0}
#mtn-quest-hud .mtn-quest-primary{width:100%;margin:.6rem 0;color:#102333}
#mtn-quest-hud .mtn-quest-answers{display:grid;gap:.45rem}
#mtn-quest-hud .mtn-quest-answers button{color:#eef4f5;background:#203f52;border:1px solid #7893a1;text-align:start;padding:.65rem .8rem;border-radius:.5rem;cursor:pointer}
#mtn-quest-hud .mtn-quest-answers button:hover{border-color:#eed299;background:#2f5365}
#mtn-quest-hud .mtn-quest-hint,#mtn-quest-hud .mtn-quest-hud-foot button{color:#f3d29d;border:0;background:transparent;text-decoration:underline;padding:.4rem 0}
#mtn-quest-hud .mtn-quest-feedback{border-left:3px solid #efd092;padding-left:.55rem;color:#f4dfb2}
#mtn-quest-hud .mtn-quest-hud-foot{border-top:1px solid #526d7a;margin-top:.9rem;padding-top:.5rem;display:grid;gap:.25rem}
#mtn-quest-hud .mtn-quest-hud-foot span{font-size:.72rem;color:#aec6cc}
#mtn-quest-hud .mtn-quest-key{color:#f6d493;text-align:center;font-size:2.8rem;letter-spacing:.1em}
#mtn-quest-hud .mtn-quest-motto{text-align:center;font-weight:700;color:#f2d6a8}
#mtn-quest-hud .mtn-quest-reward button{background:#efca91;color:#14273a;border:0;border-radius:.45rem;padding:.65rem;display:block;width:100%}
#mtn-quest-hud .mtn-quest-reward a{display:block;color:#e9d0a8;text-align:center;margin-top:.7rem}
#mtn-quest-entry :focus-visible,#mtn-quest-intro :focus-visible,#mtn-quest-hud :focus-visible{outline:3px solid #f8dfa3;outline-offset:3px}
@media(max-width:779px){#mtn-quest-hud{top:auto;bottom:max(10px,env(safe-area-inset-bottom));right:10px;max-height:48dvh;width:min(330px,calc(100vw - 20px))}#mtn-quest-hud .mtn-quest-hud-body{max-height:39dvh}#mtn-quest-entry{justify-content:flex-start;margin:.8rem 0}#mtn-quest-intro{max-height:88dvh}}
@media(prefers-reduced-motion:reduce){#mtn-quest-hud *,#mtn-quest-intro *{animation:none!important;transition:none!important}}
@media print{body>*:not(#mtn-quest-hud){display:none!important}#mtn-quest-hud{position:static;display:block;width:100%;max-height:none;box-shadow:none;background:white;color:black;border:2px solid black}#mtn-quest-hud .mtn-quest-hud-head,#mtn-quest-hud .mtn-quest-hud-foot,#mtn-quest-hud button,#mtn-quest-hud a{display:none!important}#mtn-quest-hud .mtn-quest-hud-body{display:block!important;overflow:visible}#mtn-quest-hud h3,#mtn-quest-hud .mtn-quest-motto{color:black}}
#mtn-quest-hud .mtn-quest-fragments{display:flex;gap:.25rem;flex-wrap:wrap;margin:.9rem 0;justify-content:center}
#mtn-quest-hud .mtn-quest-fragments b{border:1px solid #c9a870;background:#253d4a;border-radius:.28rem;min-width:1.3rem;padding:.22rem .35rem;text-align:center;color:#f6d8a2}
#mtn-quest-hud #mtn-quest-final-form{display:grid;gap:.4rem}
#mtn-quest-hud #mtn-quest-final-code{background:#f4f7f9;color:#132e40;border:1px solid #8fa5b0;border-radius:.4rem;padding:.65rem;font-size:1rem;width:100%;box-sizing:border-box}
@media print{#mtn-quest-hud .mtn-quest-fragments b{color:black;border-color:black}}

/* v14: Explicit child-friendly mission guidance; no UI while not opted in. */
#mtn-quest-hud .mtn-quest-target{margin:.75rem 0;padding:.8rem;background:#24465a;border:1px solid #e6c38b;border-radius:.6rem}
#mtn-quest-hud .mtn-quest-target span{display:block;font-size:.8rem;color:#f3d7ac;margin-bottom:.35rem}
#mtn-quest-hud .mtn-quest-target strong{display:block;color:#fff;font-size:1.05rem;line-height:1.45}
#mtn-quest-hud .mtn-quest-todo{margin:.8rem 0;padding-left:1.5rem;display:grid;gap:.36rem}
#mtn-quest-hud .mtn-quest-todo li{padding:.3rem .3rem;color:#b7cdd5}
#mtn-quest-hud .mtn-quest-todo li.is-current{color:#ffe4b5;font-weight:700;background:#304d54;border-radius:.3rem}
#mtn-quest-hud .mtn-quest-todo li.is-done{color:#d5efdb;text-decoration:none}
#mtn-quest-hud .mtn-quest-todo li.is-done::after{content:' ✓'}
#mtn-quest-hud .mtn-quest-instruction{color:#e6eef2}
#mtn-quest-hud .mtn-quest-purpose{font-style:italic;color:#e8d3b2}
@media(max-width:779px){#mtn-quest-hud{max-height:min(65dvh,610px);top:auto;bottom:max(10px,env(safe-area-inset-bottom))}#mtn-quest-hud .mtn-quest-hud-body{max-height:57dvh}}
