:root{
  --bg:#f6f3ef;
  --card:#fff;
  --border:#e7e7e7;
  --text:#111;
  --muted:#666;
  --shadow: 0 10px 30px rgba(0,0,0,.06);
  --radius: 18px;
}

*{ box-sizing:border-box; }
html, body{ height:100%; }
body{
  margin:0;
  background:var(--bg);
  color:var(--text);
  font-family: system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
}

.topbar{
  position: sticky;
  top:0;
  z-index: 50;
  background: rgba(246,243,239,.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(0,0,0,.06);
  padding: 14px 14px 12px;
  display:flex;
  flex-wrap:wrap;
  gap: 12px;
  align-items: flex-end;
  justify-content: space-between;
}

.brand{
  font-weight: 1000;
  font-size: 22px;
  letter-spacing: -.3px;
}
.subtitle{
  color: var(--muted);
  font-size: 13px;
  margin-top: 2px;
}
.topbar__right{
  display:flex;
  flex-wrap:wrap;
  gap: 10px;
}

.field{
  display:flex;
  flex-direction:column;
  gap:6px;
  min-width: 180px;
}
.field__label{
  font-size: 12px;
  font-weight: 900;
  color:#222;
}
.field__input{
  padding: 10px 12px;
  border:1px solid #cfcfcf;
  border-radius: 14px;
  font-size: 16px;
  background:#fff;
}

.shell{
  max-width: 1280px;
  margin: 0 auto;
  padding: 12px;
}

.card{
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 14px;
}

.card--player{ margin-bottom: 14px; }

.now__ref{
  font-weight: 1000;
  font-size: 16px;
  color:#222;
}
.now__title{
  margin-top: 6px;
  color: var(--muted);
  font-size: 14px;
}

.controls{
  display:grid;
  grid-template-columns: 1fr 1.2fr 1fr 1fr;
  gap: 10px;
  margin-top: 12px;
}

.btn{
  padding: 12px 14px;
  border: 1px solid #cfcfcf;
  border-radius: 16px;
  background: #fff;
  cursor: pointer;
  font-size: 16px;
  font-weight: 900;
}
.btn:active{ transform: translateY(1px); }
.btn--primary{
  border-color:#111;
  background:#111;
  color:#fff;
}
.btn--ghost{
  background:#fff;
}
.btn--icon{
  width: 44px;
  height: 44px;
  padding: 0;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  font-size: 18px;
}

.seek{ margin-top: 12px; }
.seek__bar{
  width: 100%;
  height: 44px; /* makes slider easy to grab */
}
.seek__meta{
  display:flex;
  justify-content: space-between;
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
}

.row{
  display:flex;
  flex-wrap:wrap;
  gap: 12px;
  align-items:flex-end;
}
.row--spread{
  justify-content: space-between;
  margin-top: 12px;
}

.mini{
  display:flex;
  flex-direction:column;
  gap:6px;
}
.mini__label{
  font-size: 12px;
  color: var(--muted);
  font-weight: 900;
}
.mini__input{
  padding: 10px 12px;
  border:1px solid #cfcfcf;
  border-radius: 14px;
  font-size: 16px;
  background:#fff;
  min-width: 120px;
}

.stepper{
  display:flex;
  gap:10px;
  align-items:center;
}
.stepper__input{
  width: 110px;
  padding: 10px 12px;
  border:1px solid #cfcfcf;
  border-radius: 14px;
  font-size: 16px;
  background:#fff;
}

.pill{
  display:inline-block;
  min-width: 56px;
  text-align:center;
  padding: 7px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #fafafa;
  color:#222;
  font-variant-numeric: tabular-nums;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}
.pills{ display:flex; gap:10px; align-items:center; padding-top: 22px; }

.search{
  display:flex;
  flex-direction:column;
  gap:6px;
  min-width: 260px;
}
.search__label{
  font-size: 12px;
  color: var(--muted);
  font-weight: 900;
}
.search__input{
  padding: 10px 12px;
  border:1px solid #cfcfcf;
  border-radius: 14px;
  font-size: 16px;
}

.status{
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background:#fafafa;
  color:#333;
  font-size: 14px;
}

.audio{
  width: 100%;
  margin-top: 12px;
}

.tabs{
  display:flex;
  gap:10px;
  margin: 10px 2px 12px;
}
.tab{
  flex:1;
  padding: 10px 12px;
  border:1px solid var(--border);
  border-radius: 999px;
  background: #fff;
  cursor:pointer;
  font-weight: 900;
}
.tab--active{ border-color:#111; }

.grid{
  display:grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 14px;
}

.tracklist{
  max-height: 62vh;
  overflow:auto;
  padding-right: 6px;
}

.trk{
  display:flex;
  gap: 12px;
  padding: 12px;
  border-radius: 16px;
  border: 2px solid #ececec;
  background:#fff;
  cursor:pointer;
  margin: 10px 0;
}
.trk:hover{ background:#fafafa; }
.trk.active{
  border-color:#111;
  box-shadow: 0 0 0 2px rgba(0,0,0,.06) inset;
}
.n{
  width: 56px;
  flex: 0 0 56px;
  text-align:center;
  color:#111;
  font-variant-numeric: tabular-nums;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  padding-top: 2px;
}
.t1{
  font-weight: 1000;
  font-size: 16px;
  margin-bottom: 4px;
}
.t2{
  color: var(--muted);
  font-size: 14px;
  line-height: 1.35;
  white-space: pre-wrap;
}

.text__body{
  white-space: pre-wrap;
  font-size: 16px;
  line-height: 1.45;
}

/* Mobile: use tabs to switch panels */
@media (max-width: 980px){
  .grid{ grid-template-columns: 1fr; }
  .tracklist{ max-height: 50vh; }
  .controls{ grid-template-columns: 1fr 1fr; }
  .pills{ padding-top: 0; }
}
