/* Instruments (js/instruments/): the strip along the bottom while you play, the touch notes, and the Golden Lute's
   own rarity, wherever it's shown */

/* golden: a sparkling gold, a step above mythical */
:root { --r-golden: #ffd23c; }
.r-golden { --rc: var(--r-golden); color: #ffe680; }
.r-golden .iname, #invdetail.r-golden h3, .ub-card.r-golden h3, .ibhead.r-golden b {
  color: #ffe680; text-shadow: 0 0 8px rgba(255, 210, 60, 0.8); animation: goldshine 1.8s ease-in-out infinite alternate;
}
@keyframes goldshine { to { color: #fffbe0; text-shadow: 0 0 16px rgba(255, 230, 128, 1), 0 0 4px #fff; } }
.itile.r-golden { box-shadow: 0 0 18px rgba(255, 210, 60, 0.6), inset 0 0 0 1px rgba(255, 230, 128, 0.7); }
#invdetail.r-golden .rar, .ub-card.r-golden .rar { color: #ffe680; }
.r-legendary .ibhead b, .ibhead.r-legendary b { color: #ffd23c; }
.ibhead.r-rare b { color: #4fb6ff; } .ibhead.r-mythical b { color: #d080ff; }

/* an instrument's little picture */
.insticon { display: inline-grid; place-items: center; }
.insticon svg { display: block; width: 100%; height: auto; }
.ipv .insticon { width: 78%; }
.isparkle { animation: isparkle 1.4s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.isparkle:nth-of-type(2n) { animation-delay: 0.5s; } .isparkle:nth-of-type(3n) { animation-delay: 0.9s; }
@keyframes isparkle { 0%, 100% { opacity: 0.2; transform: scale(0.6); } 50% { opacity: 1; transform: scale(1.2); } }

/* the strip: what you're playing, its keys (lit as they're played) and how to play them */
#instbar { display: none; position: fixed; left: 50%; bottom: 14px; transform: translateX(-50%); z-index: 78; max-width: calc(100vw - 16px); box-sizing: border-box; padding: 8px 12px; border-radius: 14px; background: rgba(18, 20, 26, 0.82); border: 1px solid rgba(242, 182, 50, 0.5); color: #fff3b0; font: 13px sans-serif; text-align: center; box-shadow: 0 6px 24px rgba(0, 0, 0, 0.5); }
#instbar.show { display: block; }
#instbar.idle { left: 14px; transform: none; bottom: 14px; padding: 5px 10px; font: 13px var(--f-ui); opacity: 0.85; pointer-events: none; }
body.touchplaying #instbar.idle { display: none; }
#instbar.on.touch { top: 8px; bottom: auto; left: 12px; transform: none; padding: 4px 10px; pointer-events: none; }
#instbar.on.touch .ibacts { display: none; }
.ibhead { display: flex; align-items: center; justify-content: center; gap: 8px; margin-bottom: 6px; }
.ibhead b { font: 16px var(--f-ui); }
.ibhead small { opacity: 0.7; }
#instbar.touch .ibhead { margin: 0; }
.ibkeys { display: flex; gap: 4px; justify-content: center; }
.ibkey { position: relative; width: 44px; min-height: 52px; padding: 4px 0; border-radius: 0 0 8px 8px; border: 1px solid #8a6a3a; background: linear-gradient(#f4f0e8, #d8d0c0); color: #2a1608; cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; transition: background 0.08s, transform 0.08s; }
.ibkey b { font: bold 16px sans-serif; } .ibkey span { font-size: 11px; opacity: 0.75; }
.ibkey i { position: absolute; top: -1px; right: -8px; z-index: 1; width: 14px; height: 26px; border-radius: 0 0 4px 4px; background: #1a1418; color: #f4ecd0; font: normal 9px sans-serif; line-height: 26px; pointer-events: none; }
.ibkeys .ibkey:last-child i { display: none; }
.ibkey.lit { background: linear-gradient(#ffe680, #ffb02a); transform: translateY(2px); box-shadow: 0 0 12px rgba(255, 210, 60, 0.8); }
.ibhint { margin: 6px 0 2px; font-size: 12px; opacity: 0.75; }
.ibacts { display: flex; gap: 8px; justify-content: center; margin-top: 4px; }
.ibacts button { min-height: 40px; padding: 4px 12px; border-radius: 99px; border: 1px solid rgba(242, 182, 50, 0.55); background: rgba(0, 0, 0, 0.4); color: #fff3b0; font: bold 13px var(--f-ui); cursor: pointer; }
@media (max-width: 520px) { .ibkeys { gap: 3px; } .ibkey { width: 27px; min-height: 46px; } .ibkey b { font-size: 13px; } .ibkey i { width: 10px; right: -6px; } .ibhint { display: none; } }

/* touch: the 🎵 on the Arena's and the casino's own buttons, then the notes in two rows (low on the bottom), the
   sharp and the octave on the left, the next instrument and putting it away on the right */
#touchpad.arena .tcb[data-id=inst] { top: 8px; right: calc(168px + var(--sr)); width: 44px; height: 44px; font-size: 18px; }
#touchpad.casino .tcb[data-id=inst] { top: 8px; right: calc(116px + var(--sr)); width: 44px; height: 44px; font-size: 18px; }
#touchpad.busk .tcb { width: 58px; height: 54px; border-radius: 12px; font: bold 18px var(--f-ui); }
#touchpad.busk .tcb[data-id^=n] { background: rgba(244, 240, 232, 0.78); color: #2a1608; border-color: #8a6a3a; }
#touchpad.busk .tcb[data-id^=n].down { background: rgba(255, 210, 60, 0.95); }
#touchpad.busk .tcb[data-id=n0], #touchpad.busk .tcb[data-id=n5] { left: calc(50% - 163px); }
#touchpad.busk .tcb[data-id=n1], #touchpad.busk .tcb[data-id=n6] { left: calc(50% - 97px); }
#touchpad.busk .tcb[data-id=n2], #touchpad.busk .tcb[data-id=n7] { left: calc(50% - 31px); }
#touchpad.busk .tcb[data-id=n3], #touchpad.busk .tcb[data-id=n8] { left: calc(50% + 35px); }
#touchpad.busk .tcb[data-id=n4], #touchpad.busk .tcb[data-id=n9] { left: calc(50% + 101px); }
#touchpad.busk .tcb:is([data-id=n0], [data-id=n1], [data-id=n2], [data-id=n3], [data-id=n4]) { bottom: calc(14px + var(--sb)); }
#touchpad.busk .tcb:is([data-id=n5], [data-id=n6], [data-id=n7], [data-id=n8], [data-id=n9]) { bottom: calc(76px + var(--sb)); }
#touchpad.busk .tcb[data-id=sharp] { left: 12px; bottom: calc(144px + var(--sb)); width: 54px; height: 54px; border-radius: 50%; }
#touchpad.busk .tcb[data-id=oct] { left: 12px; bottom: calc(206px + var(--sb)); width: 54px; height: 54px; border-radius: 50%; font-size: 14px; }
#touchpad.busk .tcb[data-id=next] { bottom: calc(206px + var(--sb)); right: calc(12px + var(--sr)); width: 54px; height: 54px; border-radius: 50%; }
#touchpad.busk .tcb[data-id=away] { bottom: calc(144px + var(--sb)); right: calc(12px + var(--sr)); width: 54px; height: 54px; border-radius: 50%; }
