:root {
  --bg: #07090f;
  --panel: #121722;
  --ink: #edf1f6;
  --dim: #9aa4af;
  --line: rgba(255, 255, 255, .12);
  --accent: #79b8ff;
  --on-accent: #fff;
}
* { box-sizing: border-box; }
body {
  margin: 0; min-height: 100vh; color: var(--ink);
  background:
    radial-gradient(800px 420px at 0% 0%, rgba(34, 211, 238, .14), transparent 60%),
    var(--bg);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
}
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--accent); }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 2px;
}
.rule { height: 2px; background: linear-gradient(90deg, #22d3ee, #4aa8ff 32%, #9d6cff 64%, #f472b6); }
.shell { width: min(1100px, 100%); margin: 0 auto; padding: 16px 18px 64px; }
.top-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.chip, .btn, .btn.ghost {
  display: inline-flex; align-items: center; justify-content: center; min-height: 44px;
  padding: 0 14px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--panel); color: var(--ink); text-decoration: none;
}
.btn.primary { background: #1f6feb; border-color: #1f6feb; color: #fff; font-weight: 700; }
.btn.warn { color: #fecdd3; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
h1 { margin: 22px 0 8px; font-size: clamp(28px, 5vw, 40px); letter-spacing: -.03em; }
.lede, .help, .status { color: var(--dim); line-height: 1.65; }
.panel {
  margin-top: 16px; padding: 16px; border-radius: 16px;
  border: 1px solid var(--line); background: rgba(255, 255, 255, .03);
}
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--dim); }
input[type="text"], input[type="password"], input[type="date"], input[type="number"], textarea, input[type="url"] {
  min-height: 44px; padding: 8px 10px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--bg); color: var(--ink); width: 100%;
}
textarea { min-height: 88px; resize: vertical; }
.check { flex-direction: row; align-items: center; gap: 8px; min-height: 44px; color: var(--ink); }
.check input { width: 18px; height: 18px; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.split { display: grid; grid-template-columns: minmax(180px, 240px) minmax(0, 1fr); gap: 16px; margin-top: 16px; }
.album-btn, .mini {
  width: 100%; text-align: left; min-height: 44px; margin-bottom: 8px;
  border-radius: 12px; border: 1px solid var(--line); background: transparent; color: var(--ink); padding: 8px 10px;
}
.album-btn.is-on { border-color: var(--accent); }
.track-card { border: 1px solid var(--line); border-radius: 12px; padding: 12px; margin-top: 10px; }
.track-card h3 { margin: 0 0 8px; font-size: 15px; }
.row-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.file-name { color: var(--dim); font-size: 12px; margin: 4px 0 0; word-break: break-all; }
.cover-preview { width: 96px; height: 96px; object-fit: cover; border-radius: 12px; background: #1b2433; }
#gate {
  min-height: 100vh; display: grid; place-items: center; padding: 24px;
}
.gbox {
  width: min(420px, 100%); padding: 28px 22px; border-radius: 18px;
  border: 1px solid var(--line); background: var(--panel); text-align: center;
}
.gbox h2 { margin: 8px 0; }
.gbox input { margin: 12px 0; }
#gerr { min-height: 1.4em; color: #fda4af; }
html[data-theme="ft"] body, html[data-theme="paper"] body { background: var(--bg); color: var(--ink); }
html[data-theme="ft"] .btn.primary, html[data-theme="paper"] .btn.primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent, #fff); }
@media (max-width: 800px) {
  .grid, .split { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto; }
}
