.tim-quest-layer { position:fixed; inset:0; pointer-events:none; z-index:9902; }
.tim-coin { position:absolute; left:0; top:0; width:32px; height:32px; border:0; padding:0; background:transparent; cursor:grab; pointer-events:auto; touch-action:none; filter:drop-shadow(0 0 5px #f9c64988); }
.tim-coin[aria-pressed="true"] { cursor:grabbing; }
.tim-coin svg { display:block; width:100%; height:100%; }
.tim-coin[hidden] { display:none; }
.tim-coin:focus-visible, [data-tim-chest]:focus-visible { outline:2px dashed #b82d3d; outline-offset:4px; }
.tim-route { position:absolute; inset:0; width:100%; height:100%; overflow:hidden; pointer-events:none; }
.tim-route path { fill:none; stroke-width:2; stroke-dasharray:5 5; }
.tim-route text { font:12px system-ui,sans-serif; fill:#31544b; stroke:#fffdf3; stroke-width:3px; paint-order:stroke; }
[data-tim-chest] { display:block; position:absolute; width:88px; height:70px; padding:0; border:0; background:transparent; bottom:100%; left:calc(50% - 44px); cursor:pointer; color:#d49a27; }
[data-tim-chest] > svg { width:100%; height:100%; overflow:visible; transform-origin:50% 100%; }
.treasure-lid { transform-origin:12px 40px; }
[data-tim-chest][data-burping] { filter:drop-shadow(0 -3px 7px #efca5b55); }
.treasure-glow { opacity:0; }
.is-open .treasure-glow { opacity:1; }
.is-open .treasure-lid { transform:translateY(-18px) rotate(-9deg); transform-origin:12px 40px; }
.tim-treasure-star { position:absolute; left:50%; top:20%; font-size:22px; pointer-events:none; animation:tim-treasure-pop 2s ease-out both; }
@keyframes tim-treasure-pop { 0% { opacity:0; transform:translate(0,0) scale(.2); } 15% {opacity:1;} 100% {opacity:0;transform:translate(var(--dx),var(--dy)) rotate(120deg);} }
.tim-treasure-perch { position:relative; width:min(260px,80%); min-height:38px; margin:130px auto 60px; border-top:3px solid var(--theme-edge,#77745c); border-radius:3px 6px; background:var(--theme-surface,#faf8ed); box-shadow:2px 3px 0 #39342a16; }
.tim-chest-reward { padding:14px 12px 16px; text-align:center; animation:tim-secret-reveal .45s ease-out both; }
.tim-chest-reward[hidden] { display:none; }
.tim-chest-reward > span { display:block; margin-bottom:7px; color:var(--theme-ink,#71654d); font:10px/1.4 system-ui,sans-serif; letter-spacing:1px; text-transform:uppercase; }
.tim-chest-reward > a { display:block; color:var(--theme-ink,#51483c); font:17px/1.3 Georgia,serif; text-decoration-thickness:1px; text-underline-offset:4px; }
.tim-chest-reward > a:hover { color:var(--theme-accent,#b82d3d); }
.tim-chest-reward > a:focus-visible { outline:2px dashed #b82d3d; outline-offset:4px; }
@keyframes tim-secret-reveal { from { opacity:0;transform:translateY(-8px); } to { opacity:1;transform:translateY(0); } }
@media (prefers-reduced-motion:reduce) { .tim-treasure-star {animation:none;display:none;} .tim-chest-reward {animation:none;} }
@media print { .tim-quest-layer {display:none;} }
