.platform-button {
  white-space: nowrap;
}
.platform-status {
  margin: 0 28px 12px;
  padding: 10px 14px;
  border: 1px solid #e5ad4659;
  background: #e5ad4610;
  color: #edca8a;
  border-radius: 12px;
  font-size: 12px;
  line-height: 1.5;
}
.platform-status[hidden] {
  display: none;
}
.data-dialog {
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 22px;
  width: min(760px, calc(100% - 24px));
  max-height: calc(100dvh - 40px);
  padding: 0;
  box-shadow: 0 30px 100px #0009;
}
.data-dialog::backdrop {
  background: #050710bb;
  backdrop-filter: blur(8px);
}
.data-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 24px;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: var(--surface);
  z-index: 1;
}
.data-head h2 {
  font-size: 20px;
  margin: 0;
}
.data-body {
  padding: 0 24px;
}
.data-section {
  padding: 22px 0;
  border-bottom: 1px solid var(--border);
}
.data-section h3 {
  margin: 0 0 12px;
  font-size: 16px;
}
.data-note {
  font-size: 13px;
  color: var(--text-dim);
  line-height: 1.65;
  margin: 8px 0 14px;
}
.data-section > .btn {
  margin: 4px 6px 4px 0;
  padding: 9px 12px;
  border: 1px solid var(--border);
  font-size: 12px;
}
.data-output {
  position: sticky;
  bottom: 0;
  min-height: 46px;
  background: var(--surface);
  padding: 14px 24px;
  margin: 0;
  font-size: 13px;
  border-top: 1px solid var(--border);
  color: var(--accent-2);
}
.data-output.bad {
  color: #ffb3ba;
}
.data-playlist {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  padding: 12px 0;
}
.data-dialog input,
.data-dialog select {
  background: var(--bg-2);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 10px;
  font: inherit;
  font-size: 13px;
  max-width: 100%;
  min-width: 0;
}
.data-dialog select {
  width: 100%;
  margin-bottom: 12px;
}
.data-dialog label {
  display: block;
  font-size: 12px;
  color: var(--text-dim);
  margin-bottom: 12px;
}
.data-dialog label input {
  display: block;
  width: 100%;
  margin-top: 6px;
}
.data-playlist > input {
  flex: 1;
}
.data-playlist-tracks {
  width: 100%;
  max-height: 230px;
  overflow: auto;
}
.data-track-order {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 5px 0;
  font-size: 12px;
}
.data-track-order > span {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.data-track-order button {
  min-width: 36px;
  min-height: 36px;
}
.update-notice {
  position: fixed;
  right: 16px;
  top: 16px;
  padding: 14px 18px;
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid var(--accent);
  border-radius: 12px;
  z-index: 1000;
  box-shadow: 0 8px 30px #0008;
}
.data-dialog button:disabled {
  opacity: 0.45;
  cursor: wait;
}
@media (max-width: 620px) {
  .data-head {
    padding: 16px;
  }
  .data-body {
    padding: 0 16px;
  }
  .data-dialog {
    max-height: calc(100dvh - 24px);
    border-radius: 16px;
  }
  .platform-status {
    margin: 0 14px 8px;
  }
  .data-output {
    padding: 12px 16px;
  }
  .topbar {
    flex-wrap: wrap;
    gap: 8px;
  }
  .topbar .search {
    min-width: 130px;
  }
  .platform-button {
    font-size: 12px !important;
  }
  .data-section > .btn {
    min-height: 44px;
  }
  .modal .icon-btn {
    min-width: 40px;
    min-height: 40px;
  }
}
@media (max-width: 620px) {
  .app {
    padding-bottom: calc(62px + env(safe-area-inset-bottom, 0px));
  }
  .sidebar {
    overflow: visible;
    padding: 10px 16px;
    gap: 12px;
    min-height: 54px;
  }
  .sidebar .brand {
    flex: 1;
  }
  .sidebar .brand-name {
    display: block;
  }
  .sidebar > .side-section {
    display: none;
  }
  .sidebar .side-footer {
    margin-left: auto;
    padding-left: 0;
    gap: 12px;
  }
  .sidebar .nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    height: calc(62px + env(safe-area-inset-bottom, 0px));
    padding: 4px 8px calc(4px + env(safe-area-inset-bottom, 0px));
    z-index: 40;
    background: var(--bg-2);
    border-top: 1px solid var(--border);
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 3px;
  }
  .sidebar .nav-item {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    font-size: 10px;
    padding: 6px 2px;
    border-radius: 10px;
  }
  .sidebar .nav-label {
    flex: 0;
    text-align: center;
  }
  .sidebar .nav-item svg {
    width: 18px;
    height: 18px;
  }
  .sidebar .user-btn {
    min-width: 40px;
    min-height: 36px;
  }
  .toast {
    bottom: 160px;
  }
  .empty {
    padding-top: 20px;
    padding-bottom: 20px;
  }
  .empty-ring {
    width: 100px;
    height: 100px;
    margin-bottom: 20px;
  }
  .empty h2 {
    font-size: 24px;
  }
  .empty p {
    font-size: 13px;
  }
  .panel {
    bottom: 160px;
  }
  .platform-status {
    font-size: 11px;
  }
}
.auth-server-toggle[hidden] {
  display: none !important;
}
@media (max-width: 620px) {
  .sidebar {
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
}
:root,
[data-theme="neon"] {
  --text-faint: #8992a7;
}
[data-theme="mono"] {
  --text-faint: #9295a0;
}
.transfer-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 16px 10px;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  font-size: 12px;
}
.transfer-bar .btn {
  font-size: 12px;
  padding: 6px 9px;
}
.transfer-bar[hidden] {
  display: none;
}
.cat-save:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}
