/* LOOT-01: names over drops, the pick-up button, fly-to-bag and the optional "+name" lines. Classes start with lt- so they
   cannot collide with ui.css. Sizes follow --u, so the text-size setting scales them to 200%. */
:root{--lt-u:var(--u,calc(1px * var(--ui,1)))}
.lt-layer{position:fixed;inset:0;pointer-events:none;z-index:3;overflow:hidden}
.lt-layer [hidden]{display:none!important}
/* the pick-up button sits where the interact button is */
body:has(.lt-take:not([hidden])) #tinteract{visibility:hidden}

.lt-label{position:absolute;left:0;top:0;display:flex;align-items:center;gap:calc(var(--lt-u) * 7);white-space:nowrap;
  background:rgba(24,19,27,.78);border-radius:calc(var(--lt-u) * 11);padding:calc(var(--lt-u) * 1) calc(var(--lt-u) * 9);
  border-left:calc(var(--lt-u) * 4) solid var(--lt-c);color:#fffaf0;font-size:calc(var(--lt-u) * 13);line-height:1.35;will-change:transform}
.lt-text{display:flex;flex-direction:column;min-width:0}
.lt-name{font-family:Mitr,'Noto Sans Thai Looped',sans-serif;color:var(--lt-c);text-shadow:0 1px 2px #000;max-width:46vw;overflow:hidden;text-overflow:ellipsis}
.lt-label.lt-r0 .lt-name{color:#fffaf0}
.lt-label.lt-r0.lt-coin .lt-name{color:#ffe27a}
.lt-sub{font-size:calc(var(--lt-u) * 11);color:#e9e2d6;line-height:1.25}
.lt-label.lt-r2:not(.lt-target),.lt-label.lt-r3:not(.lt-target){box-shadow:0 0 calc(var(--lt-u) * 10) -2px var(--lt-c)}

/* the drop one key press would take: bigger, key cap, full border, above the others */
.lt-label.lt-target{z-index:2;pointer-events:auto;cursor:pointer;border:2px solid var(--lt-c);background:rgba(24,19,27,.92);
  border-radius:99px;padding:calc(var(--lt-u) * 4) calc(var(--lt-u) * 14) calc(var(--lt-u) * 4) calc(var(--lt-u) * 6);
  font-size:calc(var(--lt-u) * 16);box-shadow:0 3px 0 rgba(30,14,24,.35),0 0 calc(var(--lt-u) * 14) -4px var(--lt-c)}
.lt-label.lt-target .lt-sub{font-size:calc(var(--lt-u) * 12)}
.lt-key{display:grid;place-items:center;min-width:calc(var(--lt-u) * 28);height:calc(var(--lt-u) * 28);padding:0 calc(var(--lt-u) * 5);
  border-radius:calc(var(--lt-u) * 8);background:#F2B64C;color:#10141C;font:600 calc(var(--lt-u) * 17)/1 Kanit,sans-serif;
  box-shadow:0 3px 0 #a8731c;animation:lt-bob 1.1s ease-in-out infinite}
body.touch .lt-label.lt-target{padding-left:calc(var(--lt-u) * 14)}

.lt-label.lt-locked{opacity:.72;border-left-style:dashed}
.lt-label.lt-locked .lt-name{color:#cfc8c0}
.lt-label.lt-target.lt-locked{border-style:dashed}
.lt-label.lt-full{border-color:#FF6B62}
.lt-label.lt-full .lt-sub{color:#ffb3ad;font-weight:600}

/* touch: a round button above the attack button, in thumb reach; hold it to take everything close by */
.lt-take{position:absolute;pointer-events:auto;touch-action:none;
  right:calc(var(--lt-take-right,26px) + var(--sr,env(safe-area-inset-right,0px)));
  bottom:calc(var(--lt-take-bottom,204px) + var(--sb,env(safe-area-inset-bottom,0px)));
  /* 64..70px: the spot of the game's interact button, between the skill buttons; only the word grows with the text size */
  width:clamp(64px,calc(var(--lt-u) * 64),70px);height:clamp(64px,calc(var(--lt-u) * 64),70px);border-radius:50%;
  border:3px solid var(--lt-c,#fff1cf);background:rgba(24,19,27,.86);color:#fffaf0;
  display:flex;flex-direction:column;align-items:center;justify-content:center;gap:0;
  font:500 calc(var(--lt-u) * 15)/1.2 Mitr,'Noto Sans Thai Looped',sans-serif;cursor:pointer;
  box-shadow:0 4px 0 rgba(30,14,24,.35),0 0 18px -4px var(--lt-c,#fff1cf);animation:lt-pop .22s cubic-bezier(.34,1.56,.64,1)}
.lt-take:active{transform:scale(.92)}
.lt-take:focus-visible{outline:3px solid #fff;outline-offset:3px}
.lt-takeimg{width:52%;height:52%;object-fit:contain}
.lt-takecoin,.lt-flycoin,.lt-gotcoin{display:block;border-radius:50%;background:#F7C948;box-shadow:inset 0 0 0 3px #d99a1e}
.lt-takecoin{width:36%;height:36%;margin:6% 0}

.lt-fly{position:absolute;left:0;top:0;width:calc(var(--lt-u) * 40);height:calc(var(--lt-u) * 40);will-change:transform;z-index:3;
  filter:drop-shadow(0 2px 3px rgba(30,14,24,.45))}
.lt-flycoin{width:calc(var(--lt-u) * 22);height:calc(var(--lt-u) * 22)}

.lt-feed{position:absolute;left:calc(12px + var(--sl,0px));top:38%;display:flex;flex-direction:column;gap:5px;align-items:flex-start}
.lt-got{display:flex;align-items:center;gap:8px;background:rgba(24,19,27,.84);border-radius:99px;color:#fffaf0;
  border-left:calc(var(--lt-u) * 4) solid var(--lt-c);padding:3px calc(var(--lt-u) * 14) 3px calc(var(--lt-u) * 6);
  font-size:calc(var(--lt-u) * 15);animation:lt-slide .3s cubic-bezier(.34,1.56,.64,1);white-space:nowrap}
.lt-got:not(.lt-r0) span{color:var(--lt-c)}
.lt-got img{width:calc(var(--lt-u) * 30);height:calc(var(--lt-u) * 30)}
.lt-gotcoin{width:calc(var(--lt-u) * 20);height:calc(var(--lt-u) * 20);margin:calc(var(--lt-u) * 5)}
.lt-got.lt-bump{animation:lt-take .3s}

/* short screens (a phone on its side): tighter names so they do not cover the fight. Still twice the size at 200% */
@media (max-height:520px){
  .lt-label{font-size:calc(var(--lt-u) * 11.5);line-height:1.22;padding-top:0;padding-bottom:0;gap:calc(var(--lt-u) * 5)}
  .lt-sub{font-size:calc(var(--lt-u) * 10)}
  .lt-label.lt-target{font-size:calc(var(--lt-u) * 13.5);padding:calc(var(--lt-u) * 2) calc(var(--lt-u) * 10)}
  .lt-label.lt-target .lt-sub{font-size:calc(var(--lt-u) * 10.5)}
}

@keyframes lt-bob{0%,100%{translate:0 0}50%{translate:0 -3px}}
@keyframes lt-pop{from{scale:.5;opacity:0}to{scale:1;opacity:1}}
@keyframes lt-slide{from{translate:-24px 0;opacity:0}to{translate:0 0;opacity:1}}
@keyframes lt-take{40%{scale:1.1}}
@media (prefers-reduced-motion:reduce){.lt-key,.lt-take,.lt-got,.lt-got.lt-bump{animation:none}}
body.calm .lt-key,body.calm .lt-take,body.calm .lt-got{animation:none}
