:root {
  color-scheme: dark;
  font-family: Arial, Helvetica, sans-serif;
  background: #08111f;
  color: #eff6ff;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top, #16304a 0, #08111f 45%, #040913 100%);
}

button, input {
  font: inherit;
}

.app-shell {
  width: min(1200px, calc(100vw - 2rem));
  margin: 0 auto;
  padding: 24px 0 40px;
}

.hero-card, .panel {
  background: rgba(7, 17, 31, 0.88);
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 18px;
  box-shadow: 0 16px 30px rgba(15, 23, 42, 0.35);
}

.hero-card {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 24px;
  align-items: center;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.25em;
  font-size: 0.78rem;
  color: #93c5fd;
}

h1, h2, p { margin-top: 0; }

h1 { font-size: clamp(2rem, 5vw, 2.6rem); margin-bottom: 8px; }
.lede { max-width: 640px; color: #dbeafe; }

.grid { display: grid; gap: 20px; margin-top: 20px; }
.two-column { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.panel { padding: 18px; }

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.badge {
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 0.85rem;
  border: 1px solid rgba(148, 163, 184, 0.24);
}

.badge.neutral { background: rgba(30, 41, 59, 0.95); color: #bfdbfe; }
.badge.success { background: rgba(22, 163, 74, 0.18); color: #bbf7d0; }
.badge.warning { background: rgba(245, 158, 11, 0.18); color: #fde68a; }

.capture-box {
  position: relative;
  border: 1px dashed rgba(148, 163, 184, 0.35);
  border-radius: 14px;
  overflow: hidden;
  min-height: 280px;
  background: #020617;
}

#cameraPreview {
  display: block;
  width: 100%;
  height: auto;
  min-height: 280px;
  object-fit: cover;
  background: #020617;
}

.empty-state {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #cbd5e1;
  text-align: center;
  padding: 1rem;
}

.button-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.primary-btn, .secondary-btn, .ghost-btn {
  border-radius: 10px;
  border: 1px solid transparent;
  padding: 10px 14px;
  cursor: pointer;
  transition: transform 120ms ease, opacity 120ms ease;
}

.primary-btn:hover, .secondary-btn:hover, .ghost-btn:hover { transform: translateY(-1px); }
button:disabled { opacity: 0.55; cursor: not-allowed; transform: none; }

.primary-btn { background: linear-gradient(135deg, #2563eb, #38bdf8); color: #eff6ff; }
.secondary-btn { background: #1e293b; color: #eff6ff; border-color: rgba(148, 163, 184, 0.25); }
.ghost-btn { background: transparent; color: #bfdbfe; border-color: rgba(148, 163, 184, 0.25); }

.file-label input { display: none; }

.hint, .placeholder-text, .mini-list { color: #dbeafe; font-size: 0.95rem; }

.score-preview {
  min-height: 180px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.95), rgba(30, 41, 59, 0.95));
  border: 1px solid rgba(148, 163, 184, 0.2);
  padding: 14px;
}

.mini-list {
  margin: 12px 0 0;
  padding-left: 18px;
}

@media (max-width: 920px) {
  .two-column { grid-template-columns: 1fr; }
  .hero-card { flex-direction: column; align-items: flex-start; }
}

/* Score canvas: paper background so VexFlow black notation is readable */
#scoreCanvas {
  background: #f5f0e8;
  color: #111;
  overflow-x: auto;
  padding: 8px;
  border-radius: 12px;
  min-height: 180px;
}

#scoreCanvas svg {
  display: block;
}

#scoreCanvas p, #scoreCanvas ul, #scoreCanvas li {
  color: #111;
}
