/* The find: the reveal moment in the chute, the Finds Jar shelf on the hub, and the jar overlay. (js/finds.js, js/finds_ui.js) */

/* ---------- the reveal ---------- */
#find-pulse { position: absolute; inset: 0; z-index: 6; pointer-events: none; opacity: 0;
  background: radial-gradient(ellipse at 50% 46%, rgba(255, 226, 140, 0) 38%, rgba(255, 214, 110, .5) 100%), radial-gradient(circle at 50% 46%, rgba(255, 255, 255, .22), transparent 42%) }
#find-pulse.go { animation: find-pulse 1.35s ease-out both }
@keyframes find-pulse { 0% { opacity: 0 } 12% { opacity: 1 } 100% { opacity: 0 } }
#screen-play #found.hot { border-color: rgba(255, 226, 140, .85); box-shadow: 0 0 0 .3em rgba(255, 226, 140, .2), 0 0 3.4em rgba(255, 214, 110, .38), 0 1.4em 3em rgba(0, 0, 0, .7); max-width: 24em }
#screen-play #found.hot canvas { animation: find-glint 1.2s ease-out .15s both }
@keyframes find-glint { 0% { filter: brightness(2.2) } 100% { filter: none } }
#found-sub { margin: .35em auto 0; max-width: 21em; font-size: .86em; line-height: 1.35; color: var(--cream, #f6ecdc); opacity: .86 }
#found-sub:empty { display: none }
#found-new { display: inline-block; margin-top: .55em; padding: .22em .8em; border-radius: 2em; font-size: .82em; font-weight: 800; letter-spacing: .04em; text-transform: uppercase;
  color: #2a1c03; background: linear-gradient(#ffe48a, #f2c14e); box-shadow: 0 .18em 0 #9a6f12, 0 0 1.2em rgba(255, 214, 110, .5); animation: jar-new 1.4s ease-in-out infinite }
@keyframes jar-new { 50% { transform: translateY(-.14em) scale(1.04) } }

/* ---------- the shelf button on the hub ---------- */
.jar-btn { position: absolute; z-index: 3; left: 2.6%; top: 5.8em; display: flex; align-items: center; gap: .7em; padding: .5em 1em .5em .6em; border-radius: 1em; border: 1px solid rgba(255, 255, 255, .1);
  background: linear-gradient(#3a2c22, #231a15); color: var(--cream, #f6ecdc); font: inherit; text-align: left; cursor: pointer; box-shadow: inset 0 .08em 0 rgba(255, 255, 255, .12), 0 .3em 0 #0f0a09, 0 .6em 1em rgba(0, 0, 0, .4); transition: transform .1s, filter .12s }
.jar-btn:hover { background: linear-gradient(#46362a, #2b2018); transform: translateY(-.08em) }
.jar-btn:active { transform: translateY(.2em) }
.jb-glass { position: relative; width: 3.1em; height: 3.1em; border-radius: .7em .7em 1.1em 1.1em; background: radial-gradient(circle at 35% 30%, rgba(255, 255, 255, .22), rgba(255, 255, 255, .05) 60%), rgba(180, 220, 205, .1); border: 1px solid rgba(220, 245, 235, .3); display: block; flex: none }
.jb-glass canvas { width: 100%; height: 100%; display: block }
.jb-lid { position: absolute; left: 18%; right: 18%; top: -.32em; height: .42em; border-radius: .2em; background: linear-gradient(#d3a35a, #8c6420); box-shadow: 0 .1em 0 rgba(0, 0, 0, .4) }
.jb-txt { display: grid; gap: .05em }
.jb-txt b { font-weight: 800; font-stretch: 78%; font-size: 1.12em; letter-spacing: .01em }
.jb-txt small { font-size: .74em; color: var(--muted, #9aa6a1) }
.jar-btn em { position: absolute; right: -.45em; top: -.55em; font-style: normal; font-size: .72em; font-weight: 800; padding: .18em .65em; border-radius: 2em; color: #2a1c03; background: linear-gradient(#ffe48a, #f2c14e); box-shadow: 0 .14em 0 #9a6f12; animation: jar-new 1.4s ease-in-out infinite }
.jar-btn.has-new { border-color: rgba(255, 226, 140, .65); box-shadow: inset 0 .08em 0 rgba(255, 255, 255, .12), 0 .3em 0 #0f0a09, 0 0 1.6em rgba(255, 214, 110, .35) }
.jar-btn.empty .jb-glass { opacity: .7 }

/* ---------- the jar overlay: a trophy cabinet ---------- */
#finds-jar { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 1.2em }
.jr-back { position: absolute; inset: 0; background: rgba(8, 5, 4, .74); backdrop-filter: blur(4px) }
.jr-cab { position: relative; width: min(58em, 100%); max-height: 100%; overflow: auto; border-radius: 1.2em; padding: 1.1em 1.3em 1.2em; color: var(--cream, #f6ecdc);
  background: repeating-linear-gradient(92deg, rgba(0, 0, 0, .06) 0 3px, transparent 3px 11px), linear-gradient(#3b2a1e, #261a12);
  border: .35em solid #5a3f27; box-shadow: inset 0 0 0 1px rgba(255, 220, 160, .18), inset 0 0 3em rgba(0, 0, 0, .55), 0 1.6em 4em rgba(0, 0, 0, .7); animation: jr-in .35s cubic-bezier(.3, 1.3, .5, 1) }
@keyframes jr-in { from { transform: translateY(1.2em) scale(.96); opacity: 0 } }
.jr-cab header { display: flex; justify-content: space-between; align-items: flex-start; gap: 1em }
.jr-cab h2 { margin: 0; font-size: 1.9em; font-weight: 850; font-stretch: 75%; color: #ffe29a; text-shadow: 0 .06em 0 #000 }
.jr-cab header p { margin: .1em 0 0; color: rgba(246, 236, 220, .75); font-size: .92em }
.jr-x { font-size: 1.7em; line-height: 1; padding: .1em .45em; border-radius: .5em; background: rgba(0, 0, 0, .3); border: 1px solid rgba(255, 255, 255, .15) }
.jr-row { display: flex; gap: .45em; margin: .9em 0 .7em; overflow-x: auto; padding: .5em .4em; border-radius: .8em; background: rgba(0, 0, 0, .28); box-shadow: inset 0 .15em .6em rgba(0, 0, 0, .5) }
.jr-kind { flex: 1 0 4.2em; text-align: center; opacity: .8 }
.jr-kind canvas { width: 3.4em; height: 3.4em; display: block; margin: 0 auto }
.jr-kind small { font-size: .62em; display: block; line-height: 1.15; color: rgba(246, 236, 220, .6) }
.jr-kind.have { opacity: 1 } .jr-kind.have small { color: #ffe29a }
.jr-shelf { display: grid; grid-template-columns: repeat(auto-fill, minmax(7.4em, 1fr)); gap: .95em .7em; padding: .9em .7em 1.1em; border-radius: .8em; background: linear-gradient(rgba(0, 0, 0, .38), rgba(0, 0, 0, .18)); box-shadow: inset 0 .2em .8em rgba(0, 0, 0, .55); max-height: 21em; overflow: auto;
  grid-auto-rows: 8.3em; background: linear-gradient(transparent calc(100% - .28em), rgba(255, 220, 160, .2) 0) 0 .9em / 100% 9.25em repeat-y, linear-gradient(rgba(0, 0, 0, .38), rgba(0, 0, 0, .18)) }
.jr-item { position: relative; display: grid; justify-items: center; gap: .1em; padding: .35em .3em .5em; border-radius: .7em; background: radial-gradient(circle at 50% 35%, rgba(255, 255, 255, .13), rgba(255, 255, 255, .02) 70%); border: 1px solid rgba(255, 255, 255, .1); text-align: center; transition: transform .12s }
.jr-item:hover { transform: translateY(-.15em); background: radial-gradient(circle at 50% 35%, rgba(255, 255, 255, .2), rgba(255, 255, 255, .04) 70%) }
.jr-item.sel { border-color: rgba(255, 226, 140, .8); box-shadow: 0 0 1.2em rgba(255, 214, 110, .3) }
.jr-item canvas { width: 100%; max-width: 6.5em; height: auto; display: block }
.jr-item b { font-size: .8em; font-weight: 750; line-height: 1.15 } .jr-item small { font-size: .68em; color: rgba(246, 236, 220, .6) }
.jr-item em { position: absolute; right: -.3em; top: -.45em; font-style: normal; font-size: .62em; font-weight: 800; padding: .15em .6em; border-radius: 2em; color: #2a1c03; background: linear-gradient(#ffe48a, #f2c14e); box-shadow: 0 .12em 0 #9a6f12; animation: jar-new 1.4s ease-in-out infinite }
.jr-item.new { border-color: rgba(255, 226, 140, .55) }
.jr-empty { grid-column: 1 / -1; margin: 1.2em 0; text-align: center; color: rgba(246, 236, 220, .6) }
.jr-detail { display: flex; gap: 1em; align-items: center; margin-top: .9em; min-height: 6.6em; padding: .7em .9em; border-radius: .8em; background: rgba(0, 0, 0, .3) }
.jr-dcv canvas { width: 8em; height: auto; display: block; border-radius: .6em; background: radial-gradient(circle at 50% 45%, #5a5148, #231e19) }
.jr-dtx h3 { margin: 0; font-size: 1.15em; font-weight: 800; color: #ffe29a }
.jr-dtx p { margin: .15em 0 0; font-size: .9em }
.jr-dtx small { color: rgba(246, 236, 220, .62) }
.jr-mom { display: flex; align-items: center; gap: .55em; flex-wrap: wrap }
.jr-pips { display: inline-flex; gap: .18em } .jr-pips i { width: .62em; height: .62em; border-radius: 50%; background: rgba(255, 255, 255, .16) } .jr-pips i.on { background: #f2c14e; box-shadow: 0 0 .5em rgba(242, 193, 78, .6) }
.jr-st { color: #f2c14e; letter-spacing: .1em; font-size: .85em } .jr-st span { color: rgba(255, 255, 255, .18) }
.jr-hint { margin: 0; color: rgba(246, 236, 220, .75) }
.find-prac b { color: #ffe29a }
@media (max-width: 760px) { .jar-btn { top: auto; bottom: .8em; left: .8em } .jr-detail { flex-direction: column; align-items: flex-start } }
@media (prefers-reduced-motion: reduce) { #find-pulse.go, .jar-btn em, .jr-item em, #found-new { animation: none } #find-pulse.go { opacity: .5 } }
