/* Locked cards and the rarity ladder (Gage 11-04: "the ones that aren't unlocked because of your level have the kind of film
   over it and the lock showing it's locked and it has an animation if you tap it"). Small and scoped on purpose: the shared
   Locker and Item Shop styles stay in locker.css and supply.css; these are only the new pieces (UI.lockTap, UI.lockerLadder). */

/* The Item Shop's locked tile wears the Locker's film (locker.css: #tab-locker .item .lk-film) over the whole card. */
.so-item.locked canvas { filter: saturate(.85); }
.so-item .lk-film { position: absolute; inset: 0; z-index: 2; pointer-events: none; background: repeating-linear-gradient(135deg, rgba(255, 255, 255, .035) 0 2px, transparent 2px 8px), linear-gradient(180deg, rgba(10, 9, 8, .34), rgba(10, 9, 8, .52)); box-shadow: inset 0 0 0 1px rgba(242, 200, 75, .18); }
.so-item .lk-badge { position: absolute; top: 20px; left: 4px; right: 4px; aspect-ratio: 3 / 2; display: grid; place-content: center; justify-items: center; gap: 3px; }
.so-item .lk-padlock { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: radial-gradient(circle at 40% 35%, #2d2a26, #0e0d0c 70%); box-shadow: 0 0 0 2px var(--rc, #b9b3a1), 0 0 0 3px #000, 0 3px 8px rgba(0, 0, 0, .6); }
.so-item .lk-padlock .wi { width: 18px; height: 18px; }
.so-item .lk-lv { display: flex; align-items: baseline; gap: 2px; padding: 1px 5px 0; background: #000; box-shadow: 0 0 0 1px rgba(242, 200, 75, .45); font: 400 14px/1.05 var(--display); color: #f2c84b; text-transform: uppercase; letter-spacing: .04em; }
.so-item .lk-lv small { display: inline; font: inherit; font-size: 10px; color: #d6c49e; }
.so-item .lk-lv b { font: inherit; color: #f2c84b; }
.so-item .rp-top { position: relative; z-index: 3; }

/* A tap on a locked card: the padlock shakes and rattles on its plate, the film catches the light once. */
.lk-rattle .lk-padlock { animation: lk-rattle .46s cubic-bezier(.36, .07, .19, .97) both; transform-origin: 50% 25%; }
.lk-rattle .lk-padlock .wi { animation: lk-rattle-lock .46s cubic-bezier(.36, .07, .19, .97) both; transform-origin: 50% 70%; }
.lk-rattle .lk-film { animation: lk-film-flash .46s ease-out; }
@keyframes lk-rattle-lock { 0%, 100% { transform: none; } 12% { transform: rotate(-24deg) translateY(-2px); } 26% { transform: rotate(20deg); } 40% { transform: rotate(-16deg) translateY(-1px); } 54% { transform: rotate(11deg); } 68% { transform: rotate(-6deg); } 84% { transform: rotate(3deg); } }
@keyframes lk-rattle {
  0%, 100% { transform: none; }
  10% { transform: translateX(-3px) rotate(-15deg); }
  22% { transform: translateX(3px) rotate(13deg); }
  34% { transform: translateX(-3px) rotate(-11deg); }
  46% { transform: translateX(2px) rotate(8deg); }
  58% { transform: translateX(-2px) rotate(-5deg); }
  72% { transform: translateX(1px) rotate(3deg); }
  86% { transform: rotate(-1deg); }
}
@keyframes lk-film-flash { 0% { box-shadow: inset 0 0 0 1px rgba(242, 200, 75, .18); } 25% { box-shadow: inset 0 0 0 2px rgba(242, 200, 75, .7); } 100% { box-shadow: inset 0 0 0 1px rgba(242, 200, 75, .18); } }

/* ...then the level panel slides up: your level, the one that opens it, the XP between. */
#modal .sheet-box.lk-panel { animation: lk-panel-up .28s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes lk-panel-up { from { transform: translateY(56px); opacity: 0; } to { transform: none; opacity: 1; } }
.ll-span .ll-ends { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.ll-span .ll-ends b { font: inherit; }
.ll-span .ll-you { color: #e9dcc4; }
.ll-span .ll-need { color: #f2c84b; text-align: right; }
.ll-span .lk-bar { height: 8px; }
.ll-span small b { color: #e9dcc4; font-weight: 600; }
@media (prefers-reduced-motion: reduce) { .lk-rattle .lk-padlock, .lk-rattle .lk-padlock .wi, .lk-rattle .lk-film, #modal .sheet-box.lk-panel { animation: none; } }

/* The Locker's one list: a strip where each rarity starts, and a tick on what you own. */
#tab-locker .lk-ladder .lk-tier { grid-column: 1 / -1; display: flex; align-items: center; gap: 8px; margin: 6px 0 -2px; font: 400 15px/1 var(--display); text-transform: uppercase; letter-spacing: .08em; color: var(--rc, #b9b3a1); }
#tab-locker .lk-ladder .lk-tier:first-child { margin-top: 0; }
#tab-locker .lk-ladder .lk-tier small { font: inherit; font-size: 12px; color: var(--muted); }
#tab-locker .lk-ladder .lk-tier::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, var(--rc, #b9b3a1), transparent); opacity: .6; }
#tab-locker .item .lk-own { position: absolute; top: 5px; right: 5px; z-index: 3; display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: #2f7d43; box-shadow: 0 0 0 1.5px #0b0a09; color: #fff; }
#tab-locker .item .lk-own .wi { width: 13px; height: 13px; }
#tab-locker .item:has(.lk-stat) .lk-own { top: 36px; right: 8px; }
