/* LASER CATS: the Trophy Case and the Tennis Ball Park (laser-cats-awards.js, laser-cats-park.js,
   laser-cats-extras.js). Sits on top of space-cats.css and uses its tokens (--sc-*). */

/* the unlock moment's overlay canvas: above every screen, never takes a tap */
.lc-fx{position:absolute;top:0;left:0;z-index:5;pointer-events:none;display:none}
.lc-fx.on{display:block}

/* metal medals (CSS), the same tiers as the canvas medal */
.lc-medal{--m1:#ffe1c2;--m2:#eaa46a;--m3:#b86b35;--rim:#a8612e;
  position:relative;flex:none;width:62px;height:62px;border-radius:50%;display:grid;place-items:center;
  background:radial-gradient(circle at 34% 28%,#ffffffb0 0 9%,#fff0 34%),linear-gradient(140deg,var(--m1),var(--m2) 55%,var(--m3));
  box-shadow:0 0 0 4px var(--rim),0 0 0 6px #ffffff40,0 6px 14px #0b081c88,inset 0 -5px 8px #0002,inset 0 4px 6px #fff8}
.lc-medal::before{content:"";position:absolute;inset:7px;border-radius:50%;box-shadow:inset 0 0 0 2px #ffffff88}
.lc-medal-i{font-size:28px;line-height:1;filter:drop-shadow(0 1px 0 #fff8);font-family:"Apple Color Emoji","Segoe UI Emoji","Noto Color Emoji",var(--sc-display)}
.lc-medal.t-silver{--m1:#ffffff;--m2:#dfe5f2;--m3:#9aa6bd;--rim:#7f8aa8}
.lc-medal.t-gold{--m1:#fffbe0;--m2:#ffd36b;--m3:#e0a52a;--rim:#c98a1c}
.lc-medal.t-rainbow{--m1:#ffd6ec;--m2:#c8b4ff;--m3:#9ff0d0;--rim:#9b7fe6}
.lc-medal.big{width:150px;height:150px;box-shadow:0 0 0 8px var(--rim),0 0 0 12px #ffffff40,0 14px 30px #0b081caa,inset 0 -10px 16px #0002,inset 0 8px 12px #fff8}
.lc-medal.big::before{inset:16px;box-shadow:inset 0 0 0 4px #ffffff88}
.lc-medal.big .lc-medal-i{font-size:68px}
.lc-medal.dim{filter:grayscale(1) brightness(.45)}

/* the Trophy Case */
.lc-trophies{gap:12px}
.lc-total{display:flex;flex-direction:column;align-items:center;gap:6px}
.lc-count{margin:0;font-family:var(--sc-display);font-weight:600;font-size:18px;color:var(--sc-muted)}
.lc-count b{font-size:30px;color:var(--sc-butter);margin-right:2px}
.lc-bar{width:100%;height:12px;border-radius:999px;background:#ffffff1f;overflow:hidden;box-shadow:inset 0 0 0 1px var(--sc-edge)}
.lc-bar span{display:block;height:100%;min-width:6px;border-radius:999px;background:linear-gradient(90deg,#ffc2a3,var(--sc-butter),#fffbe0);box-shadow:0 0 12px #ffe39488}
.lc-tally{margin:0;display:flex;gap:14px;justify-content:center;font-family:var(--sc-display);font-weight:600;font-size:15px}
.lc-tally span::before{content:"";display:inline-block;width:13px;height:13px;border-radius:50%;margin-right:5px;vertical-align:-1px;background:linear-gradient(140deg,var(--m1),var(--m3));box-shadow:0 0 0 2px var(--rim)}
.lc-tally .t-bronze{--m1:#ffe1c2;--m3:#b86b35;--rim:#a8612e}.lc-tally .t-silver{--m1:#fff;--m3:#9aa6bd;--rim:#7f8aa8}
.lc-tally .t-gold{--m1:#fffbe0;--m3:#e0a52a;--rim:#c98a1c}.lc-tally .t-rainbow{--m1:#ffd6ec;--m3:#9ff0d0;--rim:#9b7fe6}
.lc-grid{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
.lc-card{position:relative;width:100%;height:100%;border:0;border-radius:22px;padding:14px 6px 10px;display:flex;flex-direction:column;align-items:center;gap:5px;color:var(--sc-ink);
  background:var(--sc-pillow);box-shadow:inset 0 0 0 1px var(--sc-edge),inset 0 2px 0 var(--sc-hi);transition:transform .15s}
.lc-card:active{transform:scale(.96)}
.lc-card.have{background:radial-gradient(circle at 50% 22%,#ffe39426,#ffffff0a 62%);box-shadow:inset 0 0 0 2px #ffe39466,inset 0 2px 0 var(--sc-hi)}
.lc-card b{font-family:var(--sc-display);font-weight:600;font-size:14px;line-height:1.12;margin-top:4px}
.lc-card small{font-family:var(--sc-body);font-weight:800;font-size:11px;line-height:1.2;color:var(--sc-muted)}
.lc-card.locked .lc-medal{filter:grayscale(1) brightness(.32) contrast(1.1);box-shadow:0 0 0 4px #ffffff22,0 4px 10px #0006}
.lc-card.locked .lc-medal-i{filter:brightness(0) opacity(.55)}
.lc-card.secret .lc-medal-i{filter:none;color:#ffffff99;font-family:var(--sc-display);font-weight:700;font-size:30px}
.lc-card.secret b{letter-spacing:.12em;color:var(--sc-muted)}
.lc-pips{display:flex;gap:4px}
.lc-pips i{width:9px;height:9px;border-radius:50%;background:#ffffff26}
.lc-pips i.on.t-bronze{background:#eaa46a}.lc-pips i.on.t-silver{background:#dfe5f2}.lc-pips i.on.t-gold{background:#ffd36b;box-shadow:0 0 6px #ffd36b}
.lc-minibar{width:78%;height:5px;border-radius:999px;background:#ffffff1f;overflow:hidden;margin-top:auto}
.lc-minibar span{display:block;height:100%;border-radius:999px;background:linear-gradient(90deg,var(--sc-mint),var(--sc-butter))}
.lc-new{position:absolute;top:6px;right:6px;z-index:1;padding:1px 6px;border-radius:999px;background:var(--sc-pink);color:#3a1430;font-family:var(--sc-display);font-weight:700;font-size:10px;letter-spacing:.06em;animation:sc-pop .5s cubic-bezier(.3,1.6,.5,1) both}
.lc-card.have .lc-medal{animation:lc-shine-in .6s cubic-bezier(.3,1.6,.5,1) both}
.lc-grid li:nth-child(3n+2) .lc-card.have .lc-medal{animation-delay:.05s}.lc-grid li:nth-child(3n) .lc-card.have .lc-medal{animation-delay:.1s}
.lc-badgebtn{align-self:center;width:auto!important}
.lc-badgebtn small{font-family:var(--sc-body);font-weight:800;color:var(--sc-muted);margin-left:4px}

/* the detail view: a big medal you can tilt, with a sweep of light */
.lc-detail{position:fixed;inset:0;z-index:6;display:grid;place-items:center;padding:18px;background:#0b0820c4;max-width:none!important;width:auto!important}
.lc-detail-card{width:min(100%,340px);border-radius:30px;padding:22px 18px 18px;display:flex;flex-direction:column;align-items:center;gap:10px;
  background:radial-gradient(circle at 50% 0%,#5a46b8,#2a2160 72%);box-shadow:inset 0 0 0 3px var(--sc-butter),0 0 50px #ffe39455;animation:sc-pop .45s cubic-bezier(.3,1.6,.5,1) both}
.lc-detail-card h3{margin:0;align-self:center;font-family:var(--sc-display);font-size:26px;font-weight:700;color:var(--sc-butter)}
.lc-tilt{--rx:0deg;--ry:0deg;--sx:30%;perspective:520px;padding:18px;touch-action:none;cursor:grab}
.lc-tilt .lc-medal{transform:rotateX(var(--rx)) rotateY(var(--ry));transition:transform .25s ease-out;animation:lc-float 3.4s ease-in-out infinite;overflow:hidden}
.lc-tilt.held .lc-medal{animation:none;transition:transform .06s linear}
.lc-tilt .lc-medal::after{content:"";position:absolute;inset:-20%;border-radius:50%;pointer-events:none;mix-blend-mode:screen;
  background:linear-gradient(115deg,#fff0 30%,#ffffffcc 47%,#fff0 60%) no-repeat;background-size:250% 100%;background-position:var(--sx) 0;animation:lc-sweep 2.6s ease-in-out infinite}
.lc-tilt.held .lc-medal::after{animation:none}
.lc-ladder{list-style:none;margin:0;padding:0;width:100%;display:flex;flex-direction:column;gap:6px}
.lc-ladder li{display:flex;align-items:center;gap:10px;padding:7px 12px;border-radius:14px;background:var(--sc-pillow);font-size:14px;color:var(--sc-muted);text-align:left}
.lc-ladder li span{flex:1}
.lc-ladder li b{font-family:var(--sc-display);font-weight:600;color:var(--sc-ink);font-size:14px}
.lc-ladder li.got{color:var(--sc-ink);box-shadow:inset 0 0 0 2px #ffe39455}
.lc-ladder li.got b{color:var(--sc-mint)}
.lc-ladder i{flex:none;width:16px;height:16px;border-radius:50%;background:#ffffff22}
.lc-ladder li.got.t-bronze i{background:linear-gradient(140deg,#ffe1c2,#b86b35)}.lc-ladder li.got.t-silver i{background:linear-gradient(140deg,#fff,#9aa6bd)}
.lc-ladder li.got.t-gold i{background:linear-gradient(140deg,#fffbe0,#e0a52a)}.lc-ladder li.got.t-rainbow i{background:linear-gradient(140deg,#ffd6ec,#9ff0d0)}

/* the title menu's "new medals" dot, the park chip */
.sc-menu button{position:relative}
.lc-dot{position:absolute;top:6px;right:8px;min-width:18px;height:18px;padding:0 5px;border-radius:999px;background:var(--sc-pink);color:#3a1430;font-family:var(--sc-display);font-weight:700;font-size:11px;line-height:18px;box-shadow:0 0 10px #ff9cc699}
.lc-parkchip{border:0;border-radius:999px;width:min(100%,340px);min-height:44px;display:flex;align-items:center;gap:8px;padding:6px 16px;color:var(--sc-ink);font-size:20px;
  background:linear-gradient(135deg,#e8f55a38,#9ff0d01f);box-shadow:inset 0 0 0 2px #e8f55a88}
.lc-parkchip b{flex:1;text-align:left;font-family:var(--sc-display);font-weight:600;font-size:16px;color:#eef87a}
.lc-parkchip small{font-family:var(--sc-body);font-weight:800;font-size:12px;color:var(--sc-muted)}
.sc-title:has(.lc-parkchip){gap:12px}
@media (max-height:700px){ .sc-title:has(.lc-parkchip) .sc-how{display:none} }
.lc-parknode .sc-node-n{background:#e8f55a;color:#2f5a2a}
.lc-parknode button{box-shadow:inset 0 0 0 2px #e8f55a77,inset 0 2px 0 var(--sc-hi)}
.lc-parknode.locked .sc-node-n{background:#ffffff26}
.lc-parkbtn{box-shadow:inset 0 0 0 2px #e8f55a99}

/* the Tennis Ball Park: the canvas draws the park; a quit button sits where the close button goes */
.lc-parkscr{pointer-events:none;padding:0}
.lc-quit{pointer-events:auto;position:absolute;top:calc(env(safe-area-inset-top,0px) + 10px);left:10px}
.lc-parkend{gap:9px;background:radial-gradient(90% 60% at 50% 32%,#2d5a46d9,#17122fe0)}
.lc-parkstats{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:repeat(4,1fr);gap:6px;width:min(100%,340px)}
.lc-parkstats li{display:flex;flex-direction:column;align-items:center;padding:6px 2px;border-radius:16px;background:var(--sc-pillow);box-shadow:inset 0 0 0 1px var(--sc-edge)}
.lc-parkstats span{font-size:20px;line-height:1.1}
.lc-parkstats b{font-family:var(--sc-display);font-weight:700;font-size:20px;line-height:1.1}
.lc-parkstats small{font-size:11px;color:var(--sc-muted);line-height:1.1}
.lc-bones{background:#1d1640b3;padding:4px 12px;border-radius:999px}

@keyframes lc-shine-in{0%{transform:scale(.6) rotateY(90deg);opacity:0}100%{transform:none;opacity:1}}
@keyframes lc-float{0%,100%{transform:rotateX(4deg) rotateY(-14deg)}50%{transform:rotateX(-4deg) rotateY(14deg)}}
@keyframes lc-sweep{0%,35%{background-position:130% 0}75%,100%{background-position:-30% 0}}
@media (prefers-reduced-motion:reduce){
  .lc-tilt .lc-medal,.lc-tilt .lc-medal::after,.lc-card .lc-medal,.lc-new{animation:none!important;transition:none!important}
  .lc-tilt .lc-medal{transform:none!important}
}
@media (max-width:359px){ .lc-grid{grid-template-columns:repeat(2,minmax(0,1fr))} }
@media (max-height:620px){ .lc-parkchip{display:none} } /* tiny phones: the park stays one tap away on the map */
