:root {
  --bg: #101010;
  --card: #1c1c1c;
  --text: #f4f1ea;
  --muted: #9a958c;
  --like: #2f7d3a;
  --never: #a33b2d;
  --skip: #2b4a78;
  --line: #2a2a2a;
}
* { box-sizing: border-box; }
html, body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, sans-serif;
}
body {
  padding-bottom: calc(72px + env(safe-area-inset-bottom));
}
.top {
  padding: 12px 14px 0;
  padding-top: max(12px, env(safe-area-inset-top));
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.station-chip {
  display: inline-block;
  background: var(--card);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 10px 18px;
  font-size: 18px;
  font-weight: 700;
}
.install-chip {
  background: var(--skip);
  color: var(--text);
  border: 1px solid #3d6aa8;
  border-radius: 999px;
  padding: 10px 16px;
  font-size: 15px;
  font-weight: 700;
}
.sheet {
  position: absolute;
  left: 14px;
  right: 14px;
  top: 56px;
  background: var(--card);
  border-radius: 16px;
  padding: 16px;
  z-index: 5;
  box-shadow: 0 12px 40px #000a;
}
.sheet-title { margin: 0 0 8px; font-size: 15px; }
.hidden { display: none !important; }
.now {
  padding: 12px 16px 24px;
  text-align: center;
}
.art {
  width: min(72vw, 280px);
  height: min(72vw, 280px);
  object-fit: cover;
  border-radius: 16px;
  background: #222;
  margin: 8px auto 16px;
  display: block;
}
.title {
  font-size: clamp(28px, 7vw, 42px);
  font-weight: 800;
  line-height: 1.1;
  margin: 0 8px 8px;
}
.artist {
  font-size: clamp(20px, 5vw, 28px);
  color: #ddd;
  margin-bottom: 8px;
}
.next { font-size: 14px; min-height: 1.2em; }
.muted { color: var(--muted); }
.tiny { font-size: 13px; }
.fat {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 20px;
}
.btn {
  border: 0;
  border-radius: 18px;
  color: #fff;
  font-weight: 800;
  font-size: 22px;
  min-height: 72px;
  padding: 16px;
  width: 100%;
}
.btn.like { background: var(--like); }
.btn.never { background: var(--never); }
.btn.skip { background: var(--skip); }
.btn.more { background: #444; margin-top: 12px; }
.btn.ghost { background: #333; font-size: 18px; min-height: 52px; }
.btn.small {
  min-height: 48px;
  font-size: 16px;
  border-radius: 12px;
}
.status { min-height: 1.4em; font-size: 15px; }
.tabs {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr;
  background: #161616;
  border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom);
  z-index: 4;
}
.tab {
  background: transparent;
  color: var(--muted);
  border: 0;
  min-height: 56px;
  font-size: 14px;
  font-weight: 700;
}
.tab.on { color: var(--text); }
.panel { padding: 8px 16px 24px; }
.panel h2 { margin: 8px 0 4px; }
.toggle {
  display: flex;
  gap: 10px;
  align-items: center;
  font-size: 16px;
  margin: 12px 0;
}
.list { display: flex; flex-direction: column; gap: 10px; }
.card {
  background: var(--card);
  border-radius: 14px;
  padding: 14px;
  text-align: left;
}
.card strong { display: block; font-size: 18px; }
.row-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 10px;
}
.row-actions .wide { grid-column: 1 / -1; }
.search-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  margin: 12px 0;
}
.search-row input {
  background: var(--card);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 14px;
  font-size: 18px;
  padding: 14px 16px;
  min-height: 56px;
  width: 100%;
}
.search-row .btn { width: auto; padding: 12px 18px; min-height: 56px; }
.modal {
  position: fixed;
  inset: 0;
  background: #000c;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  padding: 20px;
}
.modal-card {
  background: var(--card);
  border-radius: 16px;
  padding: 20px;
  width: min(480px, 100%);
}
.modal-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; }

@media (min-width: 1100px) {
  body { padding-bottom: 24px; }
  .tabs { display: none; }
  .hidden-mobile { display: block !important; }
  .desk {
    display: grid;
    grid-template-columns: minmax(300px, 400px) 1fr 1fr;
    grid-template-areas:
      "now search suggest"
      "now adv adv";
    gap: 12px;
    align-items: start;
    padding: 0 16px 24px;
  }
  .now-panel { grid-area: now; }
  .search-panel { grid-area: search; }
  .suggest-panel { grid-area: suggest; }
  .adv-panel { grid-area: adv; }
  .now { text-align: left; }
  .art { margin-left: 0; }
  .fat { max-width: 380px; }
}
@media (max-width: 1099px) {
  .now-panel { display: none; }
  .now-panel.show { display: block; }
  .hidden-mobile { display: none; }
  .panel.show { display: block; }
}
