:root {
  color-scheme: light;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: #0f172a;
  color: #e2e8f0;
}

.app {
  min-height: 100vh;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  transition: background-color 220ms ease;
}

.header h1 {
  margin: 0;
  font-size: 1.75rem;
}

.header p {
  margin: 0.5rem 0 0;
  color: #cbd5e1;
}

.target-card,
.status-card,
.controls {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 14px;
  padding: 1rem;
}

.label {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 0.75rem;
  color: #94a3b8;
}

.option-row {
  margin-top: 0.65rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.option-label {
  font-size: 0.8rem;
  color: #cbd5e1;
  font-weight: 600;
}

.select-input {
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(15, 23, 42, 0.65);
  color: #e2e8f0;
  border-radius: 8px;
  padding: 0.4rem 0.55rem;
  font-size: 0.85rem;
}

.target-note {
  margin: 0.2rem 0 0;
  font-size: 4rem;
  line-height: 1;
  font-weight: 700;
}

.target-display {
  margin-top: 0.2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.staff-wrapper {
  flex: 1;
  min-width: 150px;
  max-width: 230px;
}

.target-staff {
  display: block;
  width: 100%;
  height: auto;
}

.hidden {
  display: none !important;
}

.detected-note {
  margin: 0.25rem 0 0;
  font-size: 1.4rem;
  font-weight: 600;
}

.frequency {
  margin: 0.25rem 0 0;
  color: #cbd5e1;
}

.streak-label {
  margin-top: 0.85rem;
}

.streak-count {
  margin: 0.2rem 0 0;
  font-size: 2rem;
  line-height: 1;
  font-weight: 700;
  color: #facc15;
}

.metrics-grid {
  margin-top: 0.9rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.8rem;
}

.metric-label {
  margin-bottom: 0.2rem;
}

.metric-value {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  color: #e2e8f0;
}

.btn {
  appearance: none;
  width: 100%;
  border: 0;
  border-radius: 10px;
  background: #38bdf8;
  color: #082f49;
  font-size: 1.05rem;
  font-weight: 700;
  padding: 0.9rem 1rem;
}

.btn:disabled {
  opacity: 0.75;
}

.hint {
  margin: 0.75rem 0 0;
  color: #cbd5e1;
}

.app.result-correct {
  background: #14532d;
}

.app.result-incorrect {
  background: #7f1d1d;
}

@media (min-width: 640px) {
  .app {
    max-width: 540px;
    margin: 0 auto;
    padding-top: 2rem;
  }
}
