:root {
  --bg: #120f16;
  --ink: #f6f1ea;
  --muted: #8f8698;
  --soft: #1c1822;
  --line: #2b2532;
  --accent: #ff8fb1;
  --bezel: #efe7dc;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(120% 60% at 50% 0%, #2a1d2b 0%, var(--bg) 60%) fixed, var(--bg);
  color: var(--ink);
  font: 16px/1.4 -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}
main { max-width: 420px; margin: 0 auto; padding: max(24px, env(safe-area-inset-top)) 16px 48px; overflow-x: clip; }
.hidden { display: none !important; }
button { font: inherit; color: inherit; cursor: pointer; }

.mark { text-align: center; margin: 0 0 22px; font: italic 500 22px/1 ui-serif, Georgia, serif; letter-spacing: .01em; }
.mark span { color: var(--accent); font-style: normal; }

/* the little frame */
.frame {
  position: relative; margin: 0 auto; width: 204px; padding: 12px; border-radius: 22px;
  background: linear-gradient(160deg, #fbf6ef, var(--bezel));
  box-shadow: 0 24px 50px -12px #000c, 0 2px 0 #fff8 inset;
}
.screen {
  width: 180px; height: 240px; border-radius: 6px; overflow: hidden; background: #0d0b10;
  display: grid; place-items: center; transition: background .4s;
}
.screen img { display: block; max-width: 100%; animation: in .5s ease; }
.screen .empty { color: #5b5363; font-size: 13px; text-align: center; }
.sending {
  position: absolute; inset: 12px; border-radius: 6px; display: grid; place-items: center;
  background: #0009; color: var(--accent); font-size: 40px; opacity: 0; pointer-events: none; transition: opacity .2s;
}
.frame.busy .sending { opacity: 1; animation: beat 1s ease-in-out infinite; }
@keyframes beat { 50% { transform: scale(1.04); } }
@keyframes in { from { opacity: 0; transform: scale(.98); } }

.now { text-align: center; color: var(--muted); font-size: 13px; margin: 14px 0 26px; min-height: 18px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* one input for everything */
.bar, .login { display: flex; align-items: center; gap: 8px; background: var(--soft); border: 1px solid var(--line);
  border-radius: 999px; padding: 6px 6px 6px 18px; transition: border-color .2s; }
.bar:focus-within, .login:focus-within { border-color: #4a3f52; }
.bar input[type=text], .login input {
  flex: 1; min-width: 0; background: none; border: 0; outline: none; color: var(--ink); font: inherit; font-size: 16px; padding: 8px 0;
}
.bar input::placeholder, .login input::placeholder { color: #6f6678; }
.plus, .login button {
  flex: none; width: 40px; height: 40px; border-radius: 50%; border: 0; display: grid; place-items: center;
  background: var(--accent); color: #2a0f19; font-size: 24px; font-weight: 500; line-height: 1; cursor: pointer;
}
.login button { font-size: 20px; }
.plus input { display: none; }

.songs { list-style: none; margin: 10px 0 0; padding: 0; }
.songs button {
  width: 100%; display: flex; gap: 12px; align-items: center; text-align: left; background: none; border: 0;
  padding: 8px; border-radius: 14px;
}
.songs button:active, .songs button:hover { background: var(--soft); }
.songs img { width: 46px; height: 46px; border-radius: 8px; flex: none; }
.songs .txt { min-width: 0; flex: 1; }
.songs .t, .songs .a { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.songs .a { color: var(--muted); font-size: 14px; }
.songs .note { color: var(--muted); padding: 10px 8px; font-size: 14px; }

.recent h2 { font-size: 13px; font-weight: 500; color: var(--muted); margin: 30px 0 10px; }
.strip { display: flex; gap: 10px; overflow-x: auto; scrollbar-width: none; padding-bottom: 4px; margin: 0 -16px; padding-inline: 16px; }
.strip::-webkit-scrollbar { display: none; }
.strip button {
  flex: none; width: 60px; height: 80px; padding: 0; border: 0; border-radius: 8px; overflow: hidden;
  display: grid; place-items: center; outline: 2px solid transparent; outline-offset: 2px;
}
.strip button.on { outline-color: var(--accent); }
.strip img { max-width: 100%; display: block; }

.foot { text-align: center; color: #5b5363; font-size: 13px; margin-top: 36px; }
.foot button { background: none; border: 0; padding: 0; color: var(--muted); font-size: 13px; }

.toast {
  position: fixed; left: 50%; bottom: max(24px, env(safe-area-inset-bottom)); transform: translate(-50%, 16px); opacity: 0;
  pointer-events: none; background: var(--ink); color: var(--bg); padding: 10px 18px; border-radius: 999px;
  font-size: 14px; font-weight: 600; transition: opacity .2s, transform .2s; max-width: calc(100% - 32px); text-align: center;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.err { background: #ffb0b0; color: #3a0d0d; }
