:root {
  --bg: #12101a;
  --panel: #1d1a28;
  --panel-2: #262236;
  --text: #f3f0fa;
  --muted: #a49cb8;
  --accent: #ff7a45;
  --accent-2: #ffb347;
  --kids: #3ccf91;
  --danger: #ff5470;
  --radius: 14px;
  color-scheme: dark;
}
body.kids { --accent: #3ccf91; --accent-2: #8be28b; }
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text);
  font: 16px/1.4 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
main { max-width: 720px; margin: 0 auto; padding: 16px; }
h1, h2, h3 { margin: 0 0 8px; }
h2 { font-size: 1.05rem; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }
a { color: var(--accent); }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }

header.bar { display: flex; align-items: center; gap: 12px; padding: 12px 16px; max-width: 720px; margin: 0 auto; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.2rem; }
.logo img { width: 34px; height: 34px; border-radius: 9px; }
.spacer { flex: 1; }

button, .btn { font: inherit; border: 0; border-radius: 999px; padding: 10px 18px; cursor: pointer;
  background: var(--panel-2); color: var(--text); font-weight: 600; text-decoration: none; display: inline-flex;
  align-items: center; gap: 6px; }
button:hover { filter: brightness(1.15); }
button:disabled { opacity: .45; cursor: default; filter: none; }
button.primary { background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #1a0f08; }
button.danger { background: var(--danger); color: #fff; }
button.ghost { background: transparent; color: var(--muted); padding: 6px 10px; }
button.small { padding: 6px 12px; font-size: .85rem; }

input, select { font: inherit; background: var(--panel-2); color: var(--text); border: 1px solid #3a3450;
  border-radius: 10px; padding: 10px 12px; width: 100%; }
input:focus, select:focus { outline: 2px solid var(--accent); border-color: transparent; }

.card { background: var(--panel); border-radius: var(--radius); padding: 16px; margin-bottom: 16px; }

.feed-toggle { display: flex; background: var(--panel); border-radius: 999px; padding: 4px; }
.feed-toggle button { background: transparent; color: var(--muted); padding: 6px 14px; }
.feed-toggle button.on { background: var(--accent); color: #111; }

.now { display: grid; grid-template-columns: 120px 1fr; gap: 16px; align-items: center; }
.now img.art { width: 120px; height: 120px; border-radius: 12px; object-fit: cover; background: var(--panel-2); }
.now .title { font-size: 1.3rem; font-weight: 800; line-height: 1.2; }
.now .artist { color: var(--muted); margin-top: 2px; }
.now .by { margin-top: 6px; font-size: .85rem; color: var(--accent-2); }
.progress { height: 5px; background: var(--panel-2); border-radius: 3px; margin-top: 14px; overflow: hidden; }
.progress > div { height: 100%; background: var(--accent); width: 0; transition: width 1s linear; }
.controls { display: flex; gap: 10px; margin-top: 16px; flex-wrap: wrap; align-items: center; }
.play { width: 64px; height: 64px; padding: 0; justify-content: center; font-size: 1.6rem; }
.like.on { color: var(--danger); }
.status-pill { font-size: .75rem; padding: 3px 8px; border-radius: 999px; background: var(--panel-2); color: var(--muted); }

.list { list-style: none; margin: 0; padding: 0; }
.list li { display: flex; align-items: center; gap: 12px; padding: 8px 0; border-bottom: 1px solid #2a253a; }
.list li:last-child { border-bottom: 0; }
.list img { width: 44px; height: 44px; border-radius: 8px; object-fit: cover; background: var(--panel-2); flex: none; }
.list .meta { flex: 1; min-width: 0; }
.list .meta .t { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list .meta .a { color: var(--muted); font-size: .85rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.badge { display: inline-block; font-size: .7rem; font-weight: 800; padding: 1px 5px; border-radius: 4px;
  background: #555; color: #fff; margin-left: 6px; vertical-align: middle; }
.badge.explicit { background: var(--danger); }
.badge.unknown { background: #7a6a2a; }
.badge.clean { background: #2a7a52; }

.search-row { display: flex; gap: 8px; }
.search-row input { flex: 1; }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--panel-2);
  color: var(--text); padding: 12px 18px; border-radius: 12px; box-shadow: 0 8px 30px #0008; z-index: 10;
  max-width: calc(100% - 32px); }

.center { min-height: 70vh; display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; gap: 16px; }
.center img { width: 96px; height: 96px; border-radius: 22px; }

/* admin */
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }
.tabs button.on { background: var(--accent); color: #111; }
table { width: 100%; border-collapse: collapse; font-size: .9rem; }
th, td { text-align: left; padding: 8px 6px; border-bottom: 1px solid #2a253a; vertical-align: middle; }
th { color: var(--muted); font-weight: 600; }
td input, td select { padding: 6px 8px; }
.table-wrap { overflow-x: auto; }
.setting { display: grid; grid-template-columns: 1fr 160px; gap: 12px; padding: 10px 0; border-bottom: 1px solid #2a253a; align-items: center; }
.setting .d { color: var(--muted); font-size: .85rem; }

@media (max-width: 520px) {
  .now { grid-template-columns: 88px 1fr; }
  .now img.art { width: 88px; height: 88px; }
  .now .title { font-size: 1.1rem; }
  .setting { grid-template-columns: 1fr; }
}
