/* buttons, chips, fields, shelves, cards, rows, sheet, toast */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 46px; padding: 0 22px; border-radius: 99px;
  font-weight: 600; font-size: 15px; transition: transform .15s var(--ease), background .2s, color .2s, box-shadow .2s; white-space: nowrap; }
.btn:active { transform: scale(.96); }
.btn-sun { background: linear-gradient(135deg, var(--sun), #D9B8F2 60%, var(--ember)); color: var(--sun-ink); box-shadow: 0 8px 24px rgba(184, 166, 255, .28); }
.btn-sun:hover { background: var(--sun-2); }
.btn-soft { background: var(--s2); color: var(--txt); }
.btn-soft:hover { background: var(--s3); }
.btn-line { box-shadow: inset 0 0 0 1.5px var(--line2); color: var(--txt); }
.btn-line:hover { box-shadow: inset 0 0 0 1.5px var(--sub); }
.btn.sm { height: 36px; padding: 0 16px; font-size: 13.5px; }
.btn.block { width: 100%; }
.btn[disabled] { opacity: .5; pointer-events: none; }
.ibtn { width: 44px; height: 44px; border-radius: 50%; display: inline-grid; place-items: center; color: var(--txt); transition: background .2s, transform .15s, color .2s; flex: none; }
.ibtn:hover { background: rgba(255, 255, 255, .07); }
.ibtn:active { transform: scale(.9); }
.ibtn.sm { width: 36px; height: 36px; }
.ibtn.soft { background: var(--s2); }
.ibtn.on { color: var(--sun); }
.ibtn.love.on { color: var(--ember); }
.play-fab { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(135deg, var(--sun), var(--ember)); color: var(--sun-ink); box-shadow: 0 8px 26px rgba(184, 166, 255, .32); transition: transform .3s var(--spring); }
.play-fab:hover { transform: scale(1.06); }
.play-fab:active { transform: scale(.93); }
.play-fab svg.i { width: 26px; height: 26px; }

.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.chips::-webkit-scrollbar, .rail::-webkit-scrollbar { display: none; }
.chip { height: 34px; padding: 0 15px; border-radius: 99px; background: var(--s1); box-shadow: inset 0 0 0 1px var(--line); font-size: 13.5px; font-weight: 500; white-space: nowrap; transition: background .2s, color .2s; display: inline-flex; align-items: center; gap: 6px; }
.chip.on { background: var(--txt); color: var(--bg); box-shadow: none; }
.chip:hover:not(.on) { background: var(--s2); }

.field { display: flex; align-items: center; gap: 10px; height: 50px; padding: 0 16px; border-radius: 14px; background: var(--s1); box-shadow: inset 0 0 0 1px var(--line); transition: box-shadow .2s; }
.field:focus-within { box-shadow: inset 0 0 0 1.5px var(--sun); }
.field input { flex: 1; min-width: 0; height: 100%; background: none; border: 0; outline: 0; font-size: 16px; }
.field input::placeholder { color: var(--mute); }
.field svg { color: var(--sub); }

/* shelves */
.shelf { margin-top: 30px; }
.shelf-h { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.shelf-h .more { color: var(--sub); font-size: 13px; font-weight: 500; padding: 4px 0; }
.shelf-h .more:hover { color: var(--txt); }
.rail { display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: 16px; margin-inline: -16px; padding-inline: 16px; padding-bottom: 4px; }
.rail > * { scroll-snap-align: start; flex: none; }

/* cards */
.card { width: 148px; cursor: pointer; }
.card .art { position: relative; aspect-ratio: 1; border-radius: 14px; overflow: hidden; background: var(--s2); box-shadow: 0 6px 18px rgba(0, 0, 0, .28); }
.card .art img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s var(--ease); }
.card:hover .art img { transform: scale(1.04); }
.card .c-t { margin-top: 9px; font-weight: 600; font-size: 14px; }
.card .c-s { font-size: 12.5px; color: var(--sub); }
.card .hover-play { position: absolute; inset-inline-end: 8px; bottom: 8px; width: 40px; height: 40px; opacity: 0; transform: translateY(6px); transition: .2s var(--ease); box-shadow: 0 6px 16px rgba(0,0,0,.4); }
.card:hover .hover-play { opacity: 1; transform: none; }
.card.round .art { border-radius: 50%; }
.card.round { text-align: center; width: 128px; }
.card .dl-dot { position: absolute; top: 8px; inset-inline-start: 8px; width: 24px; height: 24px; border-radius: 50%; background: rgba(0, 0, 0, .6); color: var(--sun); display: grid; place-items: center; }
.card .dl-dot svg { width: 14px; height: 14px; }
.mix .art::after { content: ''; position: absolute; inset: 0; background: linear-gradient(to top, rgba(var(--mc), .95) 8%, rgba(var(--mc), .15) 60%, transparent); }
.mix .mix-name { position: absolute; z-index: 1; inset-inline: 12px; bottom: 10px; font: 700 21px/1.1 var(--kufi); color: #fff; text-shadow: 0 2px 10px rgba(0,0,0,.3); }
.mix .mix-badge { position: absolute; z-index: 1; top: 10px; inset-inline-start: 10px; width: 26px; height: 26px; }

/* quick grid (recent) */
.quick { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.qk { display: flex; align-items: center; gap: 10px; height: 56px; border-radius: 10px; overflow: hidden; background: var(--s1); cursor: pointer; padding-inline-end: 8px; transition: background .2s; }
.qk:hover { background: var(--s2); }
.qk img { width: 56px; height: 56px; object-fit: cover; background: var(--s2); }
.qk b { font-size: 13px; font-weight: 600; flex: 1; min-width: 0; }

/* song rows */
.rows { display: flex; flex-direction: column; }
.row { display: flex; align-items: center; gap: 12px; min-height: 64px; padding: 6px 8px; margin-inline: -8px; border-radius: 12px; cursor: pointer; transition: background .15s; position: relative; }
.row:hover { background: rgba(255, 255, 255, .04); }
.row:active { background: rgba(255, 255, 255, .07); }
.row img { width: 52px; height: 52px; border-radius: 8px; object-fit: cover; background: var(--s2); flex: none; }
.row .r-i { flex: 1; min-width: 0; }
.row .r-t { font-weight: 500; font-size: 15px; }
.row .r-s { font-size: 13px; color: var(--sub); display: flex; align-items: center; gap: 6px; }
.row .r-s svg { width: 14px; height: 14px; color: var(--sun); flex: none; }
.row .rank { min-width: 30px; text-align: center; font: 700 18px var(--kufi); color: var(--sub); flex: none; }
.row.now .r-t { color: var(--sun); }
.row .handle { color: var(--mute); cursor: grab; touch-action: none; }
.row.dragging { background: var(--s2); box-shadow: 0 10px 30px rgba(0,0,0,.5); z-index: 5; }
.eq { display: inline-flex; gap: 2px; align-items: flex-end; height: 14px; width: 14px; flex: none; }
.eq i { width: 3px; background: var(--sun); border-radius: 1px; animation: eq 1s ease-in-out infinite; }
.eq i:nth-child(2) { animation-delay: -.4s; } .eq i:nth-child(3) { animation-delay: -.7s; }
.paused .eq i { animation-play-state: paused; }
@keyframes eq { 0%, 100% { height: 30%; } 50% { height: 100%; } }
.chart-cols { display: grid; grid-auto-flow: column; grid-template-rows: repeat(4, auto); grid-auto-columns: min(86vw, 360px); gap: 0 18px; overflow-x: auto; scroll-snap-type: x mandatory; margin-inline: -16px; padding-inline: 16px; scrollbar-width: none; }
.chart-cols > * { scroll-snap-align: start; margin-inline: 0; }

/* empty / notice */
.empty { text-align: center; padding: 48px 24px; color: var(--sub); }
.empty svg.i { width: 44px; height: 44px; color: var(--mute); margin: 0 auto 12px; display: block; }
.empty b { display: block; color: var(--txt); font-size: 17px; margin-bottom: 4px; }
.notice { display: flex; gap: 14px; align-items: center; padding: 16px; border-radius: var(--r2); background: var(--s1); box-shadow: inset 0 0 0 1px var(--line); }

/* bottom sheet */
#sheet { position: fixed; inset: 0; z-index: 200; display: flex; align-items: flex-end; justify-content: center; background: rgba(0, 0, 0, .55); opacity: 0; transition: opacity .25s; }
#sheet.open { opacity: 1; }
#sheet .sh { width: 100%; max-width: 520px; max-height: 88dvh; overflow-y: auto; background: var(--s1); border-radius: var(--r3) var(--r3) 0 0;
  padding: 10px 16px calc(18px + var(--safe-b)); transform: translateY(100%); transition: transform .32s var(--ease); box-shadow: 0 -10px 40px rgba(0,0,0,.4); }
#sheet.open .sh { transform: none; }
#sheet .grab { width: 40px; height: 4px; border-radius: 4px; background: var(--s3); margin: 0 auto 12px; }
.sh-head { display: flex; gap: 12px; align-items: center; padding: 4px 0 12px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.sh-head img { width: 52px; height: 52px; border-radius: 8px; object-fit: cover; }
.sh-title { font: 700 20px var(--kufi); margin: 4px 0 12px; }
.sh-item { display: flex; align-items: center; gap: 14px; width: 100%; height: 52px; padding: 0 6px; border-radius: 12px; text-align: start; font-size: 15px; transition: background .15s; }
.sh-item:hover { background: var(--s2); }
.sh-item svg.i { color: var(--sub); }
.sh-item.danger, .sh-item.danger svg.i { color: var(--ember); }
.sh-form { display: flex; flex-direction: column; gap: 12px; padding: 4px 0 6px; }
.sh-form .err { color: var(--ember); font-size: 13px; min-height: 18px; }
@media (min-width: 960px) { #sheet { align-items: center; } #sheet .sh { border-radius: var(--r3); transform: translateY(24px) scale(.98); opacity: 0; transition: .25s var(--ease); } #sheet.open .sh { opacity: 1; transform: none; } }

#toast { position: fixed; z-index: 300; inset-inline: 0; margin-inline: auto; width: max-content; max-width: calc(100% - 32px);
  bottom: calc(var(--nav-h) + var(--mini-h) + var(--safe-b) + 18px); padding: 11px 18px; border-radius: 99px; background: var(--txt); color: var(--bg);
  font-weight: 500; font-size: 14px; display: flex; gap: 8px; align-items: center; box-shadow: 0 10px 30px rgba(0, 0, 0, .5);
  transition: opacity .25s, transform .25s var(--ease); }
#toast.off { opacity: 0; transform: translateY(12px); pointer-events: none; }
#toast svg.i { width: 18px; height: 18px; }

/* shuffle: two arcs that spin round each other when pressed (and when its notice appears) - fast, a small overshoot */
svg.i .shf { transform-box: view-box; transform-origin: 12px 12px; }
svg.i.spin .shf, #toast svg.i .shf { animation: shf-spin .52s cubic-bezier(.3, 1.45, .5, 1) both; }
@keyframes shf-spin { 0% { transform: rotate(0) scale(1); } 40% { transform: rotate(250deg) scale(.82); } 100% { transform: rotate(360deg) scale(1); } }
.toggle { width: 46px; height: 28px; border-radius: 99px; background: var(--s3); position: relative; transition: background .2s; flex: none; }
.toggle::after { content: ''; position: absolute; top: 3px; inset-inline-start: 3px; width: 22px; height: 22px; border-radius: 50%; background: var(--txt); transition: transform .2s var(--ease); }
.toggle.on { background: var(--sun); }
.toggle.on::after { transform: translateX(-18px); background: var(--sun-ink); }
[dir=ltr] .toggle.on::after { transform: translateX(18px); }
@media (min-width: 960px) { .card { width: 176px; } .card.round { width: 150px; } .quick { grid-template-columns: repeat(3, 1fr); } #toast { bottom: 110px; } }

/* share on Snapchat: the clip's picture beside its controls */
.snap { display: flex; gap: 16px; align-items: flex-start; margin-bottom: 16px; }
.snap-prev { flex: none; width: 112px; aspect-ratio: 9 / 16; border-radius: 14px; overflow: hidden; background: var(--s2); box-shadow: 0 10px 28px rgba(0, 0, 0, .28); }
.snap-prev canvas { width: 100%; height: 100%; display: block; }
.snap-ctl { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.snap-lbl { font-size: 13.5px; color: var(--sub); }
.snap-lbl b { color: var(--txt); font-weight: 600; }
.snap-ctl .chips { flex-wrap: wrap; }
/* the send button in Snapchat's own yellow, so it reads as "this goes to Snapchat" at a glance */
.snap-go.btn-sun { --snap: #FFFC00; min-height: 50px; border-radius: 999px; background: var(--snap); color: #111; font-weight: 700; box-shadow: 0 8px 24px rgba(255, 252, 0, .18); transition: transform .18s ease, box-shadow .18s ease, filter .18s ease; }
.snap-go.btn-sun:hover { background: var(--snap); filter: brightness(.96); box-shadow: 0 10px 28px rgba(255, 252, 0, .26); }
.snap-go.btn-sun:active { transform: scale(.98); }
.snap-go.btn-sun:focus-visible { outline: 3px solid var(--txt); outline-offset: 3px; }
.snap-go[aria-busy=true] { filter: saturate(.75); }
.snap-go[aria-busy=true] svg.i { animation: float 1.4s ease-in-out infinite; }
.snap-note { font-size: 12.5px; margin-top: 10px; line-height: 1.6; }
.snap-steps { list-style: none; counter-reset: st; margin: 14px 0 0; padding: 0; display: grid; gap: 8px; }
.snap-steps li { counter-increment: st; display: flex; gap: 10px; align-items: flex-start; font-size: 13.5px; line-height: 1.6; color: var(--sub); }
.snap-steps li::before { content: counter(st); flex: none; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; margin-top: 1px; font-size: 12px; font-weight: 700; color: #111; background: #FFFC00; }
.snap-steps li:last-child { color: var(--txt); }
