:root {
  --green: #15803d;
  --bg: #f8fafc;
  --card: #fff;
  --text: #0f172a;
  --muted: #64748b;
  --border: #e2e8f0;
  --accent: #ff6b4a;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: Inter, system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 24px;
  background: #fff;
  border-bottom: 1px solid var(--border);
}
.brand {
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  display: flex;
  gap: 8px;
  align-items: center;
}
.ghost {
  color: var(--green);
  text-decoration: none;
  font-weight: 600;
}

.wrap { max-width: 920px; margin: 0 auto; padding: 24px; }
.hero h1 { margin: 0 0 8px; font-size: 28px; }
.hero p { margin: 0 0 20px; color: var(--muted); line-height: 1.5; }

.panel {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px;
  margin-bottom: 20px;
}
.panel.hidden { display: none; }

label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 14px;
}
input, textarea {
  width: 100%;
  margin-top: 6px;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  font: inherit;
}
.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
@media (max-width: 720px) {
  .grid { grid-template-columns: 1fr; }
}

.lipsync-box {
  border: 1px dashed var(--border);
  border-radius: 12px;
  padding: 14px;
  margin: 8px 0 16px;
}
.check { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.check input { width: auto; margin: 0; }
.hidden { display: none; }

.actions { display: flex; gap: 10px; flex-wrap: wrap; }
.btn {
  border: 0;
  border-radius: 10px;
  padding: 12px 18px;
  font-weight: 700;
  cursor: pointer;
}
.btn.primary { background: var(--green); color: #fff; }
.btn.secondary { background: #fff; border: 1px solid var(--border); color: var(--text); }
.btn:disabled { opacity: 0.6; cursor: wait; }

pre#log {
  background: #0f172a;
  color: #e2e8f0;
  padding: 14px;
  border-radius: 10px;
  overflow: auto;
  max-height: 320px;
  font-size: 12px;
  line-height: 1.45;
}

.beats {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 10px;
  margin-top: 14px;
}
.beats a {
  display: block;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px;
  text-decoration: none;
  color: var(--text);
  font-size: 12px;
  background: #fafafa;
}
.beats a:hover { border-color: var(--accent); }

#player {
  width: min(320px, 100%);
  margin-top: 16px;
  border-radius: 12px;
  background: #000;
}
