:root {
  --ink: #021B2A;
  --panel: #0A2B3B;
  --line: #1E4A5E;
  --text: #F5FDFF;
  --muted: #C9D6DD;
  --violet: #7C3AED;
  --violet-soft: #C4B5FD;
  --violet-bg: #1B1840;
  --heaven: #A6E1FA;
  --hell: #E5484D;
  --hell-soft: #F08A8D;
  --green: #1DB954;
}

* { box-sizing: border-box; }
html, body { margin: 0; background: var(--ink); color: var(--text); font-family: Inter, system-ui, sans-serif; }
body { min-height: 100vh; -webkit-tap-highlight-color: transparent; }
button, input { font: inherit; }
a { color: var(--heaven); }
:focus-visible { outline: 2px solid var(--violet-soft); outline-offset: 2px; }

.wrap { max-width: 560px; margin: 0 auto; padding: 20px 20px 96px; display: flex; flex-direction: column; gap: 16px; }
.wrap.wide { max-width: 1100px; }

.brand { display: flex; align-items: center; gap: 10px; min-height: 44px; }
.brand h1 { margin: 0; font-family: 'Space Grotesk', sans-serif; font-size: 20px; font-weight: 700; letter-spacing: .04em; }
.brand small { display: block; font-size: 11px; letter-spacing: .14em; color: var(--muted); }
.brand .spacer { flex: 1; }

.badge { height: 28px; padding: 0 12px; display: inline-flex; align-items: center; border-radius: 14px; font-size: 12px; font-weight: 600; }
.badge.spotify { background: var(--green); color: var(--ink); }
.badge.master { background: var(--violet); }

.now { background: var(--violet); border-radius: 16px; padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.now.dark { background: var(--panel); border: 1px solid var(--line); }
.label { font-size: 11px; font-weight: 600; letter-spacing: .16em; color: var(--heaven); text-transform: uppercase; }
.now:not(.dark) .label { color: #EDE4FD; }
.now-row { display: flex; gap: 14px; align-items: center; }
.cover { width: 64px; height: 64px; border-radius: 10px; flex-shrink: 0; background: var(--hell) center/cover no-repeat; }
.cover.sm { width: 44px; height: 44px; border-radius: 8px; }
.cover.xs { width: 40px; height: 40px; border-radius: 8px; }
.title { font-family: 'Space Grotesk', sans-serif; font-size: 18px; font-weight: 700; }
.sub { font-size: 14px; color: #EDE4FD; }
.now.dark .sub { color: var(--muted); }
.ellipsis { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.grow { flex: 1; min-width: 0; }
.bar { height: 4px; border-radius: 2px; background: rgba(255, 255, 255, .25); overflow: hidden; }
.bar > div { height: 100%; width: 0; background: var(--text); border-radius: 2px; transition: width .5s linear; }
.now.dark .bar { background: var(--line); }
.now.dark .bar > div { background: var(--violet); }
.times { display: flex; justify-content: space-between; font-size: 12px; color: #EDE4FD; }
.now.dark .times { color: var(--muted); }

.searchbox { display: flex; align-items: center; gap: 10px; height: 48px; padding: 0 16px; border-radius: 12px; background: var(--panel); border: 1px solid var(--line); color: var(--muted); text-decoration: none; cursor: pointer; width: 100%; font-size: 15px; }
.searchbox.focus, .searchbox:focus-within { border-color: var(--violet); }
.searchbox input { flex: 1; min-width: 0; background: transparent; border: 0; outline: none; color: var(--text); font-size: 16px; }

.head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.head h2 { margin: 0; font-family: 'Space Grotesk', sans-serif; font-size: 18px; font-weight: 700; }
.hint { font-size: 12px; color: var(--muted); }

.list { display: flex; flex-direction: column; gap: 4px; }
.row { display: flex; align-items: center; gap: 12px; min-height: 60px; padding: 0 4px 0 8px; border-radius: 12px; }
.row.first { background: var(--panel); }
.row.pinned { background: var(--violet-bg); }
.row .pos { width: 18px; font-size: 13px; color: var(--muted); text-align: center; flex-shrink: 0; }
.row .t { font-size: 15px; font-weight: 600; }
.row .m { font-size: 12px; color: var(--muted); }
.row.pinned .m { color: var(--violet-soft); }
.empty { padding: 24px 8px; text-align: center; color: var(--muted); font-size: 14px; }

.like { display: flex; align-items: center; gap: 6px; height: 44px; min-width: 64px; padding: 0 12px; border: 0; border-radius: 22px; background: var(--panel); color: var(--text); font-weight: 600; font-size: 14px; cursor: pointer; flex-shrink: 0; }
.like svg { fill: none; }
.like.on { background: var(--violet); }
.like.on svg { fill: var(--text); }
.like:disabled { opacity: .6; cursor: default; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 44px; padding: 0 16px; border-radius: 10px; border: 0; background: var(--violet); color: var(--text); font-weight: 600; font-size: 14px; cursor: pointer; text-decoration: none; white-space: nowrap; }
.btn.ghost { background: transparent; border: 1px solid var(--line); font-weight: 500; }
.btn.danger { background: transparent; border: 1px solid #5A2A33; color: var(--hell-soft); font-weight: 500; }
.btn.pill { border-radius: 22px; }
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .5; cursor: default; }
.icon-btn { width: 44px; height: 44px; border: 0; border-radius: 22px; background: transparent; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; color: var(--muted); flex-shrink: 0; }
.chip { display: inline-flex; align-items: center; gap: 4px; height: 36px; padding: 0 12px; border-radius: 18px; border: 1px solid var(--line); font-size: 13px; color: var(--muted); white-space: nowrap; }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); width: min(520px, calc(100% - 40px)); display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 14px; background: var(--text); color: var(--ink); box-shadow: 0 12px 36px rgba(2, 27, 42, .35); z-index: 10; }
.toast[hidden] { display: none; }
.toast .t { font-size: 14px; font-weight: 600; }
.toast .m { font-size: 12px; color: #3D5866; }
.toast.err { background: #FDE8E8; }

.controls { display: flex; align-items: center; justify-content: center; gap: 20px; }
.round { width: 64px; height: 64px; border-radius: 32px; border: 0; background: var(--violet); display: flex; align-items: center; justify-content: center; cursor: pointer; }
.round.sm { width: 52px; height: 52px; border-radius: 26px; border: 1px solid var(--line); background: transparent; }
.status { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); }
.dot { width: 8px; height: 8px; border-radius: 4px; background: var(--muted); flex-shrink: 0; }
.dot.ok { background: var(--green); }
.dot.bad { background: var(--hell); }

.tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--line); }
.tabs button { height: 44px; padding: 0 14px; border: 0; background: transparent; color: var(--muted); font-weight: 600; cursor: pointer; border-bottom: 2px solid transparent; }
.tabs button.on { color: var(--text); border-bottom-color: var(--violet); }

.card { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 20px; display: flex; flex-direction: column; gap: 14px; }
.card.danger { border-color: #5A2A33; }
.card h3 { margin: 0; font-size: 12px; font-weight: 600; letter-spacing: .16em; color: var(--heaven); text-transform: uppercase; }
.card.danger h3 { color: var(--hell-soft); }
.card p { margin: 0; font-size: 14px; color: var(--muted); }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
.field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--muted); }
.inline { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.input { height: 44px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--ink); color: var(--text); font-size: 15px; min-width: 0; }
.input.grow { flex: 1; }
.kv { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.kv:last-child { border-bottom: 0; padding-bottom: 0; }
.kv span:last-child { color: var(--muted); text-align: right; }

.radio { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 8px 12px; border-radius: 10px; border: 1px solid var(--line); background: transparent; color: var(--text); text-align: left; cursor: pointer; width: 100%; }
.radio.on { border-color: var(--violet); background: var(--violet-bg); }
.radio .ring { width: 18px; height: 18px; border-radius: 9px; border: 2px solid var(--line); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.radio.on .ring { border-color: var(--violet); }
.radio.on .ring::after { content: ''; width: 8px; height: 8px; border-radius: 4px; background: var(--violet-soft); }

.handle { cursor: grab; touch-action: none; color: var(--muted); display: flex; align-items: center; padding: 8px 2px; }
.sortable-ghost { opacity: .35; }
.qr { width: 140px; height: 140px; border-radius: 8px; background: var(--text); }
.notice { padding: 12px 14px; border-radius: 12px; background: var(--violet-bg); color: var(--violet-soft); font-size: 14px; }
.hidden { display: none !important; }
