:root {
  --bg: #050806; --panel: #0e1610; --panel-2: #16211a; --neon: #4dff2e; --neon-soft: #9dff6b;
  --text: #eafff0; --muted: #84a78c; --line: rgba(77, 255, 46, .18); --line-strong: rgba(77, 255, 46, .45);
  --red: #ff8a80; --amber: #ffc94d; --ink: #031003; --pad: 20px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }
html { background: var(--bg); -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg); color: var(--text); font: 400 16px/1.5 Sora, system-ui, sans-serif; min-height: 100vh; min-height: 100dvh;
  -webkit-tap-highlight-color: transparent;
}
body.locked { overflow: hidden; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; touch-action: manipulation; }
a { color: var(--neon-soft); }
:focus-visible { outline: 3px solid var(--neon-soft); outline-offset: 2px; }
#mineTitle:focus { outline: none; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

main { max-width: 620px; margin: 0 auto; padding: 0 var(--pad) calc(110px + env(safe-area-inset-bottom)); }

/* Top section */
.top { padding: calc(18px + env(safe-area-inset-top)) 0 16px; }
.brand { font: 400 22px/1 "Bebas Neue", Impact, sans-serif; letter-spacing: 3px; }
.brand span, h1 span { color: var(--neon); }
h1 { font: 400 clamp(60px, 19vw, 104px)/.86 "Bebas Neue", Impact, sans-serif; letter-spacing: 1px; margin: 20px 0 14px; }
.top.small h1 { font-size: clamp(48px, 14vw, 72px); margin: 16px 0 6px; }
.lead { font-size: 18px; line-height: 1.45; font-weight: 600; }

.closed { background: var(--panel); border-left: 4px solid var(--amber); padding: 14px 16px; border-radius: 0 10px 10px 0; margin-bottom: 14px; }
.closed b { display: block; color: var(--amber); }
.closed a { display: inline-block; padding: 12px 0; }

/* Search */
.finder { position: sticky; top: 0; z-index: 5; background: var(--bg); margin: 0 calc(var(--pad) * -1); padding: 8px 0 10px; border-bottom: 1px solid var(--line); }
.searchbox { position: relative; margin: 0 var(--pad); }
input[type="search"], input[type="text"] {
  width: 100%; height: 56px; padding: 0 18px; font-size: 18px; background: var(--panel); border: 2px solid var(--line-strong);
  border-radius: 14px; appearance: none; -webkit-appearance: none;
}
input[type="search"] { padding-right: 56px; }
input[type="search"]::-webkit-search-cancel-button { display: none; }
input::placeholder { color: var(--muted); opacity: 1; }
input:focus { outline: none; border-color: var(--neon); }
.clear { position: absolute; right: 4px; top: 4px; width: 48px; height: 48px; display: grid; place-items: center; }
.clear svg { width: 22px; height: 22px; stroke: var(--muted); stroke-width: 2.5; stroke-linecap: round; }

.genres { display: flex; gap: 8px; overflow-x: auto; padding: 10px var(--pad) 4px; scrollbar-width: none; }
.genres::-webkit-scrollbar { display: none; }
/* Nothing searched or picked yet: show every genre. Afterwards they slide in one row. */
.genres.all { flex-wrap: wrap; overflow: visible; }
.genres button {
  flex: none; min-height: 48px; padding: 0 16px; border: 1px solid var(--line-strong); border-radius: 24px;
  font: 700 14px/1 "Space Mono", monospace; color: var(--neon-soft); white-space: nowrap;
}
.genres button[aria-pressed="true"] { background: var(--neon); border-color: var(--neon); color: var(--ink); }

/* List */
.status { color: var(--muted); padding: 14px 0 8px; font-size: 15px; }
.songs { list-style: none; }
.songs button { display: block; width: 100%; text-align: left; padding: 13px 0; border-bottom: 1px solid var(--line); min-height: 64px; }
.songs button:active { background: var(--panel); }
.song-title { display: block; font-weight: 700; font-size: 18px; line-height: 1.3; overflow-wrap: anywhere; }
.song-line { display: flex; flex-wrap: wrap; gap: 2px 12px; align-items: baseline; }
.song-artist { color: var(--muted); overflow-wrap: anywhere; }
.tag { font: 400 12px/1.6 "Space Mono", monospace; color: var(--neon-soft); }
.more, .ghost { display: block; width: 100%; min-height: 52px; margin-top: 16px; border: 1px solid var(--line-strong); border-radius: 14px; color: var(--neon-soft); font-weight: 600; }

.notfound { padding: 22px 0; }
.notfound p { overflow-wrap: anywhere; }
.sorry { font: 400 44px/1 "Bebas Neue", Impact, sans-serif; letter-spacing: 1px; color: var(--amber); margin-bottom: 10px; }
.muted { color: var(--muted); margin-top: 6px; }
.foot { padding-top: 34px; color: var(--muted); font-size: 13px; }
.foot a { display: inline-block; padding: 14px 6px; }
.text p { margin: 0 0 16px; max-width: 60ch; }

/* Buttons */
.solid { display: block; width: 100%; min-height: 58px; border-radius: 14px; background: var(--neon); color: var(--ink); font-weight: 700; font-size: 18px; }
.solid:disabled { background: var(--panel-2); color: var(--muted); cursor: default; }

/* Bottom bar */
.bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 10; display: flex; justify-content: space-between; align-items: center; gap: 12px;
  min-height: 60px; padding: 10px max(var(--pad), calc((100vw - 580px) / 2)) calc(10px + env(safe-area-inset-bottom));
  background: var(--panel-2); border-top: 2px solid var(--neon); text-align: left; font-weight: 600;
}
.bar span { white-space: nowrap; }
.bar b { font: 700 13px/1.3 "Space Mono", monospace; text-align: right; }

/* Request panel */
.sheet {
  position: fixed; inset: auto 0 0 0; margin: 0 auto; width: 100%; max-width: 620px; max-height: 92vh; max-height: 92dvh; overflow-y: auto;
  background: var(--panel); color: var(--text); border: 0; border-top: 3px solid var(--neon); border-radius: 20px 20px 0 0;
  padding: 22px var(--pad) calc(20px + env(safe-area-inset-bottom));
}
.sheet::backdrop { background: rgba(0, 0, 0, .72); }
.picked { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; margin-bottom: 14px; }
.picked h2 { font-size: 23px; line-height: 1.2; overflow-wrap: anywhere; }
.picked p { color: var(--muted); overflow-wrap: anywhere; }
.picked p.tag { color: var(--neon-soft); }
.change { flex: none; min-height: 48px; padding: 0 16px; border: 1px solid var(--line-strong); border-radius: 24px; color: var(--neon-soft); font-weight: 600; }
.others { color: var(--neon-soft); margin-bottom: 14px; }
.sheet label { display: block; font-weight: 600; margin-bottom: 6px; }
.sheet input { background: var(--bg); }
.problem { color: var(--red); min-height: 24px; padding: 6px 0 8px; font-weight: 600; }
.fine { color: var(--muted); text-align: center; margin-top: 12px; font-size: 14px; }

/* My requests */
.live { font: 400 13px/1.5 "Space Mono", monospace; color: var(--muted); padding: 2px 0 12px; }
.live.off { color: var(--amber); }
.linkbox { margin-top: 30px; color: var(--muted); font-size: 15px; }
.linkbox .ghost { margin-top: 10px; }
.linkbox input { margin-top: 10px; font-size: 14px; height: 48px; }
.cards li.new { animation: news 2.4s ease-out; }
.bar.new { animation: news-bar 2.4s ease-out; }
@keyframes news { from, 35% { background: rgba(77, 255, 46, .4); } to { background: var(--panel); } }
@keyframes news-bar { from, 35% { background: rgba(77, 255, 46, .55); } to { background: var(--panel-2); } }
.sent { background: var(--panel); border-left: 4px solid var(--neon); border-radius: 0 10px 10px 0; padding: 14px 16px; margin: 8px 0 14px; }
.sent b { display: block; color: var(--neon-soft); }
.cards { list-style: none; display: grid; gap: 12px; margin-bottom: 20px; }
.cards li { background: var(--panel); border-radius: 14px; padding: 16px; }
.cards .when { font: 400 13px/1.5 "Space Mono", monospace; color: var(--muted); }
.answer { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); font-weight: 700; }
.answer small { display: block; font-weight: 400; font-size: 15px; color: var(--text); }
.answer.waiting { color: var(--muted); }
.answer.soon, .answer.played { color: var(--neon); }
.answer.no { color: var(--red); }
.answer.later { color: var(--amber); }

@media (min-width: 700px) {
  .sheet { inset: 0; margin: auto; height: fit-content; max-width: 480px; border-radius: 20px; border: 1px solid var(--line-strong); }
  .genres { flex-wrap: wrap; overflow: visible; }
  .finder { position: static; }
}
@media (prefers-reduced-motion: reduce) {
  .cards li.new, .bar.new { animation: none; box-shadow: inset 4px 0 0 var(--neon); }
}
@media (hover: hover) {
  .songs button:hover { background: var(--panel); }
  .genres button:hover { border-color: var(--neon); }
}
