:root {
  --bg: #0f0a1f; --bg2: #1a1233; --card: #231a45; --card2: #2c2156; --text: #f4f1ff; --muted: #a79fc8;
  --acc: #ff3d9a; --acc2: #7c4dff; --ok: #3ddc97; --warn: #ffb020; --bad: #ff5470; --line: #3a2f6b;
  color-scheme: dark;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.4 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; }
body { min-height: 100vh; background: radial-gradient(1200px 600px at 50% -200px, #3b1d78 0%, transparent 70%), var(--bg); }
h1, h2, h3 { margin: 0 0 .5rem; line-height: 1.2; }
h1 { font-size: 1.5rem; } h2 { font-size: 1.1rem; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }
.wrap { max-width: 640px; margin: 0 auto; padding: 16px 16px 96px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 14px; margin: 0 0 14px; }
.muted { color: var(--muted); } .small { font-size: .85rem; }
button, .btn { font: inherit; color: var(--text); background: var(--card2); border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; cursor: pointer; min-height: 44px; }
button:active { transform: scale(.97); }
button.primary { background: linear-gradient(135deg, var(--acc), var(--acc2)); border: 0; font-weight: 700; }
button.danger { color: var(--bad); } button.ok { color: var(--ok); }
button:disabled { opacity: .45; cursor: default; }
button.icon { min-width: 44px; padding: 8px; }
input, textarea, select { font: inherit; color: var(--text); background: var(--bg2); border: 1px solid var(--line); border-radius: 12px; padding: 11px 12px; width: 100%; min-height: 44px; }
textarea { min-height: 90px; resize: vertical; }
label { display: block; margin: 10px 0 4px; color: var(--muted); font-size: .9rem; }
.row { display: flex; gap: 10px; align-items: center; } .row.wrap-r { flex-wrap: wrap; } .grow { flex: 1; min-width: 0; }
.track { display: flex; gap: 12px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); }
.track:last-child { border-bottom: 0; }
.cover { width: 52px; height: 52px; border-radius: 8px; background: var(--bg2) center/cover; flex: none; }
.track .t { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.track .a { color: var(--muted); font-size: .88rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.badge { display: inline-block; font-size: .72rem; font-weight: 700; padding: 2px 8px; border-radius: 99px; background: var(--acc2); color: #fff; vertical-align: middle; }
.badge.wish { background: var(--acc); } .badge.mine { background: var(--ok); color: #062; }
.badge.warn { background: var(--warn); color: #320; }
.now { display: flex; gap: 14px; align-items: center; }
.now .cover { width: 96px; height: 96px; border-radius: 12px; }
.now .t { font-size: 1.2rem; font-weight: 700; } .now .a { color: var(--muted); }
.bar { height: 6px; background: var(--bg2); border-radius: 99px; overflow: hidden; margin-top: 10px; }
.bar > i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--acc), var(--acc2)); transition: width .4s linear; }
.toast { position: fixed; left: 12px; right: 12px; bottom: 80px; max-width: 616px; margin: 0 auto; padding: 14px 16px; border-radius: 14px; background: #fff; color: #1b1235; font-weight: 600; box-shadow: 0 8px 30px #0008; z-index: 50; }
.toast.ok { background: var(--ok); color: #04261a; } .toast.bad { background: var(--bad); color: #fff; } .toast.warn { background: var(--warn); color: #321; }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--bad); margin-right: 6px; } .dot.on { background: var(--ok); }
.tabs { position: fixed; left: 0; right: 0; bottom: 0; display: flex; background: var(--bg2); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); z-index: 40; }
.tabs button { flex: 1; border: 0; border-radius: 0; background: none; color: var(--muted); font-size: .8rem; min-height: 58px; }
.tabs button.act { color: #fff; box-shadow: inset 0 3px 0 var(--acc); }
.seg { display: flex; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.seg button { flex: 1; border: 0; border-radius: 0; background: var(--bg2); }
.seg button.act { background: linear-gradient(135deg, var(--acc), var(--acc2)); font-weight: 700; }
.switch { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 8px 0; }
.switch input { appearance: none; -webkit-appearance: none; flex: none; width: 52px; height: 30px; min-height: 0; padding: 0; border-radius: 99px; background: var(--bg2); border: 1px solid var(--line); position: relative; cursor: pointer; transition: background .2s; }
.switch input::after { content: ''; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: var(--muted); transition: transform .2s, background .2s; }
.switch input:checked { background: linear-gradient(135deg, var(--acc), var(--acc2)); border-color: transparent; }
.switch input:checked::after { transform: translateX(22px); background: #fff; }
input[type=range] { padding: 0; accent-color: var(--acc); background: none; border: 0; }
.big { font-size: 2.2rem; font-weight: 800; text-align: center; }
.err { color: var(--bad); }
.hidden { display: none !important; }
.qr { background: #fff; padding: 16px; border-radius: 16px; width: min(80vw, 360px); margin: 0 auto; }
.qr svg, .qr img { width: 100%; height: auto; display: block; }
